This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: predict(lmskin,new) #5. Residual plot names(lmskin)# This will show you what kind of outputs R has stored for the 'lm' command lmskin$resid# Residuals for our leastsqures regression line plot(lmskin$resid~latitude)# residual plot abline(0,0)# add a horizontal line with slope 0 and y intercept 0 ### We can adjust y axis range with the option 'ylim' plot(lmskin$resid~latitude,ylim=c(100,100)) abline(h=0) Sheet1 Page 2 #### We can do the same job with R commander. #### (1) Load the R commader package : library(Rcmdr) #### (2) Import the data file : Data > Import Data > from text file, . ..... #### (3) Fit the leastsqaure regression line : Statistics > Fit models > Linear Regression #### (4) Draw the scatter plot with the fitted line : Graphs > Scatterplot # Prediction is not available in R commander # correlation coefficient (r) : # In R commander, Statistics > Summaries > Correlation Matrix. ....
View
Full
Document
This note was uploaded on 09/11/2011 for the course STAT 200 taught by Professor Agniel during the Spring '09 term at University of Illinois at Urbana–Champaign.
 Spring '09
 Agniel
 Correlation, Correlation Coefficient

Click to edit the document details