Description Usage Arguments Details Value See Also
Generate (additional) transition probability or rewards variables
1 2 3 4 5 6 7 8 9 |
data |
an mcwr data.frame |
timing |
a character or numeric scalar.
It specifies how rewards are distributed to from and target states. It is
required if option |
add |
a boolean TRUE/FALSE. If TRUE, existing r-variables are left unchanged. |
replace |
add a boolean TRUE/FALSE. If TRUE, existing r-variables are replaced. |
nop |
a boolean TRUE/FALSE. If TRUE, not generate any p-variables.
By default, all missing p-variables are generated. Since existing
p-variables must satisfy the sums-to-unity condition, only p-variables that are (by implication)
all-zero can be missing. |
nor |
a boolean TRUE/FALSE. If TRUE, does not generate any r-variables. |
order |
a boolean TRUE/FALSE. If TRUE, orders variables alphabetically according to the column list 'age p* r*'. |
The main purpose of this function is to generate rewards variables (r-variables). It examines existing p- and r-variables, determines the implied full set of states, and generates any missing variables that are missing from the data frame. It interacts flexibly with existing r-variables: You can leave them unchanged or have them replaced.
An effective way to create r-variables may be to generate a full set of r-variables using mcwr_genvars()
and
then edit them where necessary. This is illustrated under in the examples section of mcwr.
A data.frame, suitable for further processing by mcwr_*()
functions.
Other mcwr:
mcwr_check()
,
mcwr_exit()
,
mcwr_expectancies()
,
mcwr_switch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.