This version substantially improves the simulate
method.
sim_formula(..., data_transform = func)
. As an example transform_to_posttest
is included.sim_formula(..., test = "treatment")
lm()
. If this is combined with the transform_to_posttest
the longitudinal model can be compared to a cross-sectional model, e.g. ANCOVA.summary.plcp_sim(..., model_selection = "FW", LRT_alpha = 0.25)
.simulate(formula = x)
must now be created using the new functions sim_formula
, or sim_formula_compare
, and can no longer be a named list or a character vector.summary.plcp_sim()
now show fixed effect theta
s in the correct order, thanks to GitHub user Johnzav888 (#10).effect_size = 5
,effect_size = cohend(0.5, "posttest_sd")
Simulate.plcp
will now automatically create lme4 formulas if none is supplied, see ?create_lmer_formula
.uneqal_clusters
now accepts a function indicating the distribution of cluster sizes, via the new argument func
, e.g. rpois
or rnorm
could be used to draw cluster sizes.R
.parallel::makeCluster
(PSOCK). Forking is still used for non-interactive Unix environments.plcp_multi
-objects.cores
.simulate.plcp_multi
now have more options for saving intermediate results.print.plcp_multi_power
now has better support for subsetting via either [], head(), or subset().icc_pre_subject
is now defined as (u_0^2 + v_0^2) / (u_0^2 + v_0^2 + error^2)
, instead of (u_0^2) / (u_0^2 + v_0^2 + error^2)
. This would be the subject-level ICC, if there’s no random slopes, i.e. correlation between time points for the same subject.study_parameters()
: 0 and NA now means different things. If 0 is passed, the parameters is kept in the model, if you want to remove it specify it as NA instead.study_parameters()
: is now less flexible, but more robust. Previously a large combination if raw and relative parameters could be combined, and the individual parameters was solved for. To make the function less bug prone and easier to maintain, it is now only possible to specify the cluster-level variance components as relative values, if the other parameters as passed as raw inputs.simulate_data()
now includes a column y_c
that contains the full outcome vector, without missing values added. This makes it easy to compare the complete and incomplete data set, e.g. via simulate()
.simulate()
new argument batch_progress
enables showing progress when doing multiple simulations.summary.plcp_sim
where the wrong % convergence was calculated.study_parameters
when icc_cluster_pre = NULL
and all inputs are standardized.var_ratio
argument was passed a vector of values including a 0, e.g. var_ratio = c(0, 0.1, 0.2)
.res[[1]]$paras
, and thus the single simulation would not print correctly.cluster_intercept
and cluster_slope
is now correctly extracted from (0 + treatment + treatment:time || cluster)
.Power.plcp_multi
is now exported.get_power.plcp_multi
now shows a progress bar.deterministic_dropout = FALSE
.First release.