https://github.com/cran/IQCC
Raw File
Tip revision: 015c96430f6bddf3c9b4b20d878ceae380a023be authored by Emanuel P. Barbosa on 21 September 2009, 00:00:00 UTC
version 1.0
Tip revision: 015c964
alfa.R
alfa <-
function(n){
d2<-function(n){
d<-integrate(function(w){1-ptukey(w,n,Inf)},0,Inf)
d
}
d3<-function(n){
int<-integrate(function(w){w*(1-ptukey(w,n,Inf))},0,Inf)
e<-sqrt(2*int[[1]]-(d2(n)[[1]])^2)
e
}
D1<-function(n){
d1<-max(0, d2(n)[[1]]-3*d3(n))
d1
}
D2<-function(n){
D2<-d2(n)[[1]]+3*d3(n)
D2
}
risco<-function(n){
risco<- 1-(ptukey(D2(n), n, Inf)- ptukey(D1(n), n, Inf))
risco
}
return(risco(n))
}

back to top