Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Performing two sample t test on regression coefficients stored

    Hi,

    I am trying to perform a two sample t test to check if two coefficients are different from one another, but I cant really figure out the correct syntax to use for that
    Click image for larger version

Name:	Screenshot 2021-05-05 at 16.14.03.png
Views:	1
Size:	43.0 KB
ID:	1607814


    I would like to assess wether d_e1_1 ... d_e19_1 are different for top_regression and bottom_regression

    Thereafter I need to check if the aggregated coefficients combined are different for top_regression and bottom_regression.

    What commands/code do I need to use here?
    I tried the suest command, but in combination with the ttest I am not sure what variables to put

  • #2
    Whenever the coefficients are from two different regression models this is usually not that simple. You need to be sure the two groups are actually OK to be compared. Here is an example with Stata that might be an option for you. https://stats.stackexchange.com/ques...lt/60900#60900
    Best wishes

    (Stata 16.1 MP)

    Comment


    • #3
      Hmm I don't fully understand the solution there.

      I am fairly confident that it is okay to compare the two groups, but it should include the standard errors for every coefficient as well.

      Both full regression results are stored in the post estimate command.

      I thought via suest I could be able to test for significance if they are actually different from eachother, but not sure how to use the suest command incombination with the ttest command.
      Do you happen to know that?

      Comment


      • #4
        To better improve your changes of getting an answer, there's a lot of detail that is left unsaid that you can further explain. See the FAQ for details.

        Outside of a simulation scenario, I don't understand why you might want to compare sets of coefficients with a t-test. -suest- (or alternatively, interaction terms) are much more natural for comparing differences in coefficients between two groups within a common regression framework.

        If the coefficients come from regressions on the same dataset, then they are vey likely to not be independent and will violate the assumptions of a t-test and as such, results will be invalid.

        Comment

        Working...
        X