Help with sas the sas program is this Hannahs esteemed pro

Help with sas....

the sas program is this ..

.

Hannah\'s esteemed professor was able to find (at least) 20 problems with her code. Can you find and correct the problems? (Please list these problems in your comments or word document.) When you are done, you should submit the corrected program, which should also be well formatted and commented, as well as a copy of the final log and output.

OPTIONS PS 58 LS 8 NODAT NONUMBER DATA sale efffffffffffffffffffffffffffffffffffff: IMPUT week of mmddyy8 Store Mon Tues Wed Thur Fri AvgSales (Mon Tues Wed Thurs Fri) /4 length Group $6 lable week of Date if AvgSales then Group \'N/A\' else if AvgSales LE 605 then Group \'Low else if 605 LT AvgSales LE 750 then Group Average else if AvgSales GT 750 then Group High if Store 110 then region. South else if Store 111 then region. South else if Store 112 then region North else if Store 113 then region. North else if Store 114 then region. North drop Mon Tues Wed Thur Fri DATA LINES 10/12/07 110 412 532 641 701 802 10/12/07 111 478 567 699 789 821 10/12/07 112 399 501 650 712 812 10/12/07 113 421 532 698 756 872 10/12/07 114 401 510 612 721 899 17/12/07 110 710 725 789 721 799 17/12/07 111 689 701 729 703 721 17/12/07 112 899 812 802 738 712 17/12/07 113 700 712 748 765 801 17/12/07 114 699 799 899 608 24/12/07 110 340 333 321 401 490 24/12/07 111 801 793 721 763 798 24/12/07 112 598 798 684 502 412 24/12/07 113 980 921 832 812 849 24/12/07 114 798 709 721 799 724 31/12/07 110 487 321 399 312 321 31/12/07 111 501 532 598 581 601 31/12/07 112 598 512 540 523 549 31/12/07 113 601 625 674 698 601 31/12/07 114 900 805 700 601 811 RUN PROC PRINT data sales label RUN

Solution

Suppose that a response variable may be foreseen by a linear operate of a regressor variable . you\'ll be able to estimate , the intercept, and , the slope, in
             
for the observations . Fitting this model with the REG procedure needs solely the subsequent MODEL statement, wherever y is that the outcome variable and x is that the regressor variable.
proc reg;
model y=x;
run;
For example, you may use multivariate analysis to search out out however well you\'ll be able to predict a child’s weight if you recognize that child’s height. the subsequent information ar from a study of 19 youngsters. Height and weight ar measured for every kid.
title \'Simple statistical regression\';
information Class;
input Name $ Height Weight Age @@;
datalines;
Alfred 69.0 112.5 fourteen Alice five6.5 84.0 thirteen Barbara sixty five.3 98.0 13
Carol 62.8 102.5 fourteen Henry sixty three.5 102.5 fourteen James five7.3 83.0 12
Jane 59.8 84.5 twelve Janet sixty two.5 112.5 fifteen Jeffrey sixty two.5 84.0 13
John 59.0 99.5 twelve writer five1.3 50.5 eleven Judy sixty four.3 90.0 14
Louise 56.3 77.0 twelve The Virgin sixty six.5 112.0 fifteen Prince Philip seventy two.0 150.0 16
Robert 64.8 128.0 twelve Ronald sixty seven.0 133.0 fifteen Thomas fifty seven.5 85.0 11
William 66.5 112.0 15
;
The equation of interest is
             
The variable Weight is that the response or variable quantity during this equation, and and ar the unknown parameters to be calculable. The variable Height is that the regressor or variable, and is that the unknown error. the subsequent commands invoke the REG procedure and work this model to the information.

ods graphics on;

proc reg;
model Weight = Height;
run;

ods graphics off;
Figure 73.1 includes some info regarding model work.
The datum for the general model is very important (=57.076, <0.0001), indicating that the model explains a major portion of the variation within the information.
The degrees of freedom may be employed in checking accuracy of the information and model. The model degrees of freedom ar one but the amount of parameters to be calculable. This model estimates 2 parameters, and ; thus, the degrees of freedom ought to be . The corrected total degrees of freedom ar forever one but the entire range of observations within the information set, during this case .
Several straightforward statistics follow the ANOVA table. the basis MSE is Associate in Nursing estimate of the quality deviation of the error term. The constant of variation, or Coeff volt-ampere, could be a unitless expression of the variation within the information. The R-square and Adj R-square ar 2 statistics employed in assessing the work of the model; values near one indicate a higher work. The R-square of zero.77 indicates that Height accounts for seventy seven% of the variation in Weight.
Figure 73.1 ANOVA Table
Simple Linear Regression

The REG Procedure
Model: MODEL1
Dependent Variable: Weight
Analysis of Variance
Source   DF   Sum of
Squares   Mean
Square   F Value   Pr > F
Model   1   7193.24912   7193.24912   57.08   <.0001
Error   17   2142.48772   126.02869        
Corrected Total   18   9335.73684           
Root MSE   11.22625   R-Square   0.7705
Dependent Mean   100.02632   Adj R-Sq   0.7570
Coeff Var   11.22330        
The \"Parameter Estimates\" table in Figure seventy three.2 contains the estimates of and . The table conjointly contains the statistics and also the corresponding -values for testing whether or not every parameter is considerably completely different from zero. The -values (, and , ) indicate that the intercept and Height parameter estimates, severally, ar extremely important.
From the parameter estimates, the fitted model is
             
Figure 73.2 Parameter Estimates
Parameter Estimates
Variable   DF   Parameter
Estimate   Standard
Error   t Value   Pr > |t|
Intercept   1   -143.02692   32.27459   -4.43   0.0004
Height   1   3.89903   0.51609   7.55   <.0001
If you alter ODS Graphics with Associate in Nursing ODS GRAPHICS statement, then PROC REG produces a range of helpful plots. Figure 73.3 shows a plot of the residuals versus the regressor and Figure seventy three.4 shows a panel of diagnostic plots.
Figure 73.3 Residuals vs. Regressor
Residuals vs. Regressor

Figure 73.4 work nosology
Fit nosology

A trend within the residuals would indicate nonconstant variance within the information. The plot of residuals by foreseen values within the upper-left corner of the nosology panel in Figure seventy three.4 may indicate a small trend within the residuals; they seem to extend slightly because the foreseen values increase. A fan-shaped trend may indicate the requirement for a variance-stabilizing transformation. A curving trend (such as a semicircle) may indicate the requirement for a quadratic term within the model. Since these residuals don\'t have any apparent trend, the analysis is taken into account to be acceptable.

Help with sas.... the sas program is this .. . Hannah\'s esteemed professor was able to find (at least) 20 problems with her code. Can you find and correct the
Help with sas.... the sas program is this .. . Hannah\'s esteemed professor was able to find (at least) 20 problems with her code. Can you find and correct the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site