search for: modmat

Displaying 3 results from an estimated 3 matches for "modmat".

2009 Sep 06
2
question about ... passed to two different functions
...eed(42) n <- 100 rho <- 0.5 beta0 <- 0.25 beta1 <- 0.5 beta2 <- 1 beta3 <- 1.5 Sigma <- matrix(rho, 3, 3) diag(Sigma) <- 1 Sigma <- 0.75 * Sigma Mu <- rep(0, 3) foo <- mvrnorm(n, Mu, Sigma) x1 <- foo[ , 1] x2 <- foo[ , 2] x3 <- foo[ , 3] modmat <- cbind(1, foo) eta <- beta0 + beta1 * x1 + beta2 * x2 + beta3 * x3 p <- 1 / (1 + exp(- eta)) y <- as.numeric(runif(n) < p) out <- glm(y ~ x1 + x2 + x3, family = binomial()) summary(out) ### now we want to do a Bayesian analysis of the model, so we write ### a function...
2010 May 24
1
Path Analysis
...is an indicator (0/1) variable. Here's the code I'm using: corr = hetcor(dat[,c('intent','exposure','benefit','norms','childBarrier','parentBarrier','knowBenefit','recuse')],use="pairwise.complete.obs")$correlations modMat = matrix(c( 'exposure -> intent', 'gam11',NA, 'benefit -> intent', 'gam12',NA, 'norms -> intent', 'gam13',NA, 'childBarrier -> intent', 'gam14',NA, 'parentBarrier -> intent', 'gam15',NA, '...
2011 Jan 28
1
survreg 3-way interaction
> I was wondering why survreg (in survival package) can not handle > three-way interactions. I have an AFT ..... You have given us no data to diagnose your problem. What do you mean by "cannot handle" -- does the package print a message "no 3 way interactions", gives wrong answers, your laptop catches on fire when you run it, ....? Also, make sure you read