Skip to content

Simplify model specification: don't duplicate ETA #189

@FelicienLL

Description

@FelicienLL

Starting from version 1.0.8, mrgsolve can simulate from a specific set of ETAs thanks to the etasrc = "data" argument. This is an opportunity to remove the need to declare ETAs in $PARAM in the model code. Some issues remain pending about backward compatibility and the general workflow (from estimations to simulations). We are just thinking out loud here.

Think about:

  • Backward compatibility; what if ETA are still declared in $PARAM? Should mapbayr behave differently as function of the version of mrgsolve? i.e. if mrgsolve >= 0.8 and ETAs declared, ask to remove them?
  • change check_mapbayr_model(), check_mapbayr_data() and check_mapbayr_modeldata() consequently.
  • major release tag for mapbayr ?
  • estimation step: update from the dataset. from a technical point of view, this can be achieved even without the etasrc argument.

The "posterior" simulation step:

use_posterior() currently returns the model object with updated values of ETA in $PARAM. This way, we can run "regular" simulations easily, nothing being specific to mapbayr. This would not be possible anymore since the information about ETA is not carried by the model object anymore. Also remind that use_posterior() can also return a Gaussian approximation of the posterior in $OMEGA, useful for a rough appreciation of parameter uncertainty. What to do?

  • A function that returns a new class of object, like "mapbayr model", and simulate from this...? Would need to define every methods existing for mrgmod objects.
  • A function that extracts and merge ETAs to a dataset? Such as
model %>%
  data_set(with_estimated_eta(data, est)) %>% 
  mrgsim()

model %>%
  data_set(data) %>%
  with_estimated_eta(est) %>%
  mrgsim()

Also remind that use_posterior() can also return a gaussian approximation of the posterior in $OMEGA, useful for a rough appreciation of parameter uncertainty.

Some things that would need to ask for feature requests to mrgsolve:

  • possibility to store the information about ETA inside the model, say a @eta slot, and the possibility to ask for etasrc = "etaslot". Information could be a matrix (i.e. one vector per individual) or a 3-dimension array (one matrix per individual) if a full posterior matrix is provided, whatever...
  • possibility to read ETA from idata_set or ev?

More to come

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions