override_static {SimTimeVar} | R Documentation |
Override static variable
Description
An internal function not intended for the user. For static variables, overrides any time-varying values to ensure that they are actually static.
Usage
override_static(.static.var.name, .id.var.name = "id", .d, .obs)
Arguments
.static.var.name |
Name of static variable. |
.id.var.name |
Name of variable defining clusters in dataset. |
.d |
Dataset |
.obs |
The number of observations per cluster. |
Examples
# example with 10 subjects each with 3 observations
# generate sex in a way where it might vary within a subject
data = data.frame( id = rep(1:10, each=3),
male = rbinom( n=10*3, size=1, prob=0.5 ) )
override_static("male", "id", data, 3)
[Package SimTimeVar version 1.0.0 Index]