# Sample size for the mean (or total) when you want to control the absolute maximum error.
Nc<-0.95
S<-sqrt(6.0590)
Emax.a<-0.2
N<-10000
n.MAS(N=N,Argt=c(S,Emax.a),opc=1)
# Sample size for the mean (or total) when you want to control the relative maximum error.
Cve<-0.4346
Emax.r<-0.05
N<-10000
n.MAS(N=N,Argt=c(Cve,Emax.r))
# Sample size for proportions when you want to control the absolute maximum error.
N<-10000
p<-14/30
Emax.a<-0.04
Nc<-0.9
n.MAS(N=N,Argt=c(p,Emax.a),opc=3,Nc=Nc)
# Sample size for proportions when you want to control the relative maximum error.
N<-10000
p<- 14/30
Emax.r<-0.1
Nc<-0.9
n.MAS(N=N,Argt=c(p,Emax.r),opc=4,Nc=Nc)
Run the code above in your browser using DataLab