-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-convergence and errors with random effects models using mblogit #7
Comments
Hi Rebecca Taylor,
Am Donnerstag, den 28.05.2020, 13:03 -0700 schrieb rebeccaltaylor:
Hi. I was using the CRAN version of package mclogit and none of my
random effects models using the mblogit command converged, whether or
not I used the control argument. I read an online post from another
user who encountered this and said it was a package error that had
been fixed in the version currently on Github, so I installed that
version. The random effects model still fails to converge if I do not
use the control argument and the summary warns, "In
sqrt(diag(vcov.phi)) : NaNs produced." I understand my data may
simply be unable to support a random effects model. However, I tried,
but failed, to implement the control argument in the Github version
of the package.
Here is the command and error message when I use control =
mmclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment,
data=HO,
control=mmclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE,
trace.inner=FALSE, avoid.increase = FALSE,break.on.increase = FALSE,
break.on.infinite = FALSE, break.on.negative = FALSE))
Error in mmclogit.control(epsilon = 1e-12, maxit = 100, trace =
TRUE, :
could not find function "mmclogit.control"
Thanks of for the bug report. Indeed, I forgot to include
mmclogit.control among the namespace exports. The reason I did not
notice this is that there is no need to call mmclogit.control
explicitly, because all extraneous arguments to mclogit or mblogit are
passed on to mclogit.control or mmclogit.control, respectively. The
following code should work without this error message appearing:
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min,
random=~1|Deployment, data=HO, epsilon = 1e-
12, maxit = 100))
The other arguments you pass to mmclogit.control are defaults, so there
is no need to specify them either.However, I would advise against using
such a small epsilon, because it might make convergence infeasible as
it goes beyond the limits of a computer's precision. Usually you would
use an epsilon like 1e-6 or 1e-7. So better use
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min,
random=~1|Deployment, data=HO, maxi
t = 100))
Here is the command and error message when I use control =
mclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment,
data=HO,
control=mclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE))
Error in mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z =
ZD, : object 'step.truncated' not found
Another bug, easy to fix (and soon).
… In addition: Warning messages:
1: In mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z = ZD, :
Numeric problems in inner iteration, bailing out
2: Algorithm did not converge
Anything you could do to help me would be wonderful. Thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#7",
"url": "#7",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
Just created release 0.8.2.1, where this is hopefully resolved. |
Thank you!!!
…________________________________
From: Martin Elff <notifications@github.com>
Sent: Thursday, May 28, 2020 1:47 PM
To: melff/mclogit <mclogit@noreply.github.com>
Cc: Taylor, Rebecca L <rebeccataylor@usgs.gov>; Author <author@noreply.github.com>
Subject: [EXTERNAL] Re: [melff/mclogit] non-convergence and errors with random effects models using mblogit (#7)
Just created release 0.8.2.1<https://github.com/melff/mclogit/releases/tag/0.8.2.1>, where this is hopefully resolved.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACARZ6UPJ4EBAQUEZKJ2KJLRT3LXXANCNFSM4NNMJVTQ>.
|
Thank you again, Martin.
I ran the following commands, and the call printed 100 iterations, so I assume everything is working.
devtools::install_github("melff/mclogit",subdir="pkg")
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment, data=HO, maxit = 100)
The reason I previously had the defaults listed for the other arguments was as a place holder until I could figure out how I might change them in order to help achieve convergence. Can you point me to any material that explains the other arguments and how to use them if convergence is not being achieved?
Thank you!
Rebecca
________________________________
From: Martin Elff <notifications@github.com>
Sent: Thursday, May 28, 2020 1:24 PM
To: melff/mclogit <mclogit@noreply.github.com>
Cc: Taylor, Rebecca L <rebeccataylor@usgs.gov>; Author <author@noreply.github.com>
Subject: [EXTERNAL] Re: [melff/mclogit] non-convergence and errors with random effects models using mblogit (#7)
Hi Rebecca Taylor,
Am Donnerstag, den 28.05.2020, 13:03 -0700 schrieb rebeccaltaylor:
Hi. I was using the CRAN version of package mclogit and none of my
random effects models using the mblogit command converged, whether or
not I used the control argument. I read an online post from another
user who encountered this and said it was a package error that had
been fixed in the version currently on Github, so I installed that
version. The random effects model still fails to converge if I do not
use the control argument and the summary warns, "In
sqrt(diag(vcov.phi)) : NaNs produced." I understand my data may
simply be unable to support a random effects model. However, I tried,
but failed, to implement the control argument in the Github version
of the package.
Here is the command and error message when I use control =
mmclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment,
data=HO,
control=mmclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE,
trace.inner=FALSE, avoid.increase = FALSE,break.on.increase = FALSE,
break.on.infinite = FALSE, break.on.negative = FALSE))
Error in mmclogit.control(epsilon = 1e-12, maxit = 100, trace =
TRUE, :
could not find function "mmclogit.control"
Thanks of for the bug report. Indeed, I forgot to include
mmclogit.control among the namespace exports. The reason I did not
notice this is that there is no need to call mmclogit.control
explicitly, because all extraneous arguments to mclogit or mblogit are
passed on to mclogit.control or mmclogit.control, respectively. The
following code should work without this error message appearing:
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min,
random=~1|Deployment, data=HO, epsilon = 1e-
12, maxit = 100))
The other arguments you pass to mmclogit.control are defaults, so there
is no need to specify them either.However, I would advise against using
such a small epsilon, because it might make convergence infeasible as
it goes beyond the limits of a computer's precision. Usually you would
use an epsilon like 1e-6 or 1e-7. So better use
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min,
random=~1|Deployment, data=HO, maxi
t = 100))
Here is the command and error message when I use control =
mclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment,
data=HO,
control=mclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE))
Error in mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z =
ZD, : object 'step.truncated' not found
Another bug, easy to fix (and soon).
In addition: Warning messages:
1: In mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z = ZD, :
Numeric problems in inner iteration, bailing out
2: Algorithm did not converge
Anything you could do to help me would be wonderful. Thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#7",
"url": "#7",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACARZ6WPV7A2M3OZJE2M4F3RT3JBNANCNFSM4NNMJVTQ>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I was using the CRAN version of package mclogit and none of my random effects models using the mblogit command converged, whether or not I used the control argument. I read an online post from another user who encountered this and said it was a package error that had been fixed in the version currently on Github, so I installed that version. The random effects model still fails to converge if I do not use the control argument and the summary warns, "In sqrt(diag(vcov.phi)) : NaNs produced." I understand my data may simply be unable to support a random effects model. However, I tried, but failed, to implement the control argument in the Github version of the package.
Here is the command and error message when I use control = mmclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment, data=HO,
control=mmclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE,
trace.inner=FALSE, avoid.increase = FALSE,break.on.increase = FALSE,
break.on.infinite = FALSE, break.on.negative = FALSE))
Error in mmclogit.control(epsilon = 1e-12, maxit = 100, trace = TRUE, :
could not find function "mmclogit.control"
Here is the command and error message when I use control = mclogit.control
MBLrW <- mblogit(aBehavior ~ Trt15_25_5min, random=~1|Deployment, data=HO,
control=mclogit.control(epsilon = 1e-12, maxit = 100, trace=TRUE))
Error in mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z = ZD, : object 'step.truncated' not found
In addition: Warning messages:
1: In mmclogit.fitPQLMQL(y = Y, s = s, w = weights, X = XD, Z = ZD, : Numeric problems in inner iteration, bailing out
2: Algorithm did not converge
Anything you could do to help me would be wonderful. Thank you.
The text was updated successfully, but these errors were encountered: