[R-lang] Re: Random slopes

Levy, Roger rlevy@ucsd.edu
Sat Jan 1 14:15:31 PST 2011


On Dec 30, 2010, at 5:59 PM, Alex Fine wrote:

> 
> 
> Zhenguang Cai wrote:
>> In determining whehter to include 
>> the by-subject slope for the main effect of A (in a 2*2 design), shall 
>> I just compare two simple models with A as the predictor only, as in 
>> the following:
>> 
>> model1 <- lmer (Y~A+(1|Subject)+(1|Item), data=dat, family=binomial)
>> model2 <- lmer (Y~A+(A+1|Subject)+(1|Item), data=dat, family=binomial)
>> 
>> or shall I do it between two full models, as the following:
>> 
>> model1 <- lmer (Y~A*B+(1|Subject)+(1|Item), data=dat, family=binomial)
>> model2 <- lmer (Y~A*B+(A+1|Subject)+(1|Item), data=dat, family=binomial)
> if the model you're interested in working with is Y ~ A*B, then you'd 
> want to do the latter comparison.  that way you're asking if a random 
> by-subject slope for A is justified for the model you're interested in 
> using to analyze your data.  if you're doing stepwise regression and 
> adding one predictor at a time, then it's more complicated.  but you 
> already said it's a 2x2 design, so it sounds like this isn't relevant.
> 
> right, everyone?

Garry:

I think Alex is hitting the nail on the head in the sense that you haven't made completely clear what the goal of your statistical analysis is.  Usually it's easier to determine what model comparisons to make once the modeling goals are articulated fully.

Best & Happy New Year to all!

Roger

--

Roger Levy                      Email: rlevy@ucsd.edu
Assistant Professor             Phone: 858-534-7219
Department of Linguistics       Fax:   858-534-4789
UC San Diego                    Web:   http://idiom.ucsd.edu/~rlevy












More information about the ling-r-lang-L mailing list