You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will require a change in how model is currently structured. Currently when running the model,
est_naloxone(d)
the function expects that d contains the column region which provides a unique key for each factor in the model (either region or site type, or a combination of the two). Instead we want d to contain an arbitrary number of columns each representing its own covariate.
design approach
Obvious choice would be to follow in the vain of brms and other packages and use the formula approach to specify the model covariates e.g.
est_naloxone(~region+site_type, data=d)
This allows us to use the R formula machinery and in particular the model.matrix function to generate a design matrix and also allows for incorporating interaction via,
problem statement
This will require a change in how model is currently structured. Currently when running the model,
est_naloxone(d)
the function expects that
d
contains the columnregion
which provides a unique key for each factor in the model (either region or site type, or a combination of the two). Instead we wantd
to contain an arbitrary number of columns each representing its own covariate.design approach
Obvious choice would be to follow in the vain of
brms
and other packages and use theformula
approach to specify the model covariates e.g.This allows us to use the R
formula
machinery and in particular themodel.matrix
function to generate a design matrix and also allows for incorporating interaction via,The default formula can be set to
~region
to ensure backwards compatibility.The text was updated successfully, but these errors were encountered: