View Full Version : difference in correlated groups
Hi. I just found out that proc ttest assumes that the groups are independent. Does anybody know how to test difference in means if groups are not independent in SAS?
07-12-2010, 10:00 AM
How is there dependence? Are you looking at a matched pairs t-test?
The groups are stock returns. Therefore, there I believe there to be some correlation since they are for the same time period (30 years), just different stocks in the groups. I separate the groups based on a criterion. However, stocks still will be related to the market return overall and therefore the groups should be correlated.
Do you think you can make the assumption that the correlation to the market return overall is the same for each group?
Another way to ask is lets say you have 10 groups (a,b,c,d, etc) and that the overall market return is X. Do you think the correlation between a and X, b and X, c and X, etc are all the same?
It would be close, but I am working on a research paper and can't just assume that.
07-13-2010, 05:29 PM
I'm not a SAS person, but thought I'd throw in my two cents anyway.
Are you sure you can assume any correlation? I do financial analysis as a big part of my job, and I'm not sure you can. It would depend on exactly what stocks you are looking at and how they are grouped.
I suspect the overall health of the economy is going to act as a confounding variable here. As we enter a recession, the price of most stocks is going to decrease. But that doesn't mean that a decrease in one stock is at all related to a decrease in price for another stock. Both AT&T and GM stock prices may fall, but that doesn't mean they're not independent. Both prices fall because of other external factors.
That said, I'm not sure you can even assume that a particular stock price is at all related to overall market performance. Even in a down economy, some prices will go up. Even in economic boom times, some prices will go down. For example, if you randomly select Campbell's Soup during a recession, your results will be totally wrong. Why? Because people buy more soup during hard economic times and Campbell's price reflects strong sales.
Also, if you're looking at the market over a 30-year period, you need to control for splits and buybacks. Those would greatly affect your results, but would not be obvious from a snapshot view. If that isn't a variable, you may need to re-think your approach.
I have done a proc corr between my groups (10). They are highly correlated. For now I just run a regression with a dummy variable for one of the groups which will indicate the incremental change. SAS does give a SE for the dummy variable.
Thanks for all the comments.
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.