[R] lme4 question

David Winsemius dwinsemius at comcast.net
Wed Jul 19 02:28:10 CEST 2017


Not really the correct mailing list. Please read the Posting Guide and re-submit a plain text version to R-SIG-mixed-models

https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


-- David.
> On Jul 18, 2017, at 3:43 PM, Ahreum Maeng <amaengwork at gmail.com> wrote:
> 
> Hello,
> 
> I am trying to run the following model:
> 
> domi ~ type*ratio+((1|id)+(0+type|id)+(1|face_id)+(1|car_id))
> 
> My question is whether the data coding for "face_id" and "car_id" variables
> is correct.

I don't know if that can be answered. Better would be to submit the results of:

 dput(sample_data_object)


> As you see on the following sample data structure, "type" is repeated
> measure where 1=car, 0=face. Thus, I coded "face_id" as "0" when the type
> is 1 (car) and coded "car_id" as "0" when type is 0 (face). Would it be a
> right way to deal with this repeated measure issue?
> 
> ​id type    face_id   car_id ratio    domi
> 1   1        0       1 high     3.14
> 2   1        0       2 medi    4.67
> 3   1        0       3 low      4.23
> 4   1        0       4 low     7 ​
> ​1   0        1       0 high     3.00
> 2   0        2       0 medi    4.77
> 3   0        3       0 low      4.25
> 4   0        4       0 low     7.12 ​​
> 
> T
> ​hank you so much for your help in advance and I look forward to hearing
> from you.
> 
> Thanks,
> Ahreum​
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list