Homework2Key

# Homework2Key - Spring 2012 STAT 512 HW 2 Key Homework 2(14...

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

Spring 2012 STAT 512 HW 2 Key 1 Homework 2 (14 pts.) due Jan. 27 A reminder – Please do not hand in any unlabeled or unedited SAS output. Include in your write-up only those results that are necessary to present a complete solution (what you want the grader to grade). In particular, questions must be answered in order (including graphs), and all graphs must be fully labeled (main title should include the question number, and all axes should be labeled). Don’t forget to put all necessary information (see course policies) on the first page. Include the SAS input for all questions at the very end of your homework; this could be important even though it won’t be graded. You will often be asked to continue problems on successive homework assignments so save all your SAS code. 1. (9.5 pts.) For this problem, use the “plastic hardness” data described in the text with problem 1.22 on page 36. (CH01PR22.DAT) Make sure you understand which column is X and which is Y and read in the data accordingly. Code for the problem data HW2P1; infile 'I:\My Documents\Stat 512\CH01PR22.DAT' ; input hardness time; run ; * 1a *; symbol1 v =circle i =rl; title1 'Problem 1 Y vs. X plot' ; title2 'Linear regression line' ; proc gplot data =HW2P1; plot hardness*time; run ; *with smoothing NOT REQUIRED; symbol1 v =circle i =sm60; title1 'Problem 1 Y vs. X plot' ; title2 'Smoothing with nn=60' ; proc gplot data =HW2P1; plot hardness*time; run ; * 1c, d*; proc reg data =HW2P1; model hardness=time; run ; * 1f *; * to determine what t value to use; data a1; n= 16 ; alpha= .05 ; dfn= 2 ; dfd=n- 2 ; w2= 2 *finv( 1 -alpha,dfn,dfd); w=sqrt(w2); alphat= 2 *( 1 -probt(w,dfd)); tstar=tinv( 1 -alphat/ 2 , dfd); output ; proc print data =a1; run ; symbol1 i =rlclm98; title1 'Problem 1' ; title2 '95% Confidence Band' ; proc gplot data =HW2P1; plot hardness*time; run ;

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

View Full Document
Spring 2012 STAT 512 HW 2 Key 2 * this is the 'incorrect' graph; symbol1 i =rlclm95; title1 'Problem 1' ; title2 'Confidence Band using CL = 95%' ; proc gplot data =HW2P1; plot hardness*time; run ; * 1g *; symbol1 i =rlcli98; title2 '95% Bounds for individual observations' ; proc gplot data =HW2P1; plot hardness*time; run ; * this is the 'incorrect' graph; symbol1 i =rlcli95; title2 'Bounds for individual observations using CL = 95%' ; proc gplot data =HW2P1; plot hardness*time; run ; * 1h,i *; data add; time = 36 ; output ; time = 43 ; output ; data HW2P1Plus; set HW2P1 add; run ; proc reg data = HW2P1Plus; model hardness=time/ clm cli ; id time; run ; * 1j *; proc univariate data =HW2P1; var time; run ; * 1ji *; data power; n= 16 ; sig2= 10.45893 ; ssx= 1280 ; alpha= .05 ; sig2b1=sig2/ssx; df=n- 2 ; beta1= 0.5 ; delta=abs(beta1)/sqrt(sig2b1); tstar=tinv( 1 -alpha/ 2 ,df); power= 1 -probt(tstar,df,delta)+probt(-tstar,df,delta); output ; proc print data =power; run ;
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

Homework2Key - Spring 2012 STAT 512 HW 2 Key Homework 2(14...

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

View Full Document
Ask a homework question - tutors are online