new;
output file=c:\jae\ols\wamp3\wampler3.out  reset;

@Dataset Name:  Wampler-3 (wampler3.dat)
Data:          1 Response Variable (y)
               1 Predictor Variable (x)
               21 Observations
               Higher Level of Difficulty
Model:         Polynomial Class
               6 Parameters (B0,B1,...,B5)

    y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
               Certified Regression Statistics

                                          Standard Deviation
     Parameter          Estimate             of Estimate
 @
 cbcse={        1.00000000000000         2152.32624678170,    
                1.00000000000000         2363.55173469681,    
                1.00000000000000         779.343524331583,    
                1.00000000000000         101.475507550350,    
                1.00000000000000         5.64566512170752,    
                1.00000000000000         0.112324854679312};
cb=cbcse[.,1];
cstdb=cbcse[.,2];
cR2= 0.999995559025820;

@Data:           y      x@
yx={          760.     0,
            -2042.     1,
             2111.     2,
            -1684.     3,
             3888.     4,
             1858.     5,
            11379.     6,
            17560.     7,
            39287.     8,
            64382.     9,
           113159.    10,
           175108.    11,
           273291.    12,
           400186.    13,
           581243.    14,
           811568.    15,
          1121004.    16,
          1506550.    17,
          2002767.    18,
          2611612.    19,
          3369180.    20};
y=yx[.,1];x=yx[.,2];
rhs=x~(x^2)~(x^3)~(x^4)~(x^5);
ans1=nistols(y,rhs,cb,cstdb,cr2);  
ans2=niolsqr2(y,rhs,cb,cstdb,cr2);  
format /ld  6,1;
"        " ans1;  
"   (          "  ans2   "   ) ";
"Wampler3 ";
end;
