Announcement

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

  • Cross-sectional data and FEs

    Hi everyone,

    I'm working with patient-hospital data but I am unsure as to whether I should include hospital dummies in my ologit regression.
    My dependent variable is patient satisfaction which has been measured monthly, whilst my main explanatory variable is hospital quality measured quarterly. So, while I observe each person only once, I observe each hospital every quarter. Would it be sensible to add hospital FEs using factor notation?

  • #2
    Paula:
    welcome to this forum.
    I'm not sure I got you right here.
    You observe:
    - patients monthly (theoretically speaking, 12 times/year);
    - hospotal quality quarterly (4 times/year).
    Hnece, you do not observe each patient only once (otherwise it would not be a panel dataset).
    Saving you the usual comment that posting an example/excerpt of your data via -dataex- would help enormously, you may want to assume that the hospital quality level is the same for each month each quarter is composed of.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      Thanks for your quick response! I only observe each person once - i.e. a new set of individuals are interviewed every month.
      Here's an example of the data.

      input float(yr month) int(hospital_id patient_id) byte(sex satisf) float(age_group care_quality educ inco_tercile)
      2016 1 1001 1904 0 1 3 .8713795 3 3
      2016 1 1001 1905 1 2 3 .8713795 3 3
      2016 1 1001 1906 1 1 1 .8713795 3 3
      2016 1 1001 1907 0 2 4 .8713795 1 1
      2016 1 1001 1908 1 2 3 .8713795 . .
      2016 1 1001 1909 0 1 3 .8713795 3 3
      2016 1 1001 1911 0 4 2 .8713795 2 2
      2016 2 1001 1912 1 3 3 .8713795 2 1
      2016 2 1001 1913 1 4 2 .8713795 . .
      2016 2 1001 1914 0 3 2 .8713795 1 1
      2016 2 1001 1915 0 3 2 .8713795 1 1
      2016 2 1001 1916 0 4 3 .8713795 3 3
      2016 2 1001 1917 0 3 2 .8713795 3 3
      2016 3 1001 1918 1 3 2 .8713795 3 3
      2016 3 1001 1919 1 3 2 .8713795 1 1
      2016 3 1001 1920 1 3 3 .8713795 2 3
      2016 3 1001 1921 1 3 2 .8713795 2 2
      2016 3 1001 1922 1 3 2 .8713795 1 1
      2016 3 1001 1923 1 3 4 .8713795 3 3
      2016 3 1001 1924 1 3 4 .8713795 3 3
      2016 3 1001 1925 1 3 3 .8713795 3 2
      2016 3 1001 1926 1 4 3 .8713795 3 2
      2016 3 1001 1927 1 4 4 .8713795 . .
      2016 3 1001 1928 0 3 3 .8713795 2 3
      2016 4 1001 1929 0 3 4 .8713795 3 3
      2016 4 1001 1930 1 4 2 .8713795 3 2
      2016 4 1001 1931 0 3 4 .8713795 1 2
      2016 4 1001 1932 1 4 3 .8713795 2 2
      2016 4 1001 1933 0 4 3 .8713795 3 3
      2016 4 1001 1934 1 2 1 .8713795 3 2
      2016 5 1001 1935 0 1 4 .8545790 3 3
      2016 5 1001 1936 0 3 2 .8545790 3 2
      2016 5 1001 1937 1 2 3 .8545790 3
      2016 5 1001 1938 1 3 3 8545790 3 3
      2016 5 1001 1939 1 3 3 .8545790 3 3
      2016 5 1001 1940 1 3 3 .8545790 3
      2016 5 1001 1941 0 3 2 .8545790 1 .
      2016 5 1001 1942 0 3 3 .8545790 3 3
      2016 6 1001 1943 1 4 5 .8545790 3 2
      2016 6 1001 1944 0 2 2 .8545790 3 3
      2016 6 1001 1945 1 4 1 .8545790 3 2
      2016 7 1001 1946 0 2 2 .8545790 3 2
      2016 7 1001 1947 0 3 3 .8545790 3 3
      2016 7 1001 1950 0 2 2 .8545790 2 2
      2016 7 1001 1951 1 2 2 .8545790 1 1
      2016 7 1001 1952 0 3 3 .8545790 3 3
      2016 7 1001 1953 0 3 1 .8545790 2 1
      2016 7 1001 1954 0 3 3 .8545790 . .
      2016 8 1001 1955 0 2 4 .8545790 1 2
      2016 8 1001 1956 0 2 1 .8545790 2 1
      2016 8 1001 1957 0 3 2 .8545790 3 2
      2016 8 1001 1958 1 3 3 .8545790 3 3
      2016 8 1001 1959 0 2 4 .8545790 2 2
      2016 8 1001 1960 1 3 2 .8545790 3 .
      2016 8 1001 1961 1 2 2 .8545790 2 .
      2016 8 1001 1962 0 3 4 .8545790 2 2
      2016 8 1001 1963 0 3 4 .8545790 3 3
      2016 8 1001 1964 0 4 4 .8545790 3 3
      2016 8 1001 1965 0 3 4 .8545790 3 3
      2016 8 1001 1966 0 4 3 .8545790 2 2
      2016 8 1001 1967 1 1 3 .8545790 . .
      2016 8 1001 1968 1 3 2 .8545790 . .
      2016 9 1001 1970 0 2 2 .7524908 1 1
      2016 9 1001 1971 1 3 2 .7524908 2 2
      2016 9 1001 1972 1 3 2 .7524908 2 2
      2016 9 1001 1973 0 3 3 .7524908 3 3
      2016 10 1001 1974 1 3 3 .7524908 3 3
      2016 10 1001 1975 1 2 4 .7524908 2 2
      2016 10 1001 1976 1 3 1 .7524908 2 2
      2016 10 1001 1977 0 3 3 .7524908 3 3
      2016 10 1001 1978 0 4 1 .7524908 2 2
      2016 11 1001 1979 1 5 3 .7524908 3 3
      2016 11 1001 1980 0 2 4 .7524908 3 3
      2016 11 1001 1981 1 2 4 .7524908 3 3
      2016 11 1001 1982 1 4 4 .7524908 2 .
      2016 11 1001 1983 1 3 3 .7524908 2 .
      2016 11 1001 1984 0 4 3 .7524908 3 3
      2016 11 1001 1985 1 4 4 .7524908 3 3
      2016 11 1001 1986 0 3 2 .7524908 3 3
      2016 11 1001 1987 0 3 3 .7524908 3 3
      2016 12 1001 1988 1 2 3 .7524908 3 3
      2016 12 1001 1989 0 3 2 .7524908 3 3
      2016 12 1001 1990 1 3 2 .7524908 3 2
      2016 12 1001 1991 1 3 3 .7524908 3 3
      2016 12 1001 1993 1 2 2 .7524908 3 2
      2016 12 1001 1994 0 2 3 .7524908 3 2
      2016 12 1001 1995 0 2 3 .7524908 3 2
      2016 12 1001 1996 0 2 4 .7524908 3 3
      2016 7 1002 2033 1 3 3 .236472 2 2
      2016 7 1002 2035 0 1 3 .236472 3 3
      2016 7 1002 2036 1 4 3 .236472 . .
      2016 7 1002 2037 0 2 2 .236472 3 3
      2016 7 1002 2038 0 3 2 .236472 3 3
      2016 7 1002 2039 1 2 2 .236472 3 2
      2016 8 1002 2040 0 3 2 .236472 2 3
      2016 8 1002 2041 1 2 3 .236472 2 2
      2016 8 1002 2042 0 3 2 .236472 1 1
      2016 8 1002 2043 0 2 2 .236472 3 3
      2016 8 1002 2044 0 2 2 .236472 . .
      2016 8 1002 2045 0 3 2 .236472 . 2
      end

      Comment


      • #4
        Paula:
        I would go:
        Code:
         regress satisf i.month i.hospital_id i.age_group i.educ care_quality i.inco_tercile, vce(cluster patient_id)
        
        Linear regression                               Number of obs     =         84
                                                        F(19, 83)         =          .
                                                        Prob > F          =          .
                                                        R-squared         =     0.3832
                                                        Root MSE          =     .74732
        
                                    (Std. err. adjusted for 84 clusters in patient_id)
        ------------------------------------------------------------------------------
                     |               Robust
              satisf | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
               month |
                  2  |   1.315993   .5891296     2.23   0.028     .1442382    2.487748
                  3  |    1.21763   .5595117     2.18   0.032     .1047838    2.330476
                  4  |   1.546227   .5769275     2.68   0.009     .3987417    2.693713
                  5  |   .6581139   .6198047     1.06   0.291    -.5746526     1.89088
                  6  |   1.185492   1.058357     1.12   0.266    -.9195372     3.29052
                  7  |    .652328   .5799642     1.12   0.264    -.5011974    1.805853
                  8  |   1.168874   .5814847     2.01   0.048     .0123246    2.325424
                  9  |   .7351823    .628357     1.17   0.245    -.5145946    1.984959
                 10  |   1.119684   .5873727     1.91   0.060    -.0485762    2.287945
                 11  |   1.552455   .6371456     2.44   0.017     .2851981    2.819712
                 12  |   .4562108   .5598013     0.81   0.417    -.6572115    1.569633
                     |
         hospital_id |
               1002  |  -.5552284   .3463838    -1.60   0.113    -1.244172     .133715
                     |
           age_group |
                  2  |   .2798709   .5239279     0.53   0.595    -.7622006    1.321942
                  3  |   .3374218   .4635974     0.73   0.469    -.5846548    1.259498
                  4  |  -.2355706   .5221768    -0.45   0.653    -1.274159    .8030181
                  5  |   1.114989   .9636892     1.16   0.251    -.8017496    3.031729
                     |
                educ |
                  2  |   .2345967   .3899367     0.60   0.549    -.5409718    1.010165
                  3  |   .0464322   .3716858     0.12   0.901    -.6928359    .7857003
                     |
        care_quality |   4.15e-08   4.21e-08     0.99   0.326    -4.21e-08    1.25e-07
                     |
        inco_tercile |
                  2  |   .1958446   .4045844     0.48   0.630    -.6088576    1.000547
                  3  |   .1459527   .4240075     0.34   0.732    -.6973811    .9892865
                     |
               _cons |   1.457242   .5672654     2.57   0.012     .3289741     2.58551
        ------------------------------------------------------------------------------
        
        .
        No worries for the missing F-statistic: see -help j_robustsingular-.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hi Carlo,

          Many thanks for this! One last question, do you think it would be worth also looking at an ologit model given that the satisfaction measure is an ordinal variable?

          Comment


          • #6
            Paula:
            yes, it makes sense.
            That said, skim through the literature of your reserch field to see what others did in the past when presented with the same research aim.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X