Main Page | File List | Globals

pdLogChol.c File Reference

#include "Mutils.h"
#include <R_ext/Lapack.h>

Functions

double ld_factor_from_par (const double *par, double *factor, int nc)
double * gradient (const int nc, const double *factor, const double *pars, double *value)
SEXP pdLogChol_LMEhessian (SEXP x, SEXP Ain, SEXP Hin, SEXP nlev)
SEXP pdLogChol_LMEgradient (SEXP x, SEXP Ain, SEXP nlev)
SEXP pdLogChol_pdgradient (SEXP x)
SEXP pdLogChol_EMupdate (SEXP x, SEXP nlev, SEXP Ain)
SEXP pdLogChol_coefGets (SEXP x, SEXP value)

Function Documentation

double* gradient const int  nc,
const double *  factor,
const double *  pars,
double *  value
[static]
 

An internal function that calculates the gradient of the positive-definite matrix with respect to the parameters. This function is used in both pdLogChol_LMEgradient and pdLogChol_pdgradient.

Parameters:
nc number of columns (and rows) in the matrix
pars parameter vector of length nc*(nc+1)/2
value array into which the results are written
Returns:
the gradient in value

double ld_factor_from_par const double *  par,
double *  factor,
int  nc
[static]
 

Populate the factor from the parameter vector and return the logarithm the determinant of the factor.

Parameters:
par vector of parameters
factor pointer to matrix to be overwritten with the factor
nc number of columns
Returns:
logarithm of the determinant of the factor

SEXP pdLogChol_coefGets SEXP  x,
SEXP  value
 

SEXP pdLogChol_EMupdate SEXP  x,
SEXP  nlev,
SEXP  Ain
 

Perform an EM update on a pdLogChol object.

Parameters:
x Pointer to a pdLogChol object
nlev An integer object - the number of levels in the grouping factor
Ain An upper triangular matrix object
Returns:
The updated pdLogChol object x

SEXP pdLogChol_LMEgradient SEXP  x,
SEXP  Ain,
SEXP  nlev
 

LMEgradient implementation for the pdLogChol class

Parameters:
x Pointer to a pdLogChol object
Ain Pointer to an upper-triangular double precision square matrix
nlev Pointer to an integer scalar giving the number of levels
Returns:
Pointer to a REAL gradient vector

SEXP pdLogChol_LMEhessian SEXP  x,
SEXP  Ain,
SEXP  Hin,
SEXP  nlev
 

SEXP pdLogChol_pdgradient SEXP  x  ) 
 

Implementation of the pdgradient method for pdLogChol objects.

Parameters:
x Pointer to a pdLogChol object
Returns:
SEXP of a three-dimensional array with the gradient of the pdgradient with respect to the parameters.


Generated on Mon May 31 14:04:37 2004 for Matrix by doxygen 1.3.6-20040222