Comments (5)
Not sure how this works. Does this fix mean that in the updated mmrm package, we will be able to derive the LSmeans values using emmeans?
Yes the error is fixed. you are able to derive the ls means with emmeans and see update https://github.com/openpharma/mmrm/pull/450/files (there is also a test)
Another question, in SAS proc mixed, there is an option “nobound” for the variance to allow negative variance, is this implemented in mmrm?
I believe this is totally another story, to allow negative variance. The current parameterization does not allow for that.
Also I am not completely follow Liming’s initial comments, since in my model, I did have visit as a fixed effect in the model, and generated a second numeric variable (time) to model the variace. I noticed that the variance matrix results is displayed a little bit differently when using sp_exp as an option, which might contribute to the NA calculating the LSmeans values?
here for spatial covariance structure, I was using "visit" to refer to all the timing variables, that includes the "visit" you used as fixed effect, and also the "numeric variable (time)". The results should be displayed differently because spatial exponential only calculates the distance between each visit (under my terminology) so we only provide the correlation matrix where the distance is 1. This is not related to the bug you mentioned, and this bug is resolved in the latest mmrm package. Please try it out on github version and let me know if everything is working for you!
Thank you again for spotting this issue and feedback!
from mmrm.
Thanks Hui-Rong for reporting this problem! We are going to look at this with high priority.
from mmrm.
root cause of the issue:
- if visit is not a fixed effect, then it should not be included as a valid choice in emmeans spec. e.g. the formula is
y ~ arm + us(visit|id)
, then visit should not be used inemmeans(fit, ~ visit)
- however in previous versions we allow for that (to allow users to see the ls means for each visit, although they are the same)
- for spatial covairance structure, the visit is a numeric value. the coefficient for that value is NA. in addition,
X
is not full rank (because the numerical visit is not part of the fixed effect) and there is no linear combinations of x to create theL
such that$L\beta$ is estimable
current implementation will discard the visit if the covariance structure is spatial, but I think it will be a better choice to gradually deprecate the use of emmeans(fit, ~ visit)
if visit is not part of a fixed effect.
from mmrm.
from mmrm.
Thanks @hqian-lilly ,
@clarkliming would you like to have a look?
from mmrm.
Related Issues (20)
- L-BFGS-B divergence however error code is not correct HOT 2
- Need to document `VISITN` and `VISITN2` in `fev_data`
- Type III tests fail for character covariates
- avoid CRAN warning
- URGENT! Failed CRAN Checks: 2024-03-10 HOT 1
- [Question] Random intercept model HOT 6
- support for `{marginaleffects}`
- Reproducibility issue: There's a discrepancy in coefficient estimates when altering the variable order within the formula. HOT 5
- predict() does not work when variables are transformed within formula HOT 2
- fix note
- Add positive definiteness check of `theta_vcov` to `h_mmrm_tmb_check_conv()`
- Change Daniel's email address
- Add an application vignette HOT 6
- Please help on the Error message below HOT 1
- emmeans result not correct when log-transformed covariate is used HOT 9
- When `AVISIT` is an ordered factor and I manually set contrasts, my custom contrasts seem to be ignored:
- Add an S3 method AICc(object, ...) HOT 2
- Request to add feature for transformed residuals HOT 3
- Contrast ordering - dicrepancy between SAS PROC MIXED and {mmrm} HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmrm.