complete_parameters {SimTimeVar}R Documentation

Fill in partially incomplete parameters matrix

Description

Fills in "strategic" NA values in a user-provided parameters matrix by (1) calculating SDs for proportions using the binomial distribution; (2) calculating variances based on SDs; and (3) setting within-cluster variances to 1/3 of the across-cluster variances (if not already specified).

Usage

complete_parameters(parameters, n)

Arguments

parameters

Initial parameters matrix that may contain NA values.

n

The number of clusters

Details

For binary variables, uses binomial distribution to compute across-cluster standard deviation of proportion. Where there are missing values, fills in variances given standard deviations and vice-versa. Where there are missing values in within.var, fills these in by defaulting to 1/3 of the corresponding across-cluster variance.

Examples

complete_parameters(params, n=10)

[Package SimTimeVar version 1.0.0 Index]