R/misc-simulate.R
sim.create_f.Rd
Simulate latent function components for longitudinal data analysis
sim.create_f(
X,
covariates,
relevances,
lengthscales,
X_affected,
dis_fun,
bin_kernel,
steepness,
vm_params,
force_zeromean
)
input data matrix (generated by sim.create_x
)
Integer vector that defines the types of covariates (other than id and age). Different integers correspond to the following covariate types:
0 = disease-related age
1 = other continuous covariate
2 = a categorical covariate that interacts with age
3 = a categorical covariate that acts as a group offset
4 = a categorical covariate that that acts as a group offset AND is restricted to have value 0 for controls and 1 for cases
Relative relevance of each component. Must have be a vector
so that length(relevances) = 2 + length(covariates)
.
First two values define the relevance of the individual-specific age and
shared age component, respectively.
A vector so that length(lengthscales) =
2 + sum(covariates %in% c(0,1,2))
.
which individuals are affected by the disease
A function or a string that defines the disease effect. If
this is a function, that function is used to generate the effect.
If dis_fun
is "gp_vm" or "gp_ns", the disease component is drawn from
a nonstationary GP prior ("vm" is the variance masked version of it).
Should the binary kernel be used for categorical
covariates? If this is TRUE
, the effect will exist only for group 1.
Steepness of the input warping function. This is only used if the disease component is in the model.
Parameters of the variance mask function. This is only
needed if useMaskedVarianceKernel = TRUE
.
Should each component (excluding the disease age component) be forced to have a zero mean?
a data frame FFF where one column corresponds to one additive component