R/thetaeffect.R

"thetaeffect" <- function(outcome.type,par.c,par.t,N,sigma){
    if (outcome.type=="bin"){
        pbar <- (par.c+par.t)/2
        theta <- (par.c-par.t)/sqrt(2*pbar*(1-pbar)/(N/2))
    }
    else if (outcome.type=="mean"){
        theta <- (par.c-par.t)*sqrt(N)/2/sigma
    }
    else{
        theta <- sqrt(N/4)*log(par.c/par.t)
    }
    return(theta)
}

Try the ldbounds package in your browser

Any scripts or data that you put into this service are public.

ldbounds documentation built on March 31, 2023, 5:16 p.m.