Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pffrSim

Simulate example data for pffr


Description

Simulates example data for pffr from a variety of terms. Scenario "all" generates data from a complex multivariate model

Y_i(t) = μ(t) + \int X_{1i}(s)β_1(s,t)ds + xlin β_3(t) + f(xte1, xte2) + f(xsmoo, t) + β_4 xconst + f(xfactor, t) + ε_i(t)

. Scenarios "int", "ff", "lin", "te", "smoo", "const", "factor", generate data from simpler models containing only the respective term(s) in the model equation given above. Specifying a vector-valued scenario will generate data from a combination of the respective terms. Sparse/irregular response trajectories can be generated by setting propmissing to something greater than 0 (and smaller than 1). The return object then also includes a ydata-item with the sparsified data.

Usage

pffrSim(
  scenario = "all",
  n = 100,
  nxgrid = 40,
  nygrid = 60,
  SNR = 10,
  propmissing = 0,
  limits = NULL
)

Arguments

scenario

see Description

n

number of observations

nxgrid

number of evaluation points of functional covariates

nygrid

number of evaluation points of the functional response

SNR

the signal-to-noise ratio for the generated data: empirical variance of the additive predictor divided by variance of the errors.

propmissing

proportion of missing data in the response, default = 0. See Details.

limits

a function that defines an integration range, see ff

Details

See source code for details.

Value

a named list with the simulated data, and the true components of the predictor etc as attributes.


refund

Regression with Functional Data

v0.1-23
GPL (>= 2)
Authors
Jeff Goldsmith [aut], Fabian Scheipl [aut], Lei Huang [aut], Julia Wrobel [aut, cre], Chongzhi Di [aut], Jonathan Gellar [aut], Jaroslaw Harezlak [aut], Mathew W. McLean [aut], Bruce Swihart [aut], Luo Xiao [aut], Ciprian Crainiceanu [aut], Philip T. Reiss [aut], Yakuan Chen [ctb], Sonja Greven [ctb], Lan Huo [ctb], Madan Gopal Kundu [ctb], So Young Park [ctb], David L. Miller [ctb], Ana-Maria Staicu [ctb]
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.