View source: R/MECfda_simDataGen_fcReg.R
MECfda_simDataGen_fcReg | R Documentation |
Generate data set for scalar-on-function regression
MECfda_simDataGen_fcReg(
N = 100,
distribution = c("Gaussian", "Bernoulli"),
t_interval,
t_points,
n_t = 100,
seed = 0
)
N |
Sample size. |
distribution |
Conditional distribution of response varaible given the covariate
( |
t_interval |
A 2-element vector, represents an interval,
means the domain of the functional covariate.
Default is |
t_points |
the measurement points of functional variables, should be numeric vector. |
n_t |
Number of measurement time points.
Overwritten if argument |
seed |
Pseudo-random number generation seed. |
return a list with following elements.
Y |
An atomic vector of response variable |
Z |
A dataframe with a binary and a continuous scalar-valued covariate. |
FC |
A list of two 'functional_variable' class object. |
t_interval |
Same as in the input argument. |
t_points |
Sequence of the measurement (time) points. |
dat_sim = MECfda_simDataGen_fcReg(100,"Bernoulli")
res = fcRegression(FC = dat_sim$FC, Y=dat_sim$Y, Z=dat_sim$Z,
basis.order = 3, basis.type = c('Fourier'),
family = binomial(link = "logit"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.