Learn R Programming

gss (version 2.2-8)

mkcov: Generating Covariance for Correlated Data

Description

Generate entries of covariance functions for correlated data.

Usage

mkcov.arma(p, q, n)
mkcov.long(id)
mkcov.known(w)

Value

A list of three elements.

fun

Covariance matrix to be evaluated through fun(gamma,env) or fun(env).

env

Constants in covariance function.

init

Initial values for correlation parameters.

Arguments

p

Order of AR terms.

q

Order of MA terms.

n

Dimension of covariance matrix.

id

Factor of subject ID.

w

Covariance matrix; only the upper triangular part is used.

Details

mkcov.arma generates covariance functions for ARMA(p,q) model.

mkcov.long generates covariance functions for longitudinal data.

mkcov.known allows one to use a known covariance matrix in ssanova9.