$ontext This model demonstrates how to import confidence intervals after running the regression. Data set: average heights and weights for American women aged 30-39 (source: The World Almanac and Book of Facts, 1975). $offtext *------------------------------------------------------------------------------ * data *------------------------------------------------------------------------------ set i /i1*i15/; table data(i,*) height weight * (in) (lb) i1 58 115 i2 59 117 i3 60 120 i4 61 123 i5 62 126 i6 63 129 i7 64 132 i8 65 135 i9 66 139 i10 67 142 i11 68 146 i12 69 150 i13 70 154 i14 71 159 i15 72 164 ; *------------------------------------------------------------------------------ * statistical model *------------------------------------------------------------------------------ variables c 'estimate constant term coefficient' h 'estimate height' h3 'estimate height^3' sse 'sum of squared errors' ; equations fit(i) 'the linear model' obj 'objective' ; obj.. sse =n= 0; fit(i).. data(i,'weight') =e= c + h*data(i,'height')+h3*data(i,'height')**3; option lp=ls; model ols1 /obj,fit/; solve ols1 minimizing sse using lp; display c.l, h.l, h3.l, sse.l; *------------------------------------------------------------------------------ * read confidence intervals from gdx file *------------------------------------------------------------------------------ sets alpha /'90%','95%','97.5%','99%'/ names /'c','h','h3'/ interval /'lo','up'/ ; parameter confint(alpha,names,interval); execute_load 'ls.gdx',confint; display confint;