DOC PREVIEW
UW-Madison STAT 411 - GPA+example

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Nordheim Statistics 411 Spring 2015 (Feb 24 or 26) Regression Estimation Example (Small College GPA) > sat=c(715,645,685,590,745,670,710,640) > gpa=c(3.82,2.81,3.36,2.47,3.60,2.87,3.29,2.34) > dfgpa sat gpa 1 715 3.82 2 645 2.81 3 685 3.36 4 590 2.47 5 745 3.60 6 670 2.87 7 710 3.29 8 640 2.34 > msat=mean(sat) > msat [1] 675 > mgpa=mean(gpa) >mgpa [1] 3.07 > out=lm(gpa~sat) > summary(out) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -3.328765 1.382278 -2.408 0.05270 . sat 0.009480 0.002043 4.640 0.00354 ** --- Residual standard error: 0.2679 on 6 degrees of freedom Multiple R-squared: 0.7821, Adjusted R-squared: 0.7457 F-statistic: 21.53 on 1 and 6 DF, p-value: 0.00354 > anova(out) Response: gpa Df Sum Sq Mean Sq F value Pr(>F) sat 1 1.54566 1.54566 21.53 0.00354 ** Residuals 6 0.43074 0.07179 600 650 700 7502.5 3.0 3.5satgpa0 200 400 6000 1 2 3satgpa> truesat=670 > yestreg=mgpa+.00948*(truesat-msat) > yestreg [1] 3.0226 > estvaryer=(1-8/300)*.07179/8 > estvaryer [1] 0.00873445 > seyestreg=sqrt(estvaryer) > seyestreg [1] 0.09345828 (This example has too small a sample size for computing a CI. With a larger sample size, however, one would ordinarily wish to compute a CI.) ------------------- Let us look briefly at the solution using ratio estimation. > Rhat=mgpa/msat > Rhat [1] 0.004548148 > yestrat=Rhat*truesat > yestrat [1] 3.047259 > rrat=gpa-Rhat*sat > resvarrat=(sum(rrat**2))/7 > resvarrat [1] 0.1212917 > estvarrat=(1-8/300)*resvarrat/8 > estvarrat [1] 0.01475716 > seyestrat=sqrt(estvarrat) > seyestrat [1] 0.121479 ------------------- Let us look briefly at the solution using SRS. yhatsrs = mgpa = 3.07 > vargpa=var(gpa) > vargpa [1] 0.2823429 > estvarsrs=(1-8/300)*vargpa/8 > seyhatsrs=sqrt(estvarsrs) > seyhatsrs [1]


View Full Document

UW-Madison STAT 411 - GPA+example

Download GPA+example
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view GPA+example and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view GPA+example 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?