* E435 Nonlinear Computer Assignment sample 1 100 * Generating data set ranseed=119 genr u=nor(1) genr x=time(0) genr x2=x**2 genr x3=x**3 genr y=100+3*x-.05*x2+.0003*X3+10*u genr ty=100+3*x-.05*x2+.0003*X3 * Doing transformations genr lx=log(x) genr ly=log(y) genr x2=x*x genr x3=x**3 genr x4=x**4 genr x5=x**5 genr x6=x**6 genr rx=1/x genr ry=1/y * Doing regressions - try single and double logarithmic * equations, polynomials up to degree six, and some other * forms ols y x/predict=h1 ols ly lx/predict=h2 loglog genr hat2=exp(h2) ols ly x/predict=h3 loglin genr hat3=exp(h3) ols y lx/predict=h4 linlog ols y rx/predict=h5 ols y x x2/predict=h6 ols y x x2 x3/predict=h7 ols y x x2 x3 x4/predict=h8 ols y x x2 x3 x4 x5/predict=h9 ols y x x2 x3 x4 x5 x6/predict=h10 ols ly rx/predict=h11 loglin genr hat11=exp(h11) ols ry lx/predict=h12 genr hat12=1/h12