Topic1

# Topic1 - Example Price Analysis for Diamond Rings in...

This preview shows pages 1–11. Sign up to view the full content.

Example: Price Analysis for Diamond Rings in Singapore Variables Response Variable: Price in Singapore dollars (Y) Explanatory Variable: Weight of diamond in carats (X) Goals Create a scatterplot Fit a regression line

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
diamond.sas (input) data diamonds; input weight price @@; cards; .17 355 .16 328 .17 350 .18 325 .25 642 .16 342 .15 322 .19 485 .21 483 .15 323 .18 462 .28 823 .16 336 .20 498 .23 595 .29 860 .12 223 .26 663 .25 750 .27 720 .18 468 .16 345 .17 352 .16 332
diamonds.sas (print out) proc print data=diamonds; run; Obs weight price 1 0.17 355 2 0.16 328 3 0.17 350 47 0.26 693 48 0.15 316

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
diamonds.sas (scatterplot) proc sort data=diamonds1; by weight; symbol1 v=circle i=sm70; title1 'Diamond Ring Price Study'; title2 'Scatter plot of Price vs. Weight with Smoothing Curve'; axis1 label=('Weight (Carats)'); axis2 label=(angle=90 'Price (Singapore \$\$)'); proc gplot data=diamonds1; plot price*weight / haxis=axis1 vaxis=axis2; run;
diamonds.sas (scatterplot, cont)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
diamonds.sas (linear regression line) symbol1 v=circle i=rl; title2 'Scatter plot of Price vs. Weight with Regression Line'; proc gplot data=diamonds1; plot price*weight / haxis=axis1 vaxis=axis2; run;
diamonds.sas (linear regression) proc reg data=diamonds; model price=weight/clb p r; output out=diag p=pred r=resid; id weight; run;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
diamonds.sas (linear regression, cont) Analysis of Variance
diamonds.sas (linear regression, cont) proc print data=diag; run; Output Statistics Dependent Predicted Std Error Std Error Obs weight Variable Value Mean Predict Residual Residual 1 0.17 355.0000 372.9483 5.3786 -17.9483 31.383 2 0.16 328.0000 335.7381 5.8454 -7.7381 31.299

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
diamond.sas (Residual plot) symbol1 v=circle i=NONE;
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/20/2012 for the course STAT 512 taught by Professor Staff during the Spring '08 term at Purdue.

### Page1 / 36

Topic1 - Example Price Analysis for Diamond Rings in...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online