Giter Club home page Giter Club logo

Comments (5)

clarkliming avatar clarkliming commented on August 16, 2024 1

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.

danielinteractive avatar danielinteractive commented on August 16, 2024

Thanks Hui-Rong for reporting this problem! We are going to look at this with high priority.

from mmrm.

clarkliming avatar clarkliming commented on August 16, 2024

root cause of the issue:

  1. 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 in emmeans(fit, ~ visit)
  2. however in previous versions we allow for that (to allow users to see the ls means for each visit, although they are the same)
  3. 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 the L 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.

hqian-lilly avatar hqian-lilly commented on August 16, 2024

from mmrm.

danielinteractive avatar danielinteractive commented on August 16, 2024

Thanks @hqian-lilly ,
@clarkliming would you like to have a look?

from mmrm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.