[R-lang] Re: lme with continuous dependent variable

Steven Piantadosi piantado@mit.edu
Mon Jun 21 20:28:53 PDT 2010


Hi Andries,

> Here is one question that may help me figure out the first step to
> take: I have a set of data with both continuous and discrete
> independent variables, and with a continuous dependent variable. Is
> this something on which I could do a mixed effects a al lme type
> analysis? 

Yes!

> Or is this appropriate only for cases where the dependent
> variable is discrete? 

The easiest kind of (lme or lm) regression is one where the dependent
variable is continuous, like you have. For these, you don't need to
specify a family: the default is to predict the continuous dependent
variable from a linear combination of the predictors, with gaussian
noise. You just have to be sure the check the assumptions of the
regression using regression diagnostics (things like, the effects are
linear, the noise is gaussian, your effect is not driven by outliers).
This works for both continuous and discrete independent variables (but
you might want to read up on ways of coding the discrete independent
variables when you want to get fancy.)

There are other kinds of regressions when you have a discrete dependent
variable (Poisson regressions are typically for count data; logistic
regressions are for binary responses), in which case you can use
something like glmer and specify the family appropriately. 

It's sounds like you're just getting started, so I would suggest two
books that might help, both of which use R:

- Baayen - Linguistic Data Analysis - will help get you oriented in R
and analyzing linguistic data

- Gelman & Hill - Data Analysis Using Regression and
Multilevel/Hierarchical Models - this has more details about regular old
regression, including several different types (like logistic and
poisson, etc), as well as a great discussion of multilevel models. 

Best,

++Steve




> And if I can do this with lme, what would the
> "family" be? Binomial or Poisson, or something else all together?
> 
> Thank you,
> 
> Andries
> 
> ----------------------------------------------
> Andries W. Coetzee
> 
> Department of Linguistics
> University of Michigan
> 440 Lorch Hall
> 611 Tappan Street
> Ann Arbor
> MI 48109
> 
> Tel:  (734) 764-0353
> Fax: (734) 936-3406
> 
> E-mail: coetzee@umich.edu
> Web: www.umich.edu/~coetzee




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