4
$\begingroup$

I need to know the types of tests I need to be thinking about for this stats project. I will then go and look up the specific tests you recommend. The data is from all 50 states for the years 1960-2010.

I think the best way to illustrate the data is to show an example (I just made up numbers):

State           Condition       Score
Alabama1995     Condition 1     .534
Alabama1996     Condition 1     .343
Alabama1997     Condition 1     .545
Alabama1998     Condition 2      NA
Alabama1999     Condition 2     .344
....
Alaska1995      Condition 2     .434
Alaska1996      Condition 2     .444
Alaska1997      Condition 2      NA
Alaska1998      Condition 3     .456
Alaska1999      Condition 3     .678
Alaska2000      Condition 3     .437
....
Maine1995       Condition 3     .343
Maine1996       Condition 3     .342
Maine1997       Condition 3     .543
Maine1998       Condition 1     .439

So what I want to know is if the conditions and scores are statistically different. Do states when under condition 3 have a significant difference from states when under 2 or 1?

Let's say a state in a given year was either condition 1, 2, 3.

Not all states could have a score computed for them, but most did.

I want to evaluate the following types of things:

  • What is the relationship between conditions and scores?
  • What is the relationship between time and conditions and scores?
  • When a state changed from condition 1 to condition 2, was the change in score significant?
  • Does condition 1 overall have a higher/lower score than other conditions?

Are there other things besides simple significance tests I should be thinking about?

Ideally something that R (Rcmdr!) can do nicely. Stata, SPSS are also available to me.

$\endgroup$

1 Answer 1

3
$\begingroup$

If you are doing simple regression, you will run into some problem with your standard errors because the readings of different year within the same state is likely to be correlated.

You may want to use multilevel model for your data. Anyway, you may first break off the year into another column before doing your analysis and let it start from 0 for 1995 for easier interpretation. A basic one should look something like this:

lmer(Score~Time+as.factor(Condition)+(1|State))

or if time is of interest,

lmer(Score~Time+as.factor(Condition)+(Time|State))

Then you can test around for linearity, interaction, the usual type of tests you would do for any models. The coefficients should answer your questions.

$\endgroup$
2
  • $\begingroup$ I was wondering if you could explain further your first statement about the simple regression and the usage of multilevel models $\endgroup$
    – dassouki
    Commented Oct 20, 2011 at 19:25
  • 2
    $\begingroup$ Simple regression is like treating each record as independent. In that case, the sample size would be exaggerated since the records within the same state are possibly correlated. A multilevel model introduce a random random effect that allows each state to be different. It is also known by a couple of different names though, random/varying intercept model; mixed effects model. Hope this helps. $\endgroup$
    – King
    Commented Oct 20, 2011 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.