Download presentation
Presentation is loading. Please wait.
Published byGeraldine McKenzie Modified over 9 years ago
1
Nonlinear Models
2
Learning Example: knnl533.sas Y = relative efficiency of production of a new product (1/expected cost) X 1 : Location A : X 1 = 1, B: X 1 = 0 X 2 = time (weeks) n = 30
3
Learning Example: input data learning; infile 'I:\My Documents\Stat 512\CH13TA04.DAT'; input x1 x2 y; label x1 = 'Location' x2 = 'Week' y = 'Efficiency'; proc print data = ch13tab04; run; Obsx1x2y 1110.483 2120.539 3130.618 4150.707 5170.762 61100.815 71150.881 81200.919 ⁞⁞⁞⁞
4
Learning Example: Interaction plot title1 'Plot of the data'; symbol1 v = ‘B' i = none c = blue; symbol2 v = ’A' i = none c = red; proc gplot data = learning; plot y*x2 = x1; run;
5
Learning Example: Interaction plot (cont)
6
Learning Example: Model proc nlin data = learning method = newton; parms g0=1.025 g1=-0.0459 g2=-0.5 g3=-0.122 ; model y = g0 + g1*x1 + g2*exp(g3*x2); output out = nlinout p = pred; run; The NLIN Procedure Dependent Variable y Method: Newton Iterative Phase Iterg0g1g2g3Sum of Squares 01.0250-0.0459-0.5000-0.12200.0160 11.0158-0.0473-0.5466-0.13250.00336 21.0156-0.0473-0.5524-0.13470.00329 31.0156-0.0473-0.5524-0.13480.00329 NOTE: Convergence criterion met.
7
Learning Example: Results SourceDFSum of SquaresMean SquareF Value Approx Pr > F Model30.86340.28782272.64<.0001 Error260.003290.000127 Corrected Total290.8667 ParameterEstimate Approx Std Error Approximate 95% Confidence Limits g01.01560.003691.00801.0232 g1-0.04730.00411-0.0557-0.0388 g2-0.55240.00825-0.5694-0.5355 g3-0.13480.00452-0.1441-0.1255
8
Learning Example: Results (cont) Approximate Correlation Matrix g0g1g2g3 g01.0000000-0.5560826-0.12478860.4236608 g1-0.55608261.00000000.0000000 g2-0.12478860.00000001.00000000.5741495 g30.42366080.00000000.57414951.0000000
9
Learning Example: Fitted Data data nlinout; set nlinout; if x1 = 0 then do; y1 = y; z21 = x2; p1 = pred; end; if x1 = 1 then do; y2 = y; z22 = x2; p2 = pred; end; run; symbol1 v = 'B' i = none c = blue; symbol2 v = 'A' i = none c = red; symbol3 v = none i = join c = blue; symbol4 v = none i = join c = red; proc gplot data = nlinout; plot y1*z21 y2*z22 p1*z21 p2*z22/overlay; run;
10
Learning Example: Fitted Data (cont)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.