View source: R/001_data_simulation.R
TR_simulated_data | R Documentation |
Simulated tensor regression data
TR_simulated_data(
subjects = 400,
tensor_dims = c(50, 50),
CNR = 1,
num_active = 3,
other_covar = c(1, 1)
)
subjects |
A positive integer indicating the number of subjects for which to generate data |
tensor_dims |
A vector that indicates the dimensions of the tensor covariate for each subject |
CNR |
The contrast-to-noise ratio, defined by Welvaert and Rosseel (2013) as the size of the (largest) true coefficient value divided by the observational noise. |
num_active |
The number of contiguous nonzero activation regions |
other_covar |
A vector of true values for other (nuisance) coefficients
that will be used to generate non-tensor-valued covariates. This can be set
to |
An object of class TR_data
that contains the
elements y
(a vector of response values), X
(an array of
covariate values), eta
(a matrix of nuisance covariates),
true_B
(an array with the true tensor coefficient values), and
gam
(a vector with the true nuisance coefficient values)
input <- TR_simulated_data()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.