Announcement

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

  • Checking for Hetro in Longitudinal (Panel) Data

    Good Day,
    I am trying to check for hetro issue in my longitudinal data where the N is large and P is small. I have run the following command:

    xtgls mig_dummy lagSPEI i.age_cat i.Gender , igls panels(heteroskedastic)
    estimates store hetero
    xtgls mig_dummy lagSPEI i.age_cat i.Gender
    local df = e(N_g) - 1
    latest hetero1 . , df(`df'

    but I get the error
    matsize too small - should be at least 2157
    r(908);

    I have also aplied the command
    set matsize 200, permanently
    But the error is still percisting.

    My data from the dataex command is:

    [CODE]
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(mig_dummy lagSPEI age_cat) byte Gender
    0 -.376669 30 2
    0 .751355 30 2
    0 1.18046 30 2
    0 .785417 30 2
    0 1.81745 30 2
    0 1.01097 30 2
    0 1.50308 30 2
    0 .0247821 30 2
    0 -.41504 30 2
    0 -.689454 30 2
    0 1.34077 30 2
    0 .965805 30 2
    0 1.14084 30 2
    0 1.51453 30 2
    1 .354391 30 2
    0 .751355 30 1
    0 1.18046 30 1
    0 .785417 30 1
    0 1.81745 30 1
    0 1.01097 30 1
    0 1.50308 30 1
    0 .0247821 30 1
    0 -.41504 30 1
    0 -.689454 30 1

    Could anyone please advise me how to proceed with it as I need to check at least for hetro.
    Thanking you

  • #2
    Shifa:
    if you have a N>T panel dataset, you should consider -xtreg-.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Thank you for your response. I have been over your discussuion about xtreg on

      https://www.statalist.org/forums/for...roskedasticity

      I wanted to ask should I do xtreg on categorical variables as well, my dependent variable is a dummy.


      Comment


      • #4
        Shifa:
        you should switch to -xtlogit- or -xtprobit-. However, please note that -xtlogit- allows conditional fixed effect, whereas -xtprobit- does not allow -fe- at all.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment

        Working...
        X