generative_model: Some linear model

Description Usage Arguments Value References Examples

View source: R/generative.R

Description

This function returns a design for the regression linear model, without the intercept. The user can choose one of the two models: "mod1" or "mod2". The first model "mod1" contains just one column, equal to i^2 + X_i, i=1,...,n, where X is an AR(1) process with phi_1 = 0.5.

The second model "mod2" contains two columns, the first equal to log(i) + sin(i) + X_i and the second equal to i, for i=1,...,n. The process X is again an AR(1) process with phi_1 = 0.5. More information about "mod2" is available in the paper of E. Caron, J. Dedecker and B. Michel (2019). Linear regression with stationary errors: the R package slm.

Usage

1
generative_model(n, model = "mod1")

Arguments

n

integer. The sample size.

model

a list of character "mod1" or "mod2" to choose the model.

Value

This function returns a data-frame which contains a simulated random design.

References

E. Caron, J. Dedecker and B. Michel (2019). Linear regression with stationary errors: the R package slm. arXiv preprint arXiv:1906.06583. https://arxiv.org/abs/1906.06583.

Examples

1
generative_model(500,"mod1")

slm documentation built on Aug. 31, 2020, 5:11 p.m.