eda1-handout - S : Copyright Lucent Technologies, Inc....

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

View Full Document Right Arrow Icon
1) File eda1.txt eda1<-function(x){ #postscript("eda.fig1",horizontal=F) par(mfrow=c(2,2),oma=c(4,2,6,2),mar=c(5,5,4,2)) hist(x,las=1) boxplot(x,las=1) iqr<-summary(x)[5]-summary(x)[2] plot(density(x, width=2*iqr), xlab="x", ylab="y", type="l", las=1) qqnorm(x,las=1) qqline(x) par(mfrow=c(2,2),oma=c(4,2,6,2),mar=c(5,5,4,2)) mtext(side=3,line=2,cex=1.2,outer=T, "Figure 1. Exploratory Data Analysis Plots") } ******************************************************************** S-PLUS : Copyright (c) 1988, 2003 Insightful Corp.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: S : Copyright Lucent Technologies, Inc. Academic Site Edition Version 6.2.1 for Microsoft Windows : 2003 Working data will be in C:\PROGRA~1\INSIGH~1\splus62\users\XUFENG~1 This program will expire in 362 days. &gt; source(&quot;c:/PC98-2/Niu-Class/Sta5166/year2005/eda1.txt&quot;) &gt; x1&lt;-rnorm(1000, 0,1) &gt; eda1(x1) &gt; mean(x1) [1] 0.01401836 &gt; var(x1) [1] 0.9186881 &gt; summary(x1) Min. 1st Qu. Median Mean 3rd Qu. Max. -3.138427 -0.630571 0.015014 0.014018 0.667752 3.988249...
View Full Document

Ask a homework question - tutors are online