[R-sig-ME] Error in logLik.reStruct(object, conLin) : NA/NaN/Inf in foreign function call (arg 3) when Exponential Correlation added to model
bbo|ker @end|ng |rom gm@||@com
Tue Apr 19 17:43:19 CEST 2022
PS can you perhaps find a subset of women for which it *breaks*? e.g.
* run the model on the first half of the data (the first 5834 women)
* run the model on the second half of the data
see if either half gives the error. If so, subdivide the 'bad' half
of the data and continue ...
On 4/19/22 9:54 AM, Esan, Oluwaseun wrote:
> 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]]
> R-sig-mixed-models using r-project.org mailing list
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics
More information about the R-sig-mixed-models