Mixed effect autoregressive model (order 1)
Arguments
- max_score
Maximum value that the score can take. Note that even if
discrete=FALSE,max_scoremust be an integer.- discrete
Whether to use a discrete normal distribution. This will be used to check whether the data is discrete or not, and for rounding predictions (cf. testing).
- prior
Named list of the model's priors. If
NULL, uses the default prior for the model (seedefault_prior()).
Details
Details of the model are available in the paper. The model takes as input a continuous score defined between 0 and
max_score.The model is naive as the likelihood is non-truncated and not discretised (when
discrete = TRUE).Unlike the
AR1model, the discretisation of predictions is not implementedFor more details see the vignette.
Parameters
Population parameters:
sigma: Standard deviation of the autoregressionmu_logit_slope: Population mean of the logit ofslopesigma_logit_slope: Population standard deviation of the logit ofslopemu_inf: Population mean ofy_infsigma_inf: Population standard deviation ofy_inf
Priors
The priors are passed as a named list with elements sigma, mu_logit_slope, sigma_logit_slope, mu_inf, sigma_inf
specifying priors for the corresponding parameters.
Each element of the list should be a vector of length 2, containing values for x1 and x2, x2 > 0, such as:
sigma / max_score ~ normal+(x1, x2).mu_logit_slope ~ normal(x1, x2).sigma_logit_slope ~ normal+(x1, x2).mu_inf / max_score ~ normal(x1, x2).sigma_inf / max_score ~ normal+(x1, x2).
NB: For sigma, sigma_logit_slope and sigma_inf, usually x1=0 to define a half-normal distribution
since the parameter is constrained to be positive.
Default priors
The default prior for
sigmatranslates to a width of the predictive distribution to be at mostmax_score.The default priors for
mu_logit_slopeandsigma_logit_slopehave "reasonable" ranges and translate to a prior onslopethat is approximately uniform.The default prior for
mu_infspans the entire range of the score.The default prior for
sigma_inftranslates to a range in the distribution ofy_infto be at mostmax_score.
Examples
EczemaModel("MixedAR1", max_score = 100)
#> MixedAR1 model (continuous)
#> max_score = 100
#> Prior:
#> - sigma / max_score ~ normal+(0,0.1)
#> - mu_logit_slope ~ normal(0,1)
#> - sigma_logit_slope ~ normal+(0,1.5)
#> - mu_inf / max_score ~ normal(0.5,0.25)
#> - sigma_inf / max_score ~ normal+(0.5,0.25)