[R] LINEAR MIXED EFFECT

Douglas Bates bates at stat.wisc.edu
Thu Nov 12 17:17:52 CET 2009


On Thu, Nov 12, 2009 at 10:14 AM, milton ruser <milton.ruser at gmail.com> wrote:
> Hi Ana,
>
> I am not quite sure if it is the problem, but if you call your data.frame as
> exp,
> you will crash exp() function... try use another name for your data.frame.
>
> By the way, I suggest you not use attach().
>
> Try something like model<-lme(weight~date*diet, data=yourdataframe)
>
> good luck

and include the random specification in the call to lme, not as a
separate assignment.

> milton
>
> On Thu, Nov 12, 2009 at 5:43 AM, ANARPCG <a.gouveia07 at imperial.ac.uk> wrote:
>
>>
>>
>>
>>
>> Milton's point is dead-on, and I would highly encourage you to give the
>> posting guide a look.
>>
>> That said... you might try "na.action = na.omit" in your call to...
>> actually, we don't know what function you are using (see first point).
>> Regardless, sounds like you have missing data and na.action is set to
>> na.fail (ie, "fail" if any missing data).
>>
>> cheers, Dave
>>
>>
>> milton ruser wrote:
>> >
>> > Dear Ana Golveia,
>> >
>> > It is completelly impossible someone realise what kind or help you need
>> or
>> > what is happening. I suggest you give a look on the posting guide, mainly
>> > that part about a minimum reproducible code with self explaining
>> > information, etc.
>> >
>> > Cheers
>> >
>> > milton
>> >
>> > On Wed, Nov 11, 2009 at 7:22 AM, ANARPCG <a.gouveia07 at imperial.ac.uk>
>> > wrote:
>> >
>> >>
>> >> CAN ANYONE PLEASE HELP ME WITH THIS
>> >> i HAVE TO DO A MIXED EFFECT LINEAR MODEL WITH MY DATA DUE TO THE FACT
>> >> THAT
>> >> I
>> >> have pseudoreplication!
>> >> Although after reading and trying it for several times can get around
>> due
>> >> to
>> >> "Error in na.fail.default(list(date = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,
>> >> :
>> >> missing values in object"
>> >> I uploaded my data file
>> >> Thank you so much
>> >> Kind regards
>> >> AG
>> >> http://old.nabble.com/file/p26300394/rawoctobercalciumexperiment2.txt
>> >> rawoctobercalciumexperiment2.txt
>> >>
>> >> --
>> >> View this message in context:
>> >> http://old.nabble.com/LINEAR-MIXED-EFFECT-tp26300394p26300394.html
>> >> Sent from the R help mailing list archive at Nabble.com.
>> >>
>> >> ______________________________________________
>> >> R-help at r-project.org mailing list
>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>> >> PLEASE do read the posting guide
>> >> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> <http://www.r-project.org/posting-guide.html>
>> >> and provide commented, minimal, self-contained, reproducible code.
>> >>
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> > and provide commented, minimal, self-contained, reproducible code.
>> >
>> > sorry I am new on this things
>> > the point is after trying to run the model all that happens is:
>> >> exp<-read.table(file=file.choose(),header=T)
>> >> attach(exp)
>> >> names(exp)
>> > [1] "group"     "date"      "diet"      "weight"    "thickness" "length"
>> > [7] "width"     "liplength" "lipwidth"
>> >>
>> exp$diet=factor(exp$diet,levels=c("zeropercent","tenpercent","twentypercent","thirtypercent","fortypercent","cuttleprecent"))
>> >> exp=na.omit(exp)
>> >> library(nlme)
>> >> random=~date
>> >> model<-lme(weight~date*diet)
>> > Error in na.fail.default(list(date = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,  :
>> >   missing values in object
>> >
>> >  I have pseudoreplications due to the fact that the measurements of the
>> > replicates have different starting points so I was advised to do lme. I
>> > never used it before and I cant get arround with it! the help I wanted
>> > from you is to help me to understand how to do a "runable" model!
>> >
>> >
>> >
>> http://old.nabble.com/file/p26315302/rawoctobercalciumexperiment2.txt
>> rawoctobercalciumexperiment2.txt
>> --
>> View this message in context:
>> http://old.nabble.com/LINEAR-MIXED-EFFECT-tp26300394p26315302.html
>>  Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list