example_model: Example regression model and H0.

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Example regression model and H0.

Usage

1
example_model(n = 100)

Arguments

n

Number of datapoints.

Value

List of (y, X, lam, lam0) that corresponds to regression model and null hypothesis:

The null we are testing through this specification is

H0: lam' beta = lam[1] * beta[1] + ... + lam[p] * beta[p] = lam0,

where beta are the model parameters in the regression, y = X beta + e. By default this example sets p = 2-dim model, lam = (0, 1) and lam0 = 0. In this specification, H0: beta[2] = 0.

Examples

1
2
model = example_model()
lm(model$y ~ model$X + 0)

RRI documentation built on Dec. 19, 2019, 9:06 a.m.

Related to example_model in RRI...