-
Notifications
You must be signed in to change notification settings - Fork 5
compute_roots for only some of the roots? #39
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
Comments
This feature would really depend more on the root finding function than |
I am nearly certain that rootSolve has this feature. I will reply with more info in a few days.
- Brian
Sent from my phone; please excuse any typos
On Sep 15, 2017, at 11:34 AM, Bradley Saul <[email protected]<mailto:[email protected]>> wrote:
This feature would really depend more on the root finding function than geex itself I think. It's this functionality built into rootSolve? To be honest, I've looked at the documentation that closely, but I have a vague recollection of this feature.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMTSsraRNAIs7jXlXBGbuaMz4WqUZSc4ks5siqcngaJpZM4PSCU1>.
|
Briefly looking into the docs, maybe `rootSolve` doesn’t have this feature added in.
It does have the argument `positive`, which I think I was thinking of. In the docs for `rootSolve::stode()` it says:
positive: either a logical or a vector with indices of the state variables that have to be nonnegative;
if TRUE, all state variables y are forced to be non-negative numbers.
However, I think that in this issue ticket we would need to devise a function that takes `compute_roots = c(FALSE, FALSE, TRUE)` and splits the parameters manually. I think that it can be done with `multiroot()` but each other solver would need its own helper function, I think. Does that seem right?
- - - - - - - - - - - - - - - - - -
Brian Barkley, MS
PhD Candidate, Department of Biostatistics
UNC Gillings School of Global Public Health
Email: [email protected]
From: Bradley Saul [mailto:[email protected]]
Sent: Friday, September 15, 2017 12:35 PM
To: bsaul/geex
Cc: Barkley, Brian G; Author
Subject: Re: [bsaul/geex] compute_roots for only some of the roots? (#39)
This feature would really depend more on the root finding function than geex itself I think. It's this functionality built into rootSolve? To be honest, I've looked at the documentation that closely, but I have a vague recollection of this feature.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMTSsraRNAIs7jXlXBGbuaMz4WqUZSc4ks5siqcngaJpZM4PSCU1>.
|
On further reflection, I don't know if this is possible with |
Perhaps I’m reading this wrong.
Let’s say theta is of length 2 and you want to solve for the 2nd element while keeping the 1st element fixed.
Could you supply the 1st element as a fixed parameter/argument to the solver, and then ask to solve only for the 2nd element?
In crappy pseudo-code,
##theta == c(fixed, to_solve_for)
solved <- solver( starting=to_solve_for, function=myFun, other_args = list(fixed=fixed))
- - - - - - - - - - - - - - - - - -
Brian Barkley, MS
PhD Candidate, Department of Biostatistics
UNC Gillings School of Global Public Health
Email: [email protected]
From: Bradley Saul [mailto:[email protected]]
Sent: Monday, September 18, 2017 11:00 AM
To: bsaul/geex
Cc: Brian G. Barkley; Author
Subject: Re: [bsaul/geex] compute_roots for only some of the roots? (#39)
On further reflection, I don't know if this is possible with multiroot or even in general. The issue: in order to find roots using Newton-Raphson, multiroot is computing the Jacobian of the G_m = sum(psi(theta)) function. If some element of theta is "fixed", then the root solver can't compute the derivative with respect to that element of theta. How might this affect finding root with respect to the non-fixed elements of theta?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMTSsqHMJj_Qb2vhYPymZVGF_TEC_h80ks5sjoVogaJpZM4PSCU1>.
|
Let's discuss in person tomorrow. I need to discuss using math.
…On Mon, Sep 18, 2017 at 11:08 AM, Brian G. Barkley ***@***.*** > wrote:
Perhaps I’m reading this wrong.
Let’s say theta is of length 2 and you want to solve for the 2nd element
while keeping the 1st element fixed.
Could you supply the 1st element as a fixed parameter/argument to the
solver, and then ask to solve only for the 2nd element?
In crappy pseudo-code,
##theta == c(fixed, to_solve_for)
solved <- solver( starting=to_solve_for, function=myFun, other_args =
list(fixed=fixed))
- - - - - - - - - - - - - - - - - -
Brian Barkley, MS
PhD Candidate, Department of Biostatistics
UNC Gillings School of Global Public Health
Email: ***@***.***
From: Bradley Saul ***@***.***
Sent: Monday, September 18, 2017 11:00 AM
To: bsaul/geex
Cc: Brian G. Barkley; Author
Subject: Re: [bsaul/geex] compute_roots for only some of the roots? (#39)
On further reflection, I don't know if this is possible with multiroot or
even in general. The issue: in order to find roots using Newton-Raphson,
multiroot is computing the Jacobian of the G_m = sum(psi(theta)) function.
If some element of theta is "fixed", then the root solver can't compute the
derivative with respect to that element of theta. How might this affect
finding root with respect to the non-fixed elements of theta?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://github.com/
bsaul/geex#39#issuecomment-330251094>, or mute the thread<
https://github.com/notifications/unsubscribe-
auth/AMTSsqHMJj_Qb2vhYPymZVGF_TEC_h80ks5sjoVogaJpZM4PSCU1>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEqCLh0L9M1A6v6Nz9V6z4iUI3eRZImzks5sjodWgaJpZM4PSCU1>
.
|
I think there may be a situation where someone has, say,
delta
) to estimate that may be most easily handled with an equation solver.For the model the easiest thing is to probably fit the model & pass it into geex. But for
delta
., you may want to use the root solver.It may be nice in this case to allow for
compute_roots = c(FALSE, FALSE, TRUE)
so that the (p=2) model parameters are ignored in the solver, but the solver does solve fordelta_hat
.This is a future-feature; nothing urgent. Your thoughts?
The text was updated successfully, but these errors were encountered: