[R-sig-ME] Binary variables used with lme model

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Jul 26 10:31:52 CEST 2010


Hi Igor,

If your response is binary, you must treat it as binary. Lme only works
with continuous data. Use glmer() from the lme4 package instead.

HTH,

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey
  

> -----Oorspronkelijk bericht-----
> Van: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] Namens Igor Blanco
> Verzonden: woensdag 21 juli 2010 18:23
> Aan: r-sig-mixed-models at r-project.org
> Onderwerp: [R-sig-ME] Binary variables used with lme model
> 
> Hi there,
> 
> I am trying to analyze some data using the lme package.
> My data contains continuous variables but there is one 
> specific variable called Newmarker that can only take 2 
> values (number 1 or number 2).
> I am interested in using this as a "flag" when I apply a lme 
> model I have used the as.factor trying to remark this fact 
> but an error message appears stating: attempt to set rownames 
> on object with no dimensions.
> 
> Here is the code I have used:
> 
> *Dataset <-   read.table("Data2.txt", header=TRUE, sep="", 
> na.strings="NA",
> dec=".", strip.white=TRUE)
> 
> Dataset$Newmarker <- as.factor(Dataset$Newmarker)
> 
> lme.1 <- lme(Newmarker ~ Age, data=Dataset,  random= ~1|ID)
> 
> summary(lme.1)*
> 
> If I don't use the as.factor I have no problems but the 
> results don't reflect the fact of my "binary" variable Newmarker..
> 
> Can anybody help me please?
> 
> Thanking you in advance,
> 
> Much appreciated,
> 
> Igor Blanco
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 

Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.




More information about the R-sig-mixed-models mailing list