est_model: Estimate a linear model with Kronecker-structured correlation...

Description Usage Arguments Value

View source: R/functions.R

Description

Estimate a linear model with Kronecker-structured correlation or covariance matrix

Usage

1
2
est_model(Y, X, r, type = "kpcor", restr = "N", tol = 1e-16,
  maxiter = 1000, verbose = FALSE)

Arguments

Y

Matrix of dimension rc x n, each column is a (vectorized) response vector

X

Matrix of dimension p x n, each column is a predictor vector

r

The number of "rows" of the inverse vectorized columns of Y

type

One of "kpcor", "mn", or "unstruct", indicating which model to fit

restr

Allows the user to impose the matrix A or B to be diagonal. "N" for no restriction, "A" for diagonal A, "B" for diagonal B, and "AB" for both (only for kpcor).

tol

Algorithm terminates when an iteration increases the log-likelihood less than tol

maxiter

The maximum number of iterations the algorithm runs if not converging before

verbose

Print additional info about iterates if TRUE (only for kpcor)

Value

List with log-likelihood, coefficient estimates, covariance parameter estimates, estimates of the covariance matrix of the coefficients, the number of iterations, and and information = 0 if converged, 1 if not converged, 2 if A iterate was not positive definite at an iteration, and 3 if B iterate was not positive definite at an iteration.


koekvall/crkr documentation built on Sept. 22, 2018, 6:28 p.m.