Displaying 9 results from an estimated 9 matches for "mcmcregress".
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi,
A question. When I run gelman.diag and gelman.plot
with mcmc lists obtained from MCMCregress, the results are following.
> post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+ thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA,
+ b0 = 0, B0 = 0, nu = 0.001, delta = 0.001)
> post1.R <- MCMCregress(Size~Age+Status, da...
2011 Aug 10
2
function runif in for loop
Hello,
I'd like to perform a regression using MCMCregress (MCMCpack).
One variable therefore should be a function rather than a variable:
I want to use X as an input and X should be defined as a random number between to values. Therefore I want to use the function runif like:
X <-(1, Xa, Xb) but it seems that runif doesn't allow to use vectors.
So...
2008 Oct 18
1
Fehler in x$terms : $ operator is invalid for atomic vectors
Dear All
I try to use your R package MCMCpack and I have encountered the following problem:
The following code works fine:
library(MCMCpack)
line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5))
posterior1 <- MCMCregress(X~Y, data=line)
summary(posterior1)
But as long as I try the following lines
library(MCMCpack)
line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5))
posterior2 <- MCMCregress(paste(?X?,?Y?,sep=?~?), data = line)
summary(posterior2)
I get the following error message:
&...
2009 Jul 02
0
MCMCpack: Selecting a better model using BayesFactor
...all, by looking at the values for PostProbMod(BF), one can say
that higher posterior probability indicates the better model.
Once again, thank you very much for the time you have given.
I am looking forward for your reply.
Regards,
Deb
R Code:
library(MCMCpack)
data(birthwt)
model1 <- MCMCregress(bwt~age+lwt+as.factor(race) + smoke + ht,
data=birthwt,
b0=c(2700, 0, 0, -500, -500, -500, -500),
B0=c(1e-6, .01, .01, 1.6e-5, 1.6e-5, 1.6e-5,
1.6e-5), c0=10, d0=4500000,
marginal.likelihood="Chib95", mcmc=50000)
model2 <- MCMCregress(bwt~age+lwt+as.factor(race) + smoke,
data=birthwt,...
2006 Aug 11
2
about MCMC pack again...
Hello, thank you very much for your previous answers about the C++ code.
I am interested in the application of the Gibbs Sampler in the IRT
models, so in the function MCMCirt1d and MCMCirtkd. I've found the C++
source codes, as you suggested, but I cannot find anything about the
Gibbs Sampler. All the files are for the Metropolis algorithm.
Maybe I am not able to read them very well, by the
2011 Aug 15
2
MCMC regress, using runif()
...llow up a question from last week. Here what I've done so far (here an example):
library(MCMCpack)
Y=c(15,14,23,18,19,9,19,13)
X1=c(0.2,0.6,0.45,0.27,0.6,0.14,0.1,0.52)
X2a=c(17,22,21,18,19,25,8,19)
X2b=c(22,22,29,34,19,26,17,22)
X2 <- function()runif(length(X2a), X2a, X2b)
model1 <- MCMCregress(Y~X1+X2())
summary(model1)
but I am not sure if my X2-function is working in the MCMCpack?
Is a random number drawn each iteration step? I don't think so
as the results are varying greatly if I run the script several times.
Is there any other way to do several thousand runs of a linear regre...
2005 Sep 02
1
source package linking problem under linux
...k]
g++ -o MCMCpack.so distributions.o ide.o la.o lecuyer.o MCMCdistn.o
MCMCdynamicEI.o MCMCfactanal.o MCMCfcds.o MCMChierEI.o MCMCirt1d.o
MCMClogit.o MCMCmetrop1R.o MCMCmixfactanal.o MCMCmnlMH.o
MCMCmnlslice.o MCMCoprobit.o MCMCordfactanal.o MCMCpanel.o
MCMCpoisson.o MCMCprobit.o MCMCprobitres.o MCMCregress.o MCMCrng.o
MCMCtobit.o mersenne.o optimize.o rng.o smath.o stat.o
-L/usr/lib/R/lib -lR
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): In
function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [MCMCpac...
2008 Feb 03
1
Effect size of comparison of two levels of a factor in multiple linear regression
...720456 0.1994251 0.3167116 0.8753761
# Proposed way to determine effect size: simulate outcomes for each
# treatment level assuming the covariate to have a fixed value (here
# its mean value after standardization: zero)
library(MCMCpack)
no.of.sims <- 10000
sims.model <- MCMCregress(model, mcmc=no.of.sims)
sims.model[1:2,]
(Intercept) treatment1 treatment2 scale(covariate) sigma2
[1,] -0.1780735 0.2024111 0.3395233 0.8682119 0.002617449
[2,] -0.1521623 0.1773623 0.2956053 0.8764573 0.003529013
sims.treat0 <- rnorm(no.of.sims, sims.model[,"...
2012 Dec 11
0
Bayes weighted regression?
Dear List,
Just wondering, is there a Bayesian version of weighted regression
available in the literature (to handle survey weights, say)? If yes,
could you suggest me a reference? Does MCMCregress handle weights?
cheers,
Ehsan