I try to analyze an ESM-Data-Frame
, but have huge problems with my time-Variable
?
I am getting this error message:
covariate must have unique values within groups for corar1 objects
I really don't know what to do?
I created the time differences in hours:
final$zeit_ref_1 = difftime(time_1, zeit1, units='hours')
final$zeit_ref_1
## Time differences in hours
## [1] 0.000000 6.115833 10.131667 22.661667 25.683333 27.605278
## [7] 31.344444 31.975000 45.032500 47.509167 70.965000 73.723056
## [13] 73.912222 80.163889 95.492500 98.698333 99.513889 102.221667
## [19] 104.366389 119.118889 121.563611 123.370278 128.050556 142.080833
And this is the model I tried to run:
lme(gluecklich ~ angenehm, data = final, random = ~1|Subject_ID, correlation = corCAR1(form=~zeit_ref_1|Subject_ID))
King regards, Christoph