The function mc_complete_data completes a data set with NA values for helping to construct the components of the matrix linear predictor in models that require equal number of observations by subjects (id).

mc_complete_data(data, id, index, id.exp)

Arguments

data

a data.frame to be completed with NA.

id

name of the column (string) containing the subject id.

index

name of the column (string) containing the index to be completed.

id.exp

how the index is expected to be for all subjects.

Source

Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4):1--30.

Value

A data.frame with the same number of observations by subject.

See also

mc_dglm, mc_ns, mc_ma and mc_rw.