factor.model.design: Generate factor model design matrix.

Description Usage Arguments Details Value

Description

This function enables a quick generation of random design matrices (see details).

Usage

1
factor.model.design(n, p, n.factors, sigma = 1)

Arguments

n

Number of independent realisations of the factor model.

p

Number of covariates.

n.factors

Number of factors.

sigma

Standard deviation for the normal distribution (see details).

Details

The elements of the matrix returned by this routine satisfy X_{ij} = ∑_{l=1}^{K} f_{ijl} \varphi_{il} + θ_{ij} with f_{ijl}, \varphi_{il}, θ_{ij}, \varepsilon_{i} i.i.d. \mathcal{N}(0,(sigma)^2).

Value

n by p matrix with independent rows following factor model (see details).


rbvs documentation built on May 2, 2019, 7:31 a.m.