Displaying 20 results from an estimated 100 matches similar to: "Bayesian logistic regression with a beta prior (MCMClogit)"
2007 Mar 14
0
Logistic regression for drugs Interactions
I have the model below, for which I run a logistic regression including the
interaction term (NSAID*Diuretic)
------------------------
fit1=glm(resp ~ nsaid+diuretic+I(nsaid*diuretic), family= binomial,data=w)
NSAID Diuretic Present Absent
0 0 185 6527
0 1 53 1444
1 0 42 1293
1 1 25 253
Coefficients Std. Error z value Pr(>|z|)
(Intercept) -3.56335 0.07456 -47.794 < 2e-16 ***
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
2007 Jun 01
0
Metropolis code help
Dears, I have the below code for metropolis of the GLM logit (logistic
regression) using a flat prior. Can someone help me modify the prior so that
the model becomes hierarchical by using a flat prior for mu and sigma, the
derived density for beta ~ N(mu, sigma^2)? Actually I took my code from a
teacher that posted on the internet and modified it to the GLM logit but I
can't adapt it to the
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)
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 May 05
0
Response as matrix in MCMClogit?
I hope some of the authors of the package MCMCpack read this.
I don't know if there is a way to set the response in the model formula of
MCMClogit other than a (numeric) response vector. I think the MCMClogit in
the MCMCpack needs some development so that the response in the formula
could be set as a two-column matrix with the columns giving the numbers of
successes and failures (just as in
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 =
2006 May 11
1
time-dependent covariate survival curves
Dear r-users,
Does anyone know how to draw time-dependent survival curves?
Example:
Event outcome: CHD
Time-dependent covariate: NSAID use, which changes over time for each
subject
I'm interested in survival curves stratified by NSAID use.
I'd like to implement Simon & Makuch (1984) method. Is there a R
package/function to draw this graph?
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
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.
2006 Dec 07
2
Simulation in R
Hello!
I have the following problem.
My code:
--snip--
ergebnisse <- rep(0, each=2)
stichproben <- rep(0, each=2)
for (i in seq(1:2)) {
n <- dim(daten)[1]
ix <- sample(n,200) # producing samples
samp_i <- daten[ix,]
stichproben[i] <- samp_i # doesn???t works
# Calculation of the model:
posterior_i <- MCMClogit(y ~ fbl.ind + fekq3 + febitda4 + fuvs + fkru +
2006 Dec 07
1
Simulation in R - Part 2
Hello!
So, the simulation works (drawing 100 samples and then calculate the
model for each sample). Here is the code:
--snip--
# sample size n=200
ergebnisse200 <- rep(0, each=100)
stichproben200 <- vector(?list?, 100)
default200 <- rep(0, each=100)
for (i in seq(1:100)) {
n <- dim(daten)[1]
ix <- sample(n,200)
samp_i <- daten[ix,] # draw samples
y <- sum(samp_i$y)
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
2008 May 12
1
test
Sorry to bother your.
I am trying to post my question for more than 10 times, but I still
didn't see it.
It drives my crazy!!!
It is a test for posting some simple pure text.
Chao
2003 Jul 14
2
qualitative response model
Hi, I want to know is there other functions in R to
estimate qualitative response model besides multinom()
in library nnet, if this is the only possibility, I
have a question about the application:
for example:
there is three transportation choice : car, bus ,
subway.
each alternative has own characteristic variables,
I want to apply conditional logit model to analysis
the choice of three
2011 Feb 02
4
exact logistic regression
Hello to R people
Does anybody know to calculate exact logistic regression in R?
Does such option exist anywhere?
Surprisingly, could not find it using search engine. It is hard to
believe, however, that such useful function is not implemented in R yet?
Could you help, please
Thank you
Denis
2000 Sep 19
1
Re: more experience with formulas
>>>>> "WSt" == Werner Stahel <stahel@stat.math.ethz.ch> writes:
[to me privately]
WSt> I do not want to call this a bug, but it bugged me. Please try the
WSt> following:
WSt> tform <- sqrt(RADAI) ~ sqrt(RADAI.e) + TAGE.ej + SPITAL + ARZT + DAS28 +
WSt> SJC + TJC + DGA + HAQ + PGA + PAIN + YEAR.SYM + YEAR.DIA +
WSt> ALTER +
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
> I am using a random intercept model with SITEID as random and NAUSEA as
> outcome.
>
> I tried using a dataset without missing values and changed my model
> statement accordingly but still get the same error. Follwoing in an excerpt.
> > anal.data <- read.table("nausea.txt", header=T, sep="\t")
> > list(names(anal.data))
> [[1]]
> [1]
2013 Feb 04
2
reshape help
Dear R users -
I have a list of patient identifiers and diagnoses from inpatient
admissions. I would like to reorganize the list, presently in a long
format to a wide format in reshape, but in the absence of a "time" element,
I am uncertain how to do this - any help greatly appreciated.
ID Dx
A nausea
A diabetes
A kidney failure
A heart attack
A fever
B fever
B
2007 Jan 07
1
Partial proportional odds logistic regression
R-experts:
I would like to explore the partial proportional odds models of Peterson
and Harrell (Applied Statistics 1990, 39(2): 205-217) for a dataset that
I am analyzing. I have not been able to locate a R package that
implements these models. Is anyone aware of existing R functions,
packages, etc... that might be used to implement the partial
proportional odds models?
Brant Inman