mcwr_exit() allows easy editing and consistency checks of the last (exit) row of an mcwr data frame.
mcwr_exit(data, age, replace = FALSE, update = FALSE, rewards = 0)an mcwr data.frame
a real number ageval.
It specifies the age of the exit row in the data frame. It may or may not exist.
It may not be smaller than the largest age in the data frame.
If ageval corresponds to the largest age in the data frame, option replace must be specified. The
values of the corresponding row are replaced. Exit transition values for p-variables are set to 1.
Exit transition values for r-variables are left as-is if they are non-missing and option update is
not used. Otherwise they are set to rwval. Values of all other transitions are set to missing.
If ageval is larger than the largest age in the data frame, a new row will be inserted. Exit
transitions are set to 1 for p-variables and to rwval for r-variables. Values of all other
transitions are set to missing.
boolean TRUE/FALSE. See option age.
boolean TRUE/FALSE. See option age.
a real number rwval. It determines the rewards value for exit transitions.
A data.frame, suitable for further processing by mcwr_*() functions.
mcwr requires that all data points that do not enter matrix calculations be set to missing in order to avoid
incorrectly set up data. This rule makes the last (exit) row of the mcwr data frame somewhat tedious to manage.
The convenience function mcwr_exit() makes it easier to create or edit the last (exit) row of the data set.
Other mcwr:
mcwr_check(),
mcwr_expectancies(),
mcwr_genvars(),
mcwr_switch()