Hi, I was trying to do a multi-level modeling of the data using the nlme
package. I encounter the following message:
> addRandomSlopeRange<- lme(FAN.range ~ CHN.range + Age + Block.T,
data=data.block, random = ~CHN.range|CHI, method = "ML",
na.action=na.omit)
Error in lme.formula(FAN.range ~ CHN.range + Age + Block.T, data data.block, :
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (10)
I get this error message only when FAN.range or FAN.avg is used as the
dependent variable.
> head(data.block)
Block.N Block.T CHI Age CHN.avg FAN.avg CHN.min FAN.min CHN.max
1 3 AICF C003 765 8.676307 7.257332 7.619782 5.033533 9.428432
2 25 AICF C003 765 8.227647 6.475297 4.853860 4.452857 10.430625
3 32 AICF C003 765 8.381634 6.720497 6.700553 4.977628 9.049861
4 50 AICF C003 765 8.113471 6.037453 6.294747 4.958514 9.593018
5 59 AICF C003 765 8.301553 7.444806 7.587508 4.808462 10.975600
6 61 AICF C003 765 7.895683 6.319403 4.455857 4.198858 11.331577
FAN.max CHN.rate FAN.rate CHN.dur FAN.dur CHN.range FAN.range
1 9.995912 2.093333 2.394000 0.6333333 1.984000 1.808650 4.962380
2 8.296612 2.530000 2.910000 1.5800000 1.335000 5.576765 3.843754
3 9.275749 2.460000 2.767500 0.8200000 1.862500 2.349308 4.298121
4 7.914313 2.604286 3.112500 1.0533333 1.206250 3.298271 2.955799
5 11.436886 2.260000 2.730000 1.3300000 2.200000 3.388092 6.628425
6 10.865545 3.000000 2.766667 1.0000000 1.526667 6.875720 6.666687
The following work fine:
addRandomSlopeAvg<- lme(CHN.avg ~ FAN.avg + Age + Block.T, data=data.block,
random = ~FAN.avg|CHI, method = "ML", na.action=na.omit)
addRandomSlopeRange<- lme(CHN.range ~ FAN.range + Age + Block.T,
data=data.block, random = ~FAN.range|CHI, method = "ML",
na.action=na.omit)
addRandomSlopeMin<- lme(FAN.min ~ CHN.min + Age + Block.T, data=data.block,
random = ~CHN.min|CHI, method = "ML", na.action=na.omit)
addRandomSlopeMax<- lme(FAN.max ~ CHN.max + Age + Block.T, data=data.block,
random = ~CHN.max|CHI, method = "ML", na.action=na.omit)
It is really strange that the script runs fine for minimum and maximum
values but not for the average. Does anyone have an insight?
[[alternative HTML version deleted]]