[R] t-test calculation correct?

Sascha Vieweg saschaview at gmail.com
Mon Jan 17 13:35:46 CET 2011


A multinomial logit model (N=192) revealed (besides others) the 
following statistics for the outcome, y, and one predictor, x:

- y = A (baseline, n=34)
- y = B (n=26), B(x)=0.7323 (SE=0.2384)
- y = C (n=132), B(x)=0.6535 (SE=0.2041)

With a t-test I want to explore whether the two predictors differ 
significantly, and I use the following calculation (according to 
Bortz, 2005, p.140):

##########
dm <- 0.7323 - 0.6535
se.dm <- sqrt( (0.2384 / (34 + 26)) + (0.2041 / (34 + 132)) )
t.val <- dm / se.dm
pval <- (1 - pt(t.val, df=(34+26+132) )) * 2
##########

My question is where this calculation is wrong and why.

Ref.: Bortz, J. (2005). Statistik für Human- und 
Sozialwissenschaftler (6. Aufl). Berlin: Springer.


-- 
Sascha Vieweg, saschaview at gmail.com



More information about the R-help mailing list