# NOT RUN {
pstr = NewPSTR(Hansen99, dep='inva', indep=4:20, indep_k=c('vala','debta','cfa','sales'),
tvars=c('vala'), iT=14) # create a new PSTR object
# "L-BFGS-B" is used by default
pstr = EstPSTR(use=pstr, im=1, iq=1, par=c(1.6,.5), vLower=4, vUpper=4)
# You can also choose the method yourself.
pstr = EstPSTR(use=pstr, im=1, iq=1, par=c(1.6,.5), method='CG')
print(pstr, "estimates", digits=6)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab