[R-sig-ME] Error in logLik.reStruct(object, conLin) : NA/NaN/Inf in foreign function call (arg 3) when Exponential Correlation added to model
O|uw@@eun@E@@n @end|ng |rom ||verpoo|@@c@uk
Tue Apr 19 15:54:57 CEST 2022
Dear List Members,
I am relatively new to R and Mixed Effects Models using LME.
I am unable to post sample data:
I am trying to get the effect of pregnancy on lung function and age on women with a certain genetic condition. We know lung function declines with age in people with the condition but we do not know the effect pregnancy has on this relationship.
I have repeat measurements of lung function measured up to 4 times in a year for up to 14 years for each woman (A total of 331,722 observations for 11668 women).
I am having problems when trying to add an exponential serial correlation to a validated model.
covariate 1= age
M1<-lme(lung function~age +covariate1+covariate2+covariate3+ timesincepregnancy ,data=df5,random=~1+age|id, na.action=na.exclude, method ="ML", control=lmeControl(opt='optim'), corr=corExp(form=~age|id, nugget=T))
The following error occurs:
Error in logLik.reStruct(object, conLin) :
NA/NaN/Inf in foreign function call (arg 3)
When I run it on random sample of 40 women it runs without an error. Is there any further processing I need to do on the data? I have already removed duplicates.
Previous studies have shown exponential correlation structure is the best fit for the data but I cannot seem to get this to work on the dataset I have.
All the best,
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models