randomLinComb: Compute a random linear combination of the columns of a...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/alr3.R

Description

Computes Xa where X is an n by p matrix, and a is a random vector of length p.

Usage

1
2
3
4
randomLinComb(X, seed = NULL)

## S3 method for class 'lm'
 randomLinComb(X, seed=NULL)

Arguments

X

An n by p matrix or data frame. For the lm method, X is a linear regression model, and randomLinComb is applied to model.matrix(X)

seed

If not NULL, use this to initialize the random number generator

Details

The matrix X is first scaled and centered. a is computed to have random uniform components on (-1,1).

Value

A vector of length n.

Author(s)

Sanford Weisberg, sandy@stat.umn.edu

See Also

pure.error.anova

Examples

1

alr3 documentation built on May 2, 2019, 5:39 a.m.

Related to randomLinComb in alr3...