[R] MCMC for sampling from ordinal logistic regression
dieter.menne at menne-biomed.de
Thu Oct 23 17:36:05 CEST 2008
reezwan you <reez88 <at> yahoo.com> writes:
> Is there a R-function that can generate samples from the posterior
distribution of an ordered logistic regression model (just like
MCMCoprobit from MCMCpack in R).
I am confused. What's missing in the output of MCMCpack?
x1 <- rnorm(100); x2 <- rnorm(100);
z <- 1.0 + x1*0.1 - x2*0.5 + rnorm(100);
y <- z; y[z < 0] <- 0; y[z >= 0 & z < 1] <- 1;
y[z >= 1 & z < 1.5] <- 2; y[z >= 1.5] <- 3;
out1 <- MCMCoprobit(y ~ x1 + x2, tune=0.3)
More information about the R-help