[R] HLM - centering level 2 predictor

2009-06-28 Thread Sachi Ito
Dear R-helpers, I'm analyzing a data with hierarchical linear model. I have one level 1 predictor and one level 2 predictor, which looks like below: fm1 <- lmer(y ~ 1 + x1 + x2 + x1:x2 + (1 + x1 | id.full)) where: y is the outcome variable. x1 is the level 1 predictor variable. x2 is the level

[R] Sig differences in Loglinear Models for Three-Way Tables

2010-04-14 Thread Sachi Ito
Hi all, I've been running loglinear models for three-way tables: one of the variables having three levels, and the other two having two levels each. An example looks like below: > yes.no <- c("Yes","No") > switch <- c("On","Off") > att <- c("BB","AA","CC") > L <- gl(2,1,12,yes.no) > T <- gl(

[R] Changing from 32-bit builds to 64-bit builds

2010-04-29 Thread Sachi Ito
Hi, Probably this is a very simple question for all the programmers, but how do you change from 32-bit builds (default) to 64-bit builds? I've been trying to run Anova to compare two models, but I get the following error message: Error: cannot allocate vector of size 1.2 Gb R(3122,0xa0ab44e0) ma

[R] Generalized Estimating Equation (GEE): Why is Link = Identity?

2010-04-29 Thread Sachi Ito
Hi, I'm running GEE using geepack. I set corstr = "ar1" as below: > m.ar <- geeglm(L ~ O + A, + data = firstgrouptxt, id = id, + family = binomial, corstr = "ar1") > summary(m.ar) Call: geeglm(formula = L ~ O + A, family = binomial, data = firstgrouptxt,

[R] QIC for GEE

2010-04-30 Thread Sachi Ito
Hi, I'm using 'geepack' to run Generalized Estimating Equations. I'm aware that I can use anova to compare two models, but would it be possible to test QIC on R? It seems that there were similar questions a couple of years ago, but the question has not been answered yet. I'd appreciate if someo

[R] Posthoc test for 3-way interaction (log-linear model)

2010-08-30 Thread Sachi Ito
Hi, I have analyzed my data using log-linear model as seen below: > yes.no <- c("Yes","No") > tk <- c("On","Off") > ats <- c("S","V","M") > L <- gl(2,1,12,yes.no) > T <- gl(2,2,12,tk) > A <- gl(3,4,12,ats) > n <- c(1056,4774,22,283,326,2916,27,360,274,1770,15,226) > library(MASS) > l.loglm <-

[R] Significance in GEE

2010-05-28 Thread Sachi Ito
Hi, I'm using 'geepack' and have a question regarding how to determine which variable is significant. Is Wald test the one to determine significance? If so, how is it calculated in regard to the estimate and standard error? Is there another test to show significance? Thank you, Sachi

[R] GEE: estimate of predictor with high time dependency

2010-06-08 Thread Sachi Ito
Hi, I'm analyzing my data using GEE, which looks like below: > interact <- geeglm(L ~ O + A + O:A, + data = data1, id = id, + family = binomial, corstr = "ar1") > summary(interact) Call: geeglm(formula = lateral ~ ontask + attachment + ontask:attachment, family = binomial, data = firstgroup

[R] xyplot of a specific ID number

2009-03-15 Thread Sachi Ito
Dear R list members, I have a question regarding xyplot. I managed to make a xyplot of all the IDs by using the syntax below: xyplot(PA ~ CRPC + CRPT | ID, data = redinteract) Now, I'd like to make a graph of a specific ID number (e.g., only ID number 301). I thought I could use "subset", but i

[R] coefficient graph

2009-03-17 Thread Sachi Ito
Dear R list members, I'd like to make a graph of coefficients of the intercept, variable 1, and variable 2 (and possibly the interaction between variable 1 and variable 2). When I use the lmList function as attached below, it shows a nice coefficient graph. > PACRP.lis <- lmList(PAffect ~ CRPC +

[R] How can we predict differences in a slope, given that the random component was significant?

2008-12-12 Thread Sachi Ito
Dear R users, Using R lme function, I found that both fixed and random effects of variable A on variable B are significant. Now, I'd like to analyze what variables are predicting differences in the slope. In other words, I'd like to know what variables (e.g., variable C) are predicting individua