similar to: Metropolis code help

Displaying 10 results from an estimated 10 matches similar to: "Metropolis code help"

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 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){
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?
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
2009 Jan 13
3
problem whit Geneland
I do the these passages: library(Geneland) set.seed(1) data <- simdata(nindiv=200, coord.lim=c(0,1,0,1) , number.nuclei=5 , allele.numbers=rep(10,20), IBD=FALSE, npop=2, give.tess.grid=FALSE) geno <- data$genotypes coord <- t(data$coord.indiv) path.mcmc <-
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 +
2010 Oct 13
5
Poisson Regression
Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two levels) k=0,1 (two levels) treating the \phi_{i} as nuinsance parameters. Thank you very much -- -Tony [[alternative HTML version deleted]]
2012 Oct 28
6
Having some Trouble Data Structures
Hi All, I'm trying to run a simulation of host-pathogen evolution based around individuals. What I need to have is a dataframe or table of some description - describing all the individuals of a pathogen population (so far I've implemented this as a matrix): ID No_of_Effectors Effectors (Sequences) [1,] 0001 3 ## 3
2011 Dec 17
2
Problem with reproducing log likelihood estimated with ghyp package
I was playing around with the ghyp package and simulated series of t-distributed variables when suddenly i was not able to reproduce the log likelihood values reported by the package. When trying to reproduce the likelihood values, I summed the log(dt(x,v)) values and it worked with some simulated series but not all. Is there any obvious flaws with this script? library("ghyp")
2010 Dec 02
4
2D Random walk
I've wrote some code to simulate a random walk in 2 dimensions on a lattice. Basically I want to add something in to make it plot it point by point so you can see what is going on. Heres my code for the random walk in 2d RW2D<-function(N) { i<-0 xdir<-0 ydir<-0 xpos<-vector() xpos[1]<-xdir ypos<-vector() ypos[1]<-ydir for (i in 1:N-1)