[R-sig-ME] How does one include a factor in a groupedData object; What is the meaning and use of inner and outer parameters of groupedData object?

Sorkin, John jsorkin at som.umaryland.edu
Thu Mar 22 16:07:09 CET 2018


Forgive my resending the message. I believe my last email was sent as HTML. I am sending this again in, what I hope will be plain text format.


Several questions relating to groupedData:

(1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my model? See code and error below.

(2) I have read the help file for groupedData multiple times. I am unable to understand the meaning or, or the use for the inner= and outer= parameters in the call to groupedData. Can someone either explain the meaning of these parameters or refer me to a source that give a clear explanation?


> fit0 <- lmer(THmean~INTRVNTN+factor(TimePtID)+INTRVNTN*factor(TimePtID)+(1|PatientID),data=smalldata)
> sdgd <- groupedData(THmean~INTRVNTN+TimePtID+INTRVNTN*TimePtID|PatientID,data=smalldata)
Warning messages:
1: In Ops.factor(INTRVNTN, TimePtID) : �+� not meaningful for factors
2: In Ops.factor(INTRVNTN, TimePtID) : �*� not meaningful for factors


Thank you,

John


John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)


________________________________________
From: R-sig-mixed-models <r-sig-mixed-models-bounces at r-project.org> on behalf of Sorkin, John <jsorkin at som.umaryland.edu>
Sent: Thursday, March 22, 2018 11:02 AM
To:  R-mixed models mailing list
Subject: [R-sig-ME] How does one include a factor in a groupedData object; What is the meaning and use of inner and outer parameters of groupedData object?

[This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]

Several questions relating to groupedData:

(1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my model? See code and error below.

(2) I have read the help file for groupedData multiple times. I am unable to understand the meaning or, or the use for the inner= and outer= parameters in the call to groupedData. Can someone either explain the meaning of these parameters or refer me to a source that give a clear explanation?


> fit0 <- lmer(THmean~INTRVNTN+factor(TimePtID)+INTRVNTN*factor(TimePtID)+(1|PatientID),data=smalldata)
> sdgd <- groupedData(THmean~INTRVNTN+TimePtID+INTRVNTN*TimePtID|PatientID,data=smalldata)
Warning messages:
1: In Ops.factor(INTRVNTN, TimePtID) : �+� not meaningful for factors
2: In Ops.factor(INTRVNTN, TimePtID) : �*� not meaningful for factors


Thank you,

John




John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


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