# How to calculate cohen's d (and CI) for survey data

I am working with the TIMMS and PIRLS data. Both data sets use a Jackknife repeated replication design. Both data sets also use 5 plausible values for each student's grade (5 values with different imputations/models)

I want to compute the Cohen's D and its confidence interval of two groups of students (say girls vs boys).

1) from what I understand from the JRR, the Jackknife is only used to compute the standard error of the mean of a group -- and as far as I understand I do not need the s.e. I need the mean (which is the mean of the weighted mean of each plausible value), and the variance (which is the mean of the weighted variance of each plausible value). Is this right so far?

2) To calculate D, I need to pool the two groups' variances. Here lies my first problem: what are the N for each group (Nboys and Ngirls)? Since the data is weighted, how do I calculate the N for each group?

3) To compute the confidence interval of the D, I am using the MBEES R package which uses the non-central t-distribution technique. Again I need the two N for that. But more to the point, I feel I am cheating somewhere. I just avoided using the whole JRR machinery because I do not need the confidence interval for the mean - but now I am talking of confidence intervals (for the D) shouldn't I use the JRR somewhere??

PS. I found easier to learn about JRR (and BRR) from the R code of the package intsvy which performs the JRR calculations for mean, and for regression confidence (files intsvy.mean.pv.R and intsvy.reg.pv.R)

if your goal is to simply compare two groups with timss and pirls then i recommend using svycontrast which has been implemented to work with multiply-imputed, jackknifed survey data. to do this, you can load both timss[1] and pirls[1] directly onto your laptop by following those step-by-step instructions. once you've created the complex-sample survey design object that you want, you should be able to modify this snippet of svycontrast code that precisely matches the OECD's PISA methodology (another replication-based and multiply-imputed publicly-available survey dataset).