data(simData)
theta <- c(beta0=1,beta1=2)
model1 <- momentModel(y~x1, ~z1+z2, data=simData)
## EL estimate
res1 <- gelFit(model1)
res1
## ET estimate
res2 <- gelFit(model1, gelType="ET")
res2
## Restricted models by EL
## using the Brent method
R <- matrix(c(0,1), ncol=2)
q <- 2
rmodel1 <- restModel(model1, R, q)
gelFit(rmodel1, tControl=list(method="Brent", lower=-10, upper=10))
Run the code above in your browser using DataLab