# bothsidesmodel.mle: Calculate the maximum likelihood estimates In msos: Data Sets and Functions Used in Multivariate Statistics: Old School by John Marden

## Description

This function fits the model using maximum likelihood. It takes an optional pattern matrix P as in (6.51), which specifies which β _{ij}'s are zero.

## Usage

 1 bothsidesmodel.mle(x, y, z = diag(qq), pattern = matrix(1, nrow = p, ncol = l)) 

## Arguments

 x An N x P design matrix. y The N x Q matrix of observations. z A Q x L design matrix pattern An optional N x P 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 x L matrix with the ijth element being the standard error of \hat{β}_{ij}.

T

The P 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 x Q matrix \hat{Σ}_z.

Cx

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

ResidSS

The dimension of the model, counting the nonzero β _{ij}'s and components of Σ _z.

Deviance

Mallow's C_p Statistic.

Dim

The dimension of the model, counting the nonzero β _{ij}'s and components of Σ_z

AICc

The corrected AIC criterion from (9.87) and (aic19)

BIC

The BIC criterion from (9.56).

bothsidesmodel.chisquare, bothsidesmodel.df, bothsidesmodel.hotelling, bothsidesmodel.lrt, and bothsidesmodel.

## Examples

 1 2 3 4 5 data(mouths) x <- cbind(1, mouths[, 5]) y <- mouths[, 1:4] z <- cbind(1, c(-3, -1, 1, 3), c(-1, 1, 1, -1), c(-1, 3, -3, 1)) bothsidesmodel.mle(x, y, z, cbind(c(1, 1), 1, 0, 0)) 

### Example output

Loading required package: mclust
Package 'mclust' version 5.4.3
Type 'citation("mclust")' for citing this R package in publications.
$Beta [,1] [,2] [,3] [,4] [1,] 24.937126 0.8268033 0 0 [2,] -2.271745 -0.3504386 0 0$SE
[,1]       [,2] [,3] [,4]
[1,] 0.5205837 0.09051471    0    0
[2,] 0.7935186 0.13797033    0    0

$T [,1] [,2] [,3] [,4] [1,] 47.902240 9.134463 0 0 [2,] -2.862876 -2.539956 0 0$Covbeta
[,1]         [,2]         [,3]         [,4]
[1,]  0.271007398  0.005297044 -0.273389373 -0.005343601
[2,]  0.005297044  0.008192913 -0.005343601 -0.008264923
[3,] -0.273389373 -0.005343601  0.629671752  0.012307409
[4,] -0.005343601 -0.008264923  0.012307409  0.019035812

$df  23$SigmaR
Age8    Age10    Age12    Age14
Age8  5.119199 2.440902 3.610510 2.522243
Age10 2.440902 3.927948 2.717514 3.062349
Age12 3.610510 2.717514 5.979798 3.823461
Age14 2.522243 3.062349 3.823461 4.617984

$Deviance  220.9863$Dim
 14

$AICc  258.7863$BIC
 267.128


msos documentation built on Oct. 31, 2020, 9:07 a.m.