# NOT RUN {
pstr = NewPSTR(Hansen99, dep='inva', indep=4:20, indep_k=c('vala','debta','cfa','sales'),
tvars=c('vala','debta','cfa','sales'), iT=14) # create a new PSTR object
# estimate the PSTR model first
pstr = EstPSTR(use=pstr, im=1, iq=1, useDelta=TRUE, par=c(.63,0), method='CG')
# plot the curve and surfaces
ret = plot_coefficients(pstr, vars=1:4, length.out=100, color="dodgerblue4", size=2)
ret[[1]]
ret[[1]] + ggplot2::scale_x_log10()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab