10-01-2012 02:16 PM
I have two surveys (asking the same question) which are combined into one single dataset (table below)
What I'm interested in is testing whether the means in survey 1 is the same as the means in survey 2 (in this case is the mean of 6,8 in survey 1 statistical different from 6,2 in survey 2).
I had been thinking of using proc compare in this ways:
proc compare base=test allstats briefsummary;
var survey_1; with survey_2;
but I had been unsure whether the procedure actually will test the 2 means against each other using the std.dev. in both surveys or is the procedure actually doing a multiple testing of whether
5 = [empty],
7 = 7
[empty] = 7
|ID||Survey_1 (avg=6,8)||Survey_2 (avg 6,2)|
Really appreciate any kind of help
10-01-2012 02:25 PM
As far as I know, PROC COMPARE doesn't actually compare the means to each other using a standard statistical test. PROC TTEST is what you want to use.
10-01-2012 02:38 PM
A paired T-test or PROC Univariate (on the difference score) are the tests that are appropriate here. Of note, your example has less than half the observation with complete data (assuming the ID variable is unique to the person level). Both of those tests will exclude the subjects who just took the test once. That much missing data is causes me concern about generalizability.
PROC COMPARE is for comparing the raw data between two datasets.
10-02-2012 03:47 AM
Thanks for the answers for far.
Isn't TTEST only appropriare for samples around 30 observations or less (small sample)?
In my actual dataset, I have around 4000 observations in total (3500 for survey 1 and 3000 for survey 2). Couldn't this be a problem testing the means using TTEST?
10-02-2012 07:42 AM
TTEST is certainly appropriate, no matter the sample size, for this sort of comparison. However, check what Doc said--if you have a lot of unpaired results (only one test for a subject), the generalizability is going to be limited to those that have complete records, and those subjects may very well not be representative of your full sample or the population you want to infer the results for.