-
Notifications
You must be signed in to change notification settings - Fork 6
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
prep.regimes working? #43
Comments
Original comment by Michael Hunter (Bitbucket: mhunter, GitHub: mhunter). There is at least one typo in your code. There's an extra comma in the params matrix. Here's a corrected version.
The covariates slot is not currently populated. Rather, it is assumed that the C co_variates argument common to many of these functions is the same one referred to in prep.regimes. I believe issue #34 is intended to update this. |
Original comment by Sy-Miin Chow (Bitbucket: symiin, GitHub: symiin). Fixing the typo changed the locations of the parameters that didn't get updated in the optimization, but still not working (some parameters still didn't get updated). Do you see any other errors in my use of prep.regimes? My covariate names already matched the names of the covariates I sent to dynr.data. colnames(thedata) = c("ID","Time","y1","y2","x1","x2") Also, doing cat(writeCcode(regimes)$c.string) gave error: |
Original comment by Michael Hunter (Bitbucket: mhunter, GitHub: mhunter). I don't see anything obvious. Maybe we're having trouble with your parameter names? The underscores, commas, and the curly braces might be throwing something off. You should be able to inspect the C code for the regime-switching with
provided that Try
|
Original comment by Sy-Miin Chow (Bitbucket: symiin, GitHub: symiin). The generated C code doesn't use the covariates correctly. See below. Can you check your function for converting from prep.regimes to c code to make sure that the covariates are being used correctly?
} |
Original comment by Michael Hunter (Bitbucket: mhunter, GitHub: mhunter). Argh! There was a very tiny change that now produces
Does there version updated with 84a963f work for you? The version in the repo still has to have the transformation function updated. |
Original report by Sy-Miin Chow (Bitbucket: symiin, GitHub: symiin).
Prep.regimes doesn't seem to be working correctly with covariates.
I specified this model where the covariates x1 and x2 are used to predict the LO parameters associated with the (1,1) and (2,1) elements of the transition probability matrix. When I printed out the specified model, I got
Slot "covariates":
character(0)
When optimizing the full model (RS-linearODE), the parameters for the covariates don't seem to be updated at all. Looking at prep.regimes, I also didn't see how the covariates were actually used inside prep.regimes.
The text was updated successfully, but these errors were encountered: