1 | MLEst(S)
|
S |
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.