skinRcmdr - summary(RegModel.1) # heights data x11() # new...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 # Two examples of scatter plots, correlation and regression lines library(Rcmdr) # Skin Cancer Data skin <- read.table("Skin.csv", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE) showData(skin, placement='-20+200', font=getRcmdr('logFont'), maxwidth=80, maxheight=30) scatterplot(mortality~latitude, reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=skin) cor(skin[,c("latitude","mortality")], use="complete.obs") RegModel.1 <- lm(mortality~latitude, data=skin)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: summary(RegModel.1) # heights data x11() # new graphics window heights &lt;- read.table(&quot;heights.txt&quot;, header=TRUE, sep=&quot;&quot;, na.strings=&quot;NA&quot;, dec=&quot;.&quot;, strip.white=TRUE) showData(heights, placement='-20+200', font=getRcmdr('logFont'), maxwidth=80, maxheight=30) scatterplot(Dheight~Mheight, reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=heights) cor(heights[,c(&quot;Dheight&quot;,&quot;Mheight&quot;)], use=&quot;complete.obs&quot;) RegModel.2 &lt;- lm(Dheight~Mheight, data=heights) summary(RegModel.2)...
View Full Document

Ask a homework question - tutors are online