library(dplyr)

MACML

Model

The cs_uncorrelated dataset is included in the macml package.

The dataset contains measurements on five attributes of five alternatives.

finalIter <- 0 
res1 <- optim(bInit, lpr, lgd, method="BFGS", 
              control = list(maxit = 100, trace = 3, fnscale = -1, REPORT = 1),
              hessian = TRUE)
print(res1)
finalIter <- 1
res2 <- optim(res1$par, lpr, lgd, method="BFGS", 
              control = list(maxit=1, trace=3, fnscale=-1, REPORT=1))
print(res2)
cov2 <- solve(res1$hessian) %*% outProd %*% solve(res1$hessian) / nobs / nobs

estimate <- res1$par
stdErr <- sqrt(diag(cov2))

print(cbind(estimate,stdErr))


sidharthanr/macml documentation built on May 29, 2019, 9:58 p.m.