# bsm.fit: Helper function to determine beta estimates for MLE... In msos: Data Sets and Functions Used in Multivariate Statistics: Old School by John Marden

## Description

Generates β estimates for MLE using a conditioning approach with patterning support.

## Usage

 1 bsm.fit(x, y, z, pattern) 

## Arguments

 x An N x (P + F) design matrix, where F is the number of columns conditioned on. This is equivalent to the multiplication of xyzb. y The N x (Q - F) matrix of observations, where F is the number of columns conditioned on. This is equivalent to the multiplication of Yz_a. z A (Q - F) x L design matrix, where F is the number of columns conditioned on. pattern An optional N-F x F matrix of 0's and 1's indicating which elements of β are allowed to be nonzero.

## Value

A list with the following components:

Beta

The least-squares estimate of β.

SE

The (P + F) x L matrix with the ijth element being the standard error of \hat{β}_ij.

T

The (P + F) x L matrix with the ijth element being the t-statistic based on \hat{β}_ij.

Covbeta

The estimated covariance matrix of the \hat{β}_ij's.

df

A p-dimensional vector of the degrees of freedom for the t-statistics, where the jth component contains the degrees of freedom for the jth column of \hat{β}.

Sigmaz

The (Q - F) x (Q - F) matrix \hat{Σ}_z.

Cx

The Q x Q residual sum of squares and crossproducts matrix.

bothsidesmodel.mle and bsm.simple
 1 # NA