ShaoReg: Synthetic Regression Data

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ShaoReg.R

Description

Simulated multiple linear regression data from a model used in simulation experiments reported in Shao's famous paper on cross-validation for model selection.

Usage

1
ShaoReg(n = 20, beta = c(3, 1.5, 0, 0, 2, 0, 0, 0), rho = 0.5, sig = 1)

Arguments

n

sample size, length of output

beta

regression coefficients

rho

cross-covariance, must be less than in magnitude 1

sig

residual standard deviation

Details

In general the regression equation used for simulation is:

y = X β + ε

where β is a vector of the regression coefficients of length p, X is the design matrix with n rows and p columns and ε is a vector of n independent normal random variables with mean zero and standard deviation sig. The rows of X are p-variate normal with mean vector zero and p-by-p covariance matrix (i,j)-entry rho^|i-j|.

Shao (1993) used the default settings in the arguments and n = 20, 60, 100 in simulation experiments with delete-d cross-validation.

Value

Data frame with n rows and p+1 columns. The first p columns are labelled x1, ..., xp and the last column is y.

Author(s)

A. I. McLeod

References

Jun Shao (1993), Linear Model Selection by Cross-validation, Journal of the American Statistical Association, 88/422.

Examples

1

gencve documentation built on May 29, 2017, 7:12 p.m.