2012年6月7日 星期四

R 機率分配表


常態分配表

library("xtable")
x<-matrix(pnorm(seq(0,3.59,0.01),0,1),36,10,T)
rownames(x)<-seq(0,3.5,0.1)
colnames(x)<-seq(0,0.09,0.01)
xtable(x,digits=5)




T分配表

my.alpha<-c(0.25,0.1,0.05,0.025,0.01,0.005)
my.df<-c(1:30,40,60,Inf)
x<-qt(my.alpha,rep(my.df,each=length(my.alpha)),lower.tail=F)
x<-matrix(x,length(my.df),length(my.alpha),T)
rownames(x)<-my.df
colnames(x)<-my.alpha
xtable(x,digits=5)


卡方分配表

my.alpha<-c(0.1,0.05,0.025,0.01,0.005)
my.df<-c(1:30,seq(40,100,10))
x<-qchisq(1-my.alpha,rep(my.df,each=length(my.alpha)),lower.tail=F)
x<-matrix(x,length(my.df),length(my.alpha),T)
rownames(x)<-my.df
colnames(x)<-my.alpha
xtable(x,digits=5)

下載PDF檔案:https://docs.google.com/open?id=0B65mUklYPhUkdTRFZzdlTE0zbmc

下載R檔案:https://docs.google.com/open?id=0B65mUklYPhUkR0pUVlVZMVFDekk

沒有留言:

張貼留言