MLEst:

Usage Arguments Examples

Usage

1
MLEst(S)

Arguments

S

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (S) 
{
    ahat = S[1, 2]/S[1, 1]
    vx = S[1, 1]
    Sxx = S[1:2, 1:2]
    sxy = S[1:2, 3]
    vem = S[2, 2] - S[2, 1] * S[1, 2]/S[1, 1]
    invSxx = solve(Sxx)
    beta.v = invSxx %*% sxy
    vey = S[3, 3] - t(sxy) %*% invSxx %*% sxy
    thetaMLE = c(ahat, beta.v[2], beta.v[1], vx, vem, vey)
    return(thetaMLE)
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.