effectg.sub <-
function(x,y,locfun=tmean,varfun=winvarN,...){
#
# Compute a robust-heteroscedastic measure of effect size
# based on the measure of location indicated by the argument
# locfun, and the measure of scatter indicated by
# varfun.
#
# This subfunction is for the equal sample size case and is called by
# effectg when sample sizes are not equal.
#
# varfun defaults to winvarN, the Winsorized variance rescaled so that
# it estimates the population variance under normality.
#
library(MASS)
x<-x[!is.na(x)] # Remove any missing values in x
y<-y[!is.na(y)] # Remove any missing values in y
m1=locfun(x,...)
m2=locfun(y,...)
top=var(c(m1,m2))
pts=c(x,y)
#
bot=varfun(pts,...)
#
e.pow=top/bot
list(Var.Explained=e.pow,Effect.Size=sqrt(e.pow))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.