param_est: Compute parameter matrix

Description Usage Arguments Details Value

Description

A function to calculate the weighted sum of a design matrix and a set of coefficients, producing a matrix of parameters by observations. Fixed coefficient values can also be specified.

Usage

1
param_est(X, coef, fixed, index, parSel)

Arguments

X

a design matrix.

coef

a vector of C coefficients.

fixed

a vector of F values for the fixed coefficients.

index

a matrix with two columns, the first giving the row positions for the free coefficients (followed by the row positions for any fixed values), the second giving the column positions for the free coefficients (followed by the positions for the fixed values). The first column of the final row of the matrix indicates the total number of desired parameters so that the parameter matrix can be created.

parSel

a vector giving the indices mapping the values in the coefficient vector to the rows of the 'index' matrix, thereby allowing different conditions to be constrained to have the same free coefficient.

Details

Given N observations and P desired parameters, the goal is to produce a P x N matrix given a set of V covariates, C coefficients, and F fixed values. To do so, a P x V parameter matrix M is specified, and the 'index' matrix along with the parSel vector are used to fill the positions of the P x V matrix. Fixed values from the fixed vector are additionally included in the matrix M. To produce the desired P x N output matrix, the P x V matrix M is multiplied by the V x N design matrix X.

Value

A P x N matrix giving the set of parameter values for each of the N observations.


rettopnivek/mle documentation built on May 5, 2019, 5:54 p.m.