Description Usage Arguments Details Value Author(s) References See Also Examples
dep.t.test.second
conducts a ttest with dependent samples using published work.
1 2  dep.t.test.second(m, sd, n, corr,
unbiased = TRUE, sig.level = 0.05, digits = 3)

m 
a numeric vector contains the means (length( 
sd 
a numeric vector contains the sample/unbiased standard deviations (length( 
n 
a numeric contains the sample size (length( 
corr 
a numeric contains the correlation 
unbiased 

sig.level 
a numeric contains the significance level (default 0.05) 
digits 
the specified number of decimal places (default 3) 
This function conducts a ttest with dependent samples using published work.
The returned object of dep.t.test.second
contains the following components:
samp.stat 
returns the means, standard deviations, sample size, and correlation 
raw.difference 
returns a raw mean difference, its' confidence interval, and standard error 
standardized.difference 
returns a standardized mean difference (Hedges's g) and its' approximate confidence interval for a population standardized mean difference 
Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp
Kline RB (2004) Beyond significance testing: Reforming data analysis methods in behavioral research. Washington: American Psychological Association.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
##Kline (2004) Table 4.4
dat < data.frame(y = c(9,12,13,15,16,8,12,11,10,14),
x = rep(factor(c("a","b")), each=5),
subj = rep(paste("s", 1:5, sep=""), times=2)
)
datwide < reshape(dat, direction="wide", idvar="subj", timevar="x")
dep.t.test.second(m = tapply(dat$y, dat$x, mean),
sd = tapply(dat$y, dat$x, sd),
n = nlevels(dat$subj),
corr = cor(datwide[,2:3])[1,2]
)
dep.t.test.second(m = tapply(dat$y, dat$x, mean),
sd = tapply(dat$y, dat$x, sd),
n = 30,
corr = cor(datwide[,2:3])[1,2]
)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.