search for: logfun

Displaying 5 results from an estimated 5 matches for "logfun".

2010 Sep 29
1
sample exponential r.v. by MCMC
Dear R users, I am leaning MCMC sampling, and have a problem while trying to sample exponential r.v.'s via the following code: samp <- MCMCmetrop1R(dexp, theta.init=1, rate=2, mcmc=5000, burnin=500, thin=10, verbose=500, logfun=FALSE) I tried other distribtions such as Normal, Gamma with shape>1, it works perfectly fine. Can someon tell me why? Thank you for your help. Best, Zhongyi [[alternative HTML version deleted]]
2008 Oct 19
1
MCMClogit: using weights
...control = glm.control(...), model = TRUE, method = "glm.fit", x = FALSE, y = TRUE, contrasts = NULL, ...) MCMClogit(formula, data = parent.frame(), burnin = 1000, mcmc = 10000, thin=1, tune=1.1, verbose = 0, seed = NA, beta.start = NA, b0 = 0, B0 = 0, user.prior.density=NULL, logfun=TRUE, marginal.likelihood=c("none", "Laplace"), ...)
2012 Aug 05
1
Possible bug with MCMCpack metropolis sampler
...hat basically looks like this: posterior.sampler <- function(data, prior.mu){ log.posterior <- function(theta) log.likelihood(data, theta) + log.prior(prior.mu, theta) post.samples <- MCMCmetrop1R(log.posterior, theta.init=prior.mu, burnin=100, mcmc=1000, thin=40, tune=1, verbose=0, logfun=T, optim.method="BFGS") return(post.samples) } x <- c(1,1,1) posterior.sampler(mydata, x) After calling posterior.sampler, the value for x is different from what I started with. Perhaps even more interesting, is that if I create a copy of x, say x2, before running posterior.sample...
2007 Mar 09
1
MCMC logit
...p(0, 4))) > burnin.cycles = 1000 > mcmc.cycles = 25000 > # three chains > post.list <- lapply(beta.init, function(vec) + { + posterior <- MCMClogit(y~x1+x2+x3+x4, data=c.df, burnin=burnin.cycles, mcmc=mcmc.cycles, + thin=5, tune=0.5, beta.start=vec, user.prior.density=logpriorfun, logfun=TRUE, + mu=mu0, gshape=a0, grate=b0) + return(posterior) + }) Error in eval(expr, envir, enclos) : object "x1" not found > Any suggestions will be greatly appreciated. Thanks, Anamika --------------------------------- We won't tell. Get more on shows you hate to love [[al...
2013 Jul 23
0
Coxme Package Error Message Help
...05330567 9.2 0 Random effects Group Variable Std Dev Variance ID Intercept 2e-02 4e-04 However, when I include a second variable the following error message follows. > mcc.risk_time<-coxme(Surv(faketime,Used)~ kauf_avg + Dummy_Time + (1|ID)+strata(Strata),data=data) Error in logfun(as.numeric(testvals[i, ]), varlist, vparm, kfun, ntheta, : NA/NaN/Inf in foreign function call (arg 2) I have removed all NA values from kauf_avg and neither Time or Age have NA values. The only information I can seem to find relevant to this error message is the following (I have contacted th...