mcwr_check {mcwr}R Documentation

Check mcwr data frame

Description

Check that mcwr data frame is set up correctly

Usage

mcwr_check(data, ij = FALSE, skipexit = FALSE, noexit = FALSE)

Arguments

data

an mcwr data.frame

ij

a boolean TRUE/FALSE. If TRUE, states that data set is in ij-format.

skipexit

a boolean TRUE/FALSE. If TRUE, does not check the last row of the data frame.

noexit

a boolean TRUE/FALSE. If TRUE, states that the exit row is missing from the data frame.

Details

Run mcwr check to check whether your data frame is a valid mcwr data frame or whether you have to modify something. It is also run internally by the other mcwr functions, so you are always safe not to be using incorrectly set up data.

A second use of the functions is to gather comprehensive information about existing and missing model variables, and more.

Value

a list containing model information. Its named elements are:

p_exi character vector: p-variables in the data set
p_ful character vector: full set of p-variables implied by states
p_new character vector: p-variables that are implied by states but not in the data set
s_trn numeric vector: list of transitions occuring in data set
s_frm numeric vector: list of from-states
s_trg numeric vector: list of target states
s_abs numeric vector: absorbing state
s_omt numeric vector: states omitted from the model
r_exi character vector: r-variables in the data set
r_ful character vector: full set of p-variables implied by states
r_new character vector: r-variables that are implied by states but not in the data set
r_trn character vector: list of transitions covered by existing r-variables
s_rcv numeric vector: states receiving rewards
s_nrc numeric vector: states not receiving rewards
numages number of age classes in the model
agelist numeric vector: age classes of the model
ageintervals numeric vector: list of lengths of age intervals
hasexit TRUE/FALSE: whether data has an exit row

See Also

Other mcwr: mcwr_exit(), mcwr_expectancies(), mcwr_genvars(), mcwr_switch()


[Package mcwr version 1.0.0 Index]