Displaying 20 results from an estimated 10000 matches similar to: "Response as matrix in MCMClogit?"
2007 May 03
1
Bayesian logistic regression with a beta prior (MCMClogit)
Dear all,
I am trying to use the logistic regression with MCMClogit (package:
MCMCpack/Coda) and I want to put a beta prior on the parameters, but it's
giving me error message (please see output below) no matter what shape 1 or
2 I use. It works perfect with the cauchy or normal priors. Do you know if
there is a catch there somewhere? Thanks
logpriorfun <- function(beta,shape1,shape2){
2008 Oct 19
1
MCMClogit: using weights
Hi everyone: I am just wondering how can I use weights with MCMClogit function (in MCMCpack package). For example, in case of glm function as given below, there is weights option in the arguments. Aparently there is no option of using weights in MCMClogit.
glm(formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart,
offset, control =
2007 Mar 09
1
MCMC logit
Hi,
I have a dataset with the binary outcome Y(0,1) and 4 covariates (X1,X@,X#,X$). I am trying to use MCMClogit to model logistic regression using MCMC. I am getting an error where it doesnt identify the covariates ,although its reading in correctly. The dataset is a sample of actual dataset. Below is my code:
> #######################
>
>
> #retreive data
> # considering four
2008 May 12
4
Several questions about MCMClogit
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in this
matrix corresponds to the expression value of one particular gene in one of
32 samples. And the Y presents the corresponding classes (0-non cancer,
1-cancer)
2005 Sep 02
1
source package linking problem under linux
I'm having some problems in installing some source packages under linux.
As an example, MCMCpack. An error is raised when linking:
> install.packages("MCMCpack")
[...]
* Installing *source* package 'MCMCpack' ...
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking
2007 Mar 19
0
How to specify Variance Covariance matrix of residuals?
Hi guys! I have a problem regarding a binary logistic hierarchical
model I am trying to use. The model contains various covariates that depend
on the location the response was measured at but do not depend on time
(year). I also have a spatial covariate that depends both on location and
time. I have been trying to use the lme4 pack but the package only allows me
to model variance covariance
2009 Sep 22
2
Pull Coefficients from MCMCpack models
Hi,
I've been testing some models with the MCMCpack library.
I can run the process and get a nice model "object". I can easily see
the summary and even plot it.
I can't seem to figure out how to:
1) Access the final coefficients in the model
2) Turn the coefficients into a model so I can then run predictions
using them.
A summary command will SHOW Me the coefficients, but
2011 Feb 24
2
MCMCpack combining chains
Deal all, as MCMClogit does not allow for the specification of several chains, I have run my model 3 times with different random number seeds and differently dispersed multivariate normal priors.
For example:
res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat, burnin=500, mcmc=5500, seed=1234, thin=5)
res2 = MCMClogit(y~x,b0=1,B0=0.01,data=mydat, burnin=500, mcmc=5500, seed=5678, thin=5)
res3 =
2008 Apr 08
2
Metropolis acceptance rates
Is there a way to recover Metropolis-step acceptance rates AFTER
completing posterior draws?
The immediate application is in the probit.bayes and logit.bayes
models used by Zelig... which I believe is merely calling MCMCpack.
So one strategy, to which I am fixing to resort, is to call, say,
MCMClogit with verbose set to mcmc (or mcmc divided by an integer)
and then look at my screen.
2007 Jul 24
1
function optimization: reducing the computing time
Dear useRs,
I have written a function that implements a Bayesian method to
compare a patient's score on two tasks with that of a small control
group, as described in Crawford, J. and Garthwaite, P. (2007).
Comparison of a single case to a control or normative sample in
neuropsychology: Development of a bayesian approach. Cognitive
Neuropsychology, 24(4):343?372.
The function (see
2009 Jul 02
1
MCMC/Bayesian framework in R?
Dear R-users (and developers),
I am looking for an efficient framework to carry out parameter
estimations based on MCMC (optionally with specified priors). My goal is
as follow:
* take ANY R-function returning a likelihood-value (this function may
itself call external programmes or other code!)
* run a sampler that covers the multidimensional parameter space (thus
creating a posterior
2010 Mar 01
0
What Bayesian Framework?
I have found myself doing a large amount of Bayesian analysis and I am
uncertain what framework learn and I'm posing this question to get a sense
of perspective. As I am doing a lot of applied work right now, I need to do
a fair amount of "standard data analysis" (eg mixed models, glm, etc) but I
also have to have the flexibility to write more complicated models. As near
as I can
2006 Mar 14
0
MCMCpack Ordinal Probit Help
Hi everyone,
I am running an ordinal probit using the Bayesian MCMCpack and I am getting an
error saying "attempt for find suitable starting values failed"
Here is my code:
> posterior <- MCMCoprobit(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 +x9 + x10
+ x11 + x12 +x13 , beta.start=c(-10, 0.05, 0.02, 0.04, 0.98, 0.61, -0.29, 0.91,
-0.82, 1.34, 0.68, 0.57, 0.09, 0.5), mcmc=10000)
2005 Oct 28
1
MCMC in R
Dear R-helpers,
Hi! All.
I'm doing a project which needs MCMC simulation.
I wonder whether there exists related packages in R.
The only one I know is a MCMCpack package.
What I want to do is implementing gibbs sampling and
Metropolis-Hastings Algorithm to get the posterior
of hierarchical bayesian models.
Thanks in advance.
Jun
2010 May 18
0
Data preparation for MCMCbinaryChange
Dear All,
Since no one has answered my previous question, let me revise it a
little and ask again.
My data set contains about 10,000 women born in 60 months. The outcome
variable is a binary variable indicating whether one has certain
health problems. My hypothesis is that the 60 months in which these
women were born can be divided into three distinctive periods with
respect to the binary
2007 May 14
1
Hierarchical models in R
Is there a way to do hierarchical (bayesian) logistic regression in R, the
way we do it in BUGS? For example in BUGS we can have this model:
model
{for(i in 1:N) {
y[i] ~ dbin(p[i],n[i])
logit(p[i]) <- beta0+beta1*x1[i]+beta2*x2[i]+beta3*x3[i]
}
sd ~ dunif(0,10)
tau <- pow(sd, -2)
beta0 ~ dnorm(0,0.1)
beta1 ~ dnorm(0,tau)
beta2 ~ dnorm(0,tau)
beta3 ~
2003 Aug 21
2
mcmc
Hello,
I am about to move all of my modelling work into R, and I have been
investigating the present state of MCMC and Bayesian methods in R.
Following a thread on the mailing list in 2000, I have looked at
mcmcpack and Hydra. Three years down the line, is there anything new in
this area? I have used both MCSim and WinBUGS in the past. The first one
seems promising, but is too focused towards
2003 Aug 10
3
Support for Bayesian statistics in R
I'm just starting to learn to use R, and although I'm seeing lots of
functions aimed at doing orthodox statistical analyses, I don't see the
same for Bayesian analyses. What support does R have for Bayesian
statistics?
2013 Jan 09
0
Parameter estimates for each observation (ordered choice)
I have several demographic variables with which I want to explain the
ordered choice of individuals within a survey in an ordered choice (probit
or logit, this is not important) framework. Standard ordered choice
estimations of course just give me aggregate/average parameter estimates.
For my task it would however be useful to estimate or extract "hypothetical"
individual-level parameter
2010 Apr 13
2
Getting Started with Bayesian MCMC
Hi all,
I would like to start to use R's MCMC abilities to compute answers in
Bayesian statistics. I don't have any specific problems in mind yet,
but I would like to be able to compute/sample posterior probabilities
for low-dimensional custom models, as well as handle "standard"
Bayesian cases like linear regression and hierarchical models.
R clearly has a lot of abilities in