Announcement

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

  • xtpoisson on unbalanced panel data output endless iterations and fails to reach to actual estimations (stata2014)

    About 13,266 women (15-49 years) are observed (identified by id), from the date of the survey (exact date of interview) till 3 years preceding the survey.. or when they reach 15 years if before.
    The period of interest (3years preceding the survey) is split into sub-periods during which the age groups to which women belong are constant. The exposure variable captures the number of years of exposure in each age group, and the variable births, the number of births in each age group.

    year is just the whole part of the exact years
    (the total period of exposure is less than 3 year for those women who reach 15 years before it end, does it contribute to the problem?)

    I used
    xtset id year
    xtpoisson births i.agegroup2 i.agegroup3 i.agegroup4 i.agegroup5 i.agegroup6 i.agegroup7, re offset(exposure)
    xtpoisson births i.agegroup1 i.agegroup2 i.agegroup3 i.agegroup4 i.agegroup5 i.agegroup6 i.agegroup7, re offset( exposure) noconstant


    the age groups were dichotomised before xtpoisson

    I organised the data base and it looks like
    id exact date of interview exact age during the interview exact year age group births exposure year
    1 2015.917 44.25 2015.917 [40-45[ 0 3 2015
    2 2015.917 28.08333 2015.917 [25-30[ 1 3 2015
    3 2015.917 41.25 2015.917 [40-45[ 0 1.25 2015
    3 2015.917 41.25 2013.917 [35-40[ 0 1.75 2013
    4 2015.917 35.33333 2015.917 [35-40[ 0 0.3333321 2015
    4 2015.917 35.33333 2014.917 [30-35[ 0 2.666668 2014
    5 2015.917 16.08333 2015.917 [15-20[ 0 1.083334 2015
    6 2015.917 34.5 2015.917 [30-35[ 1 3 2015
    7 2015.917 36.91667 2015.917 [35-40[ 1 1.916668 2015
    7 2015.917 36.91667 2013.917 [30-35[ 0 1.083332 2013
    8 2015.917 45.25 2015.917 [45-50[ 0 0.25 2015
    8 2015.917 45.25 2014.917 [40-45[ 0 2.75 2014
    9 2015.917 48.08333 2015.917 [45-50[ 1 3 2015
    10 2015.917 32.08333 2015.917 [30-35[ 1 2.083332 2015
    10 2015.917 32.08333 2012.917 [25-30[ 0 0.9166679 2012
    11 2015.917 41.66667 2015.917 [40-45[ 0 1.666668 2015
    11 2015.917 41.66667 2013.917 [35-40[ 0 1.333332 2013
    12 2015.917 38.83333 2015.917 [35-40[ 1 3 2015
    13 2015.917 18 2015.917 [15-20[ 0 3 2015
    14 2015.917 15.75 2015.917 [15-20[ 0 0.75 2015
    15 2015.917 19.58333 2015.917 [15-20[ 1 3 2015
    16 2015.917 30.75 2015.917 [30-35[ 1 0.75 2015
    16 2015.917 30.75 2014.917 [25-30[ 0 2.25 2014
    17 2015.917 23.75 2015.917 [20-25[ 1 3 2015
    18 2015.917 17.33333 2015.917 [15-20[ 0 2.333334 2015
    19 2015.917 22.75 2015.917 [20-25[ 1 2.75 2015
    19 2015.917 22.75 2012.917 [15-20[ 0 0.25 2012
    20 2015.917 35.83333 2015.917 [35-40[ 0 0.8333321 2015
    20 2015.917 35.83333 2014.917 [30-35[ 1 2.166668 2014
    21 2015.917 19.58333 2015.917 [15-20[ 2 3 2015
    22 2015.917 28.08333 2015.917 [25-30[ 1 3 2015
    23 2015.917 31.33333 2015.917 [30-35[ 0 1.333334 2015
    23 2015.917 31.33333 2013.917 [25-30[ 1 1.666666 2013
    24 2015.917 29.16667 2015.917 [25-30[ 2 3 2015
    25 2015.917 45.58333 2015.917 [45-50[ 0 0.5833321 2015
    25 2015.917 45.58333 2014.917 [40-45[ 0 2.416668 2014
    26 2015.917 26.91667 2015.917 [25-30[ 0 1.916666 2015
    26 2015.917 26.91667 2013.917 [20-25[ 0 1.083334 2013
    27 2015.917 37.75 2015.917 [35-40[ 0 2.75 2015
    27 2015.917 37.75 2012.917 [30-35[ 0 0.25 2012
    28 2015.917 30.91667 2015.917 [30-35[ 0 0.916666 2015
    28 2015.917 30.91667 2014.917 [25-30[ 0 2.083334 2014
    29 2015.917 17.33333 2015.917 [15-20[ 1 2.333334 2015
    30 2015.917 17.91667 2015.917 [15-20[ 0 2.916666 2015
    31 2015.917 38.41667 2015.917 [35-40[ 1 3 2015
    32 2015.917 28.91667 2015.917 [25-30[ 1 3 2015
    33 2015.917 44.41667 2015.917 [40-45[ 1 3 2015
    34 2015.917 22 2015.917 [20-25[ 1 2 2015
    34 2015.917 22 2012.917 [15-20[ 0 1 2012
    35 2015.917 44.58333 2015.917 [40-45[ 0 3 2015
    36 2015.917 36.33333 2015.917 [35-40[ 0 1.333332 2015
    36 2015.917 36.33333 2013.917 [30-35[ 0 1.666668 2013
    37 2015.917 40.41667 2015.917 [40-45[ 0 0.4166679 2015
    37 2015.917 40.41667 2014.917 [35-40[ 0 2.583332 2014
    38 2015.917 28.5 2015.917 [25-30[ 1 3 2015
    39 2015.917 44.58333 2015.917 [40-45[ 0 3 2015
    40 2015.917 22.66667 2015.917 [20-25[ 1 2.666666 2015
    40 2015.917 22.66667 2012.917 [15-20[ 0 0.333334 2012
    41 2015.917 22.75 2015.917 [20-25[ 0 2.75 2015
    41 2015.917 22.75 2012.917 [15-20[ 0 0.25 2012
    42 2015.917 26.83333 2015.917 [25-30[ 2 1.833334 2015
    42 2015.917 26.83333 2013.917 [20-25[ 0 1.166666 2013
    43 2015.917 15.5 2015.917 [15-20[ 0 0.5 2015
    44 2015.917 29 2015.917 [25-30[ 1 3 2015
    45 2015.917 28 2015.917 [25-30[ 2 3 2015
    46 2015.917 39.83333 2015.917 [35-40[ 1 3 2015
    47 2015.917 30.41667 2015.917 [30-35[ 1 0.416666 2015
    47 2015.917 30.41667 2014.917 [25-30[ 0 2.583334 2014
    48 2015.917 35.5 2015.917 [35-40[ 0 0.5 2015
    48 2015.917 35.5 2014.917 [30-35[ 0 2.5 2014
    49 2015.917 43.33333 2015.917 [40-45[ 0 3 2015
    50 2015.917 18.66667 2015.917 [15-20[ 0 3 2015
    Thank you for your help
    Last edited by Flory Kamgaing; 13 Jul 2017, 01:40.

  • #2
    Flory:
    welcome to the list.
    It may well be that your problem are related to -i.agegroup*- (admittedly, I fail to get why you had to create so many factor variables for age categories; couldn't you simply create a unique -i.agegroup- including all the different age groups?).
    That said, the usual recipe to sniff out the culprit (if any) is to start with a more parsimoniuos model, adding one predictor at time and see when Stata starts to iterate indefinitely.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your help.
      In fact I created a single variable "age group", and tried first with
      Code:
      xtpoisson births iagegroup
      , but had the same issue. I tried then to dichotomised the variable......
      Last edited by Flory Kamgaing; 13 Jul 2017, 09:22.

      Comment


      • #4
        Flory:
        do you have little/no variation is some of your predictors?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Yes I think so: The predictors (age group) sometimes remain the same for a women, when she stays in the same age group during the 3 years preceding the survey, in this case the "exposure" is 3 years, some times the women goes throught 2 different age groups during the period of interest ( 3 years preceding the survey), I monitor the time in each age group with the variable "exposure".

          I was also wondering if it is not correct to have for some women the period of interest less than 3 years preceding the survey if, going backward, they reach 15 years old before the end of the period of observation (because we do not observe them before the age of 15 years old).

          Thank you very much for your time.

          Flory

          Comment


          • #6
            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input float(id surveyexact yearexact grpage births expo year)
             1 2015.9166 2015.9166 6 0         3 2015
             2 2015.9166 2015.9166 3 1         3 2015
             3 2015.9166 2015.9166 6 0      1.25 2015
             3 2015.9166 2013.9166 5 0      1.75 2013
             4 2015.9166 2015.9166 5 0  .3333321 2015
             4 2015.9166 2014.9166 4 0  2.666668 2014
             5 2015.9166 2015.9166 1 0  1.083334 2015
             6 2015.9166 2015.9166 4 1         3 2015
             7 2015.9166 2015.9166 5 1  1.916668 2015
             7 2015.9166 2013.9166 4 0 1.0833321 2013
             8 2015.9166 2015.9166 7 0       .25 2015
             8 2015.9166 2014.9166 6 0      2.75 2014
             9 2015.9166 2015.9166 7 1         3 2015
            10 2015.9166 2015.9166 4 1  2.083332 2015
            10 2015.9166 2012.9166 3 0  .9166679 2012
            11 2015.9166 2015.9166 6 0  1.666668 2015
            11 2015.9166 2013.9166 5 0  1.333332 2013
            12 2015.9166 2015.9166 5 1         3 2015
            13 2015.9166 2015.9166 1 0         3 2015
            14 2015.9166 2015.9166 1 0       .75 2015
            15 2015.9166 2015.9166 1 1         3 2015
            16 2015.9166 2015.9166 4 1       .75 2015
            16 2015.9166 2014.9166 3 0      2.25 2014
            17 2015.9166 2015.9166 2 1         3 2015
            18 2015.9166 2015.9166 1 0  2.333334 2015
            19 2015.9166 2015.9166 2 1      2.75 2015
            19 2015.9166 2012.9166 1 0       .25 2012
            20 2015.9166 2015.9166 5 0  .8333321 2015
            20 2015.9166 2014.9166 4 1  2.166668 2014
            21 2015.9166 2015.9166 1 2         3 2015
            22 2015.9166 2015.9166 3 1         3 2015
            23 2015.9166 2015.9166 4 0  1.333334 2015
            23 2015.9166 2013.9166 3 1  1.666666 2013
            24 2015.9166 2015.9166 3 2         3 2015
            25 2015.9166 2015.9166 7 0 .58333206 2015
            25 2015.9166 2014.9166 6 0  2.416668 2014
            26 2015.9166 2015.9166 3 0  1.916666 2015
            26 2015.9166 2013.9166 2 0  1.083334 2013
            27 2015.9166 2015.9166 5 0      2.75 2015
            27 2015.9166 2012.9166 4 0       .25 2012
            28 2015.9166 2015.9166 4 0   .916666 2015
            28 2015.9166 2014.9166 3 0  2.083334 2014
            29 2015.9166 2015.9166 1 1  2.333334 2015
            30 2015.9166 2015.9166 1 0  2.916666 2015
            31 2015.9166 2015.9166 5 1         3 2015
            32 2015.9166 2015.9166 3 1         3 2015
            33 2015.9166 2015.9166 6 1         3 2015
            34 2015.9166 2015.9166 2 1         2 2015
            34 2015.9166 2012.9166 1 0         1 2012
            35 2015.9166 2015.9166 6 0         3 2015
            36 2015.9166 2015.9166 5 0  1.333332 2015
            36 2015.9166 2013.9166 4 0  1.666668 2013
            37 2015.9166 2015.9166 6 0  .4166679 2015
            37 2015.9166 2014.9166 5 0  2.583332 2014
            38 2015.9166 2015.9166 3 1         3 2015
            39 2015.9166 2015.9166 6 0         3 2015
            40 2015.9166 2015.9166 2 1  2.666666 2015
            40 2015.9166 2012.9166 1 0   .333334 2012
            41 2015.9166 2015.9166 2 0      2.75 2015
            41 2015.9166 2012.9166 1 0       .25 2012
            42 2015.9166 2015.9166 3 2  1.833334 2015
            42 2015.9166 2013.9166 2 0  1.166666 2013
            43 2015.9166 2015.9166 1 0        .5 2015
            44 2015.9166 2015.9166 3 1         3 2015
            45 2015.9166 2015.9166 3 2         3 2015
            46 2015.9166 2015.9166 5 1         3 2015
            47 2015.9166 2015.9166 4 1   .416666 2015
            47 2015.9166 2014.9166 3 0  2.583334 2014
            48 2015.9166 2015.9166 5 0        .5 2015
            48 2015.9166 2014.9166 4 0       2.5 2014
            49 2015.9166 2015.9166 6 0         3 2015
            50 2015.9166 2015.9166 1 0         3 2015
            51 2015.9166 2015.9166 5 1         3 2015
            52 2015.9166 2015.9166 5 0         0 2015
            52 2015.9166 2014.9166 4 2         3 2014
            53 2015.9166 2015.9166 7 0  .4166679 2015
            53 2015.9166 2014.9166 6 0  2.583332 2014
            54 2015.9166 2015.9166 1 0   .833333 2015
            55 2015.9166 2015.9166 3 0         3 2015
            56 2015.9166 2015.9166 2 0       .75 2015
            56 2015.9166 2014.9166 1 0      2.25 2014
            57 2015.9166 2015.9166 5 0         3 2015
            58 2015.9166 2015.9166 7 0 1.0833321 2015
            58 2015.9166 2013.9166 6 0  1.916668 2013
            59 2015.9166 2015.9166 3 1         3 2015
            60 2015.9166 2015.9166 2 0       .25 2015
            60 2015.9166 2014.9166 1 0      2.75 2014
            61 2015.9166 2015.9166 3 1         3 2015
            62 2015.9166 2015.9166 6 0  .9166679 2015
            62 2015.9166 2014.9166 5 0  2.083332 2014
            63 2015.9166 2015.9166 6 0  2.083332 2015
            63 2015.9166 2012.9166 5 0  .9166679 2012
            64 2015.9166 2015.9166 2 0  1.166666 2015
            64 2015.9166 2013.9166 1 0  1.833334 2013
            65 2015.9166 2015.9166 2 0   .333334 2015
            65 2015.9166 2014.9166 1 0  2.666666 2014
            66 2015.9166 2015.9166 6 1  2.916668 2015
            66 2015.9166 2012.9166 5 0 .08333206 2012
            67 2015.9166 2015.9166 2 0  2.583334 2015
            67 2015.9166 2012.9166 1 0   .416666 2012
            end
            label values grpage grpage
            label def grpage 1 "[15-20[", modify
            label def grpage 2 "[20-25[", modify
            label def grpage 3 "[25-30[", modify
            label def grpage 4 "[30-35[", modify
            label def grpage 5 "[35-40[", modify
            label def grpage 6 "[40-45[", modify
            label def grpage 7 "[45-50[", modify

            Comment


            • #7
              Flory,

              In a regular Poisson model, the ML estimators do not exist if there perfect collinearity for the observations where the dependent variable is positive; I assume a similar thing will happen with RE. Maybe you can start by checking that? For more information on this, please install -ppml- and check the references in the help file.

              Best wishes,

              Joao

              Comment


              • #8
                Thank you,
                I installed ppml and I am reading the references for ppml.
                Please is it an issue if the total lenght of the period of observation is not the same for all the women? Knowing we have an unbalenced panel data, and each women is observed throught years.

                Flory

                Comment


                • #9
                  That's not an issue :-)

                  Comment

                  Working...
                  X