# Normalverteilungsplots fuer Beispiele 3.1 und 3.2; # siehe Abschnitt 6.3: dd <- read.table("Michelson.dat", header=T) X <- dd$velocity n <- length(X) NQ <- qnorm((1:n)/(n+1)) par(mai=c(0.5,0.5,0.05,0.05)) qqplot(NQ,X,pch=19,xlab="",ylab="") dd <- read.table("SIDS.txt",header=T) attach(dd) # Jetzt gibt es die Variable Weight an Stelle von dd$Weight. n <- length(Weight) NQ <- qnorm((1:n)/(n+1)) par(mfrow=c(2,2)) par(mai=c(0.05,0.05,0.05,0.05)) qqplot(NQ,rnorm(n),pch=19,xlab="",ylab="",xaxt="n",yaxt="n") qqplot(NQ,Weight,pch=19,xlab="",ylab="",xaxt="n",yaxt="n") qqplot(NQ,rnorm(n),pch=19,xlab="",ylab="",xaxt="n",yaxt="n") qqplot(NQ,rnorm(n),pch=19,xlab="",ylab="",xaxt="n",yaxt="n") par(mfrow=c(2,2)) par(mai=c(0.4,0.4,0.1,0.1)) nv <- c(20,40,100,500) for (i in 1:4) { n <- nv[i] NQ <- qnorm((1:n)/(n+1)) X <- rchisq(n,df=7) qqplot(NQ,X,pch=19,xlab="",ylab="") } par(mai=c(0.4,0.4,0.1,0.1)) n <- 1000 NQ <- qnorm((1:n)/(n+1)) Chi2Q <- qchisq((1:n)/(n+1),df=7) qqplot(NQ,Chi2Q,type="l",lwd=2,xlab="",ylab="")