mc_complete_data: Complete data in case of missing observations

View source: R/mc_complete_data.R

mc_complete_dataR Documentation

Complete data in case of missing observations

Description

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).

Usage

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.

Value

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

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br

Source

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

See Also

mc_dglm, mc_ns, mc_ma and mc_rw.


mcglm documentation built on Sept. 16, 2022, 1:06 a.m.