Displaying 20 results from an estimated 1000 matches similar to: "for loops in Gibbs sampler"
2003 Oct 27
4
how to set missing values in R
Hi, there.
Can I ask how to set up missing values in R? Suppose I want to assign the
missing value to the elements in vector which is greater than zero like
this:
x<-c(1,3,-1,0,4);
after the missing value assignment, x becomes (NA,NA,-1,0,NA).
Thanks!
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
2004 Oct 30
2
(no subject)
Hi, there.
Does anybody know how to plot a smooth density plot for some data
simulated from certain distribution? Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2005 Feb 05
1
plot smooth density estimates for bivariate data
Hi, there.
Suppose I have a bivarariate data matrix y1 and y2. I want to plot a 3-D
picture of the estimated density f(y1, y2) against y1 and y2? How can I do
that? Do I use persp() or density()?
Thanks for your help.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
2005 Jan 13
2
multivariate diagnostics
Hi, there.
I have two questions about the diagnostics in multivarite statistics.
1. Is there any diagnostics tool to check if a multivariate sample is from
multivariate normal distribution? If there is one, is there any function
doing it in R?
2. Is there any function of testing if two multivariate distribution are
same, i.e. the multivariate extension of Kolomogrov-Smirnov test?
Thanks for
2005 Jul 02
1
probability-probability plot
Hi, there.
Is there any function in R to plot the probability-probability plot (PP
plot)? Suppose I am testing some data against normal.
Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2004 Nov 17
1
how to estimate conditional density
Hi, there.
Suppose I have a bivariate data set y1 and y2. Can anybody tell me how to
estimate the conditional density of f(y1|y2) and vice versa? Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2004 Apr 16
0
autologistic regression with Gibbs sampler
Hello everyone,
I have some binary, spatially autocorrelated data I would like to run autologistic regression on. I hope to incorporate both ordinary covariates (environmental predictors) and a spatial autocovariate in the model, ideally with a second-order neighbourhood structure. Since my computing skills are limited, I am wondering if anyone has composed an algorithm for this purpose, and
2011 Nov 10
1
Gibbs sampler
I have the following code,
gibbs <-function(m,theta = 0.25, lambda =0.55, n =1){
alpha <- 1.5
beta <- 1.5
gamma <- 1.5
x<- array(0,c(m+1, 3))
x[1,1] <- theta
x[1,2] <- lambda
x[1,3]<- n
for(t in 2:(m+1)){
x[t,1] <- rbinom(1, x[t-1,3], x[t-1,1])
x[t,2]<-rbeta(1, x[t-1,1] + alpha, x[t-1,3] - x[t-1,1] + beta)
x[t,3]
2009 Jan 25
1
Gibbs sampler...did it work?
I am writing a Gibbs sampler. I think it is outputting some of what I want,
in that I am getting vector of several thousand values (but not 10,000) in a
txt file at the end.
My question is, is the error message (see below) telling me that it can't
output 10,000 values (draws) because of a limitation in my memory, file
size, shape etc, or that there is an error in the sampler itself?
>
2006 Jun 26
1
Griddy-Gibbs sampler
Hey everyone,
I have read the paper by Ritter and Tanner(1992) on Griddy-Gibbs sampler and I am trying to implement it in R without much luck. I was wondering if anyone had used this or could point me to any example code.
Thanks,
Liz
---------------------------------
[[alternative HTML version deleted]]
2009 Aug 17
1
Bayesian data analysis - help with sampler function
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.
s <-Sampler(
J=8,
sigma.y =c(15,10,16,11,9,11,10,18),
y =c(28, 8,-3,7,-1,1,18,12),
theta =Gibbs(theta.update,theta.init),
V =Gibbs(V.update,mu.init),
mu =Gibbs(mu.update,mu.init),
tau =Gibbs(tau.update,tau.init),
2008 Mar 26
0
Naive Gibbs Sampling with Metropolis Steps (pkg: gibbs.met)
Hi R Users:
This package provides two generic functions for performing Markov
chain sampling in a naive way for a user-defined target distribution,
which involves only continuous variables. The function "gibbs_met"
performs Gibbs sampling with each 1-dimensional distribution sampled
with Metropolis update using Gaussian proposal distribution centered
at the previous state. The function
2007 Dec 04
1
Metropolis-Hastings within Gibbs coding error
Dear list,
After running for a while, it crashes and gives the following error message: can anybody suggest how to deal with this?
Error in if (ratio0[i] < log(runif(1))) { :
missing value where TRUE/FALSE needed
################### original program ########
p2 <- function (Nsim=1000){
x<- c(0.301,0,-0.301,-0.602,-0.903,-1.208, -1.309,-1.807,-2.108,-2.71) # logdose
2005 Sep 26
2
questions about boxplots
Hi, there.
I have two questions about using R to create boxplots.
1. The function boxplot() plots the outliers. How can I label the exact
values arount these outlier points? Does R have an option allow me to
do that?
2. How can I put two boxplots in one x-y axis?
Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
276 Grove St. Apt 3
Newton, MA 02466
617-796-7834(H)
2000 Dec 15
0
Gibbs sampling in GLMMs: Beta testers required
Sort of a warning before I start: This post may be considered to
describe a rather amateurish approach to distributing software
which may annoy some people, but I sincerely hope it doesn't.
I've been working for some years with David Clayton on a project which
started life as
an S package but has now turned into an R library. It is (now)
called GLMMGibbs and estimates the parameters of
2004 Nov 18
1
gibbs sampling for mixture of normals
hi
i'm looking for a gibbs sampling algorithm for R for the case of mixture of K
normals, and in particular for the case of bivariate normals.
i'd be grateful if anyone could send its own R-routine, at least for the
univariate case.
thank you in advance
matteo
2011 Apr 05
1
Gibbs sampling
An embedded and charset-unspecified text was scrubbed...
Name: n?o dispon?vel
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110405/06486a8a/attachment.pl>
2010 Mar 16
0
tmvtnorm: version 1.0-2
Dear R users,
the tmvtnorm package, the package for the truncated multivariate normal and Student-t distribution, has been updated on CRAN.
The major changes in version 1.0-2 (2010-03-04) are:
* The package now provides methods for the truncated multivariate Student-t distribution, i.e. random number generation, density function, distribution functions like rtmvt(), dtmvt() und ptmvt() and
2010 Mar 16
0
tmvtnorm: version 1.0-2
Dear R users,
the tmvtnorm package, the package for the truncated multivariate normal and Student-t distribution, has been updated on CRAN.
The major changes in version 1.0-2 (2010-03-04) are:
* The package now provides methods for the truncated multivariate Student-t distribution, i.e. random number generation, density function, distribution functions like rtmvt(), dtmvt() und ptmvt() and
2005 Jul 19
1
initial points for arms in package HI
Dear R-users
I have a problem choosing initial points for the function arms()
in the package HI
I intend to implement a Gibbs sampler and one of my conditional
distributions is nonstandard and not logconcave.
Therefore I'd like to use arms.
But there seem to be a strong influence of the initial point
y.start. To show the effect I constructed a demonstration
example. It is reproducible