Announcement

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

  • Multilevel Analysis

    Hey there, fellow people

    I have encountered Stata only a week ago - so far I was busy with SPSS, so excuse any silly questions.

    I am trying to carry out a random intercept model on the independent variable of new product sales (measured in lnsales) and the dependent variable sustainable label on product (measured as yes/no dummy: sust). Several moderators complicate this relationship:

    - degree of product innovativeness (scale from 1-8; innov)
    - promotional activity (yes/no; promo)
    - already existing products within category (continuous; sustcat)
    - vice or virtue category (dummy variable 1/0; vice)

    The level 2 variable, which the rest is nested in, is product category (keycat measured on a count scale).

    So far I have used the following command:

    xtmixed lnsales sust innov susxinnov promo susxpromo sustcat sustxsustca vice sustxvice (+various control variables), II keycat: II id:

    I have tried numerous different combinations (with and without interactions; removing and including various control variables), but I cannot seem to get the correct way. The main effect should be significant, but it just doesn't happen. Is there anything wrong with my command?

    Thanks!

  • #2
    Katha:
    the best way to obtain helpful replies is to report exactly not only what you typed, but also what Stata gave you back.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Katha, first of all, you perhaps are mistaking with independent and dependent variable. You are saying your independent var is 'Insales' but you added it in the model as dependent/outcome variable !! OR, if you are right (if it really is an IV), and you have a binary dependent variable (sust), then you need xtlogit, rather xtmixed. xtmixed is for continuous outcome variable.

      Second, as Carlo mentioned, you need to come up with the output stata produced. Please read the FAQ on how to post Stata outputs. These will substantially increase your chance to get a helpfull reply.
      Roman

      Comment


      • #4
        Hey there, it took me a while (and a lot of researching and struggling), but I have come to the conclusion that a negative binomial regression would be most fitting for my data. I have now taken another dv (=unitsales), which stands for count, and the same iv (=sust), incl. the interactions and their main effects (=susxshould susxinnov susxpromo sustcatxsus shouldscore innov promomax sustcat). The variables that follow are control variables (= lagunitsales catsales wdistr purfreq catprice introprice lagcatadv catadv lagownadv ownadv catcomp introdate date dmon02 dmon03 dmon04 dmon05 dmon06 dmon07 dmon08 dmon09 dmon10 dmon11 dmon12), where dmon02 - dmon12 are dummies for calendermonths. The two levels make up the last part of the equation: keycat means that all data is nested in product categories (14 different ones to be precise) and the third level is supposed to be a time-aspect. Yet, I don't fully understand what the "id" means here (I know that it probably points to a single product unit, but I don't get what that has to do with time? I was told to use "id" for indicating time...does anyone have an idea?). menbreg unitsales sust susxshould susxinnov susxpromo sustcatxsus shouldscore innov promomax sustcat lagunitsales catsales wdistr purfreq catprice introprice lagcatadv catadv lagownadv ownadv catcomp introdate date dmon02 dmon03 dmon04 dmon05 dmon06 dmon07 dmon08 dmon09 dmon10 dmon11 dmon12 || keycat: || id:

        I will attach the output as Excell file. I think it all makes sense now, but I am no expert.

        I am now trying to make sense of everything and started wondering whether I need to do a Hausmann test here and how to check for multicollinearity (and how to do it in stata?). Or is multicollinearity not something I check here as I don't have multiple predictors, but multiple interactions? And does anyone know how I include the time effect into my interpretation? I know that the interpretation of the negative binomial is not as straight forward as with a regression for example - how do I incorporate 2 additional levels though, when talking about the coefficients?


        I hope this is not too messy and understandable... Thanks!
        Attached Files

        Comment


        • #5
          Why would you post Stata output as an Excel file attachment here? Some of the most experienced forum participants don't use Excel. Some of us do, but won't download a file containing active, and potentially malicious, content from a stranger. The best way to show us the Stata output is to copy it directly from the Results window (or your log file) and paste it in a code block. To create a code block, click on the underlined A button, and then click on the # button. A pair of code block delimiters will appear. Paste between the delimiters. The result will be easily readable to everybody. If the results are so lengthy that this seems inappropriate, attach the log file itself: everyone using this forum should be able to open that in Stata.

          One point concerning your question about how id: incorporates time effects. This doesn't sound like a statistics or Stata question: it sounds like a question about your dataset and how it was created and what its variables mean. That kind of question is more likely to get a useful answer if addressed to the sources that provided the data in the first place. It is unlikely that anyone here will know anything about this unless you are using some standard, widely available data set (in which case you should identify it clearly in your post).

          Concerning collinearity, some general remarks apply. First, if true collinearity existed among your variables, Stata would have notified you of this as part of the estimation output, and it would have removed one or more of the offending variables to eliminate it. If your concern is that there is "near-collinearity" among your predictors, you have to distinguish two cases. If there is collinearity among the variables that you are including simply to "control" for their effects, then there is no problem: collinearity here has no effect on the estimation of the effects of interest. The real area of concern is whether you have "control variables" that are highly correlated with your predictor(s) of interest or high correlations among those predictors of interest themselves. In that case, depending on those correlations and your sample size, you may have loss of precision of estimation. You can detect that by simply regressing (OLS) each of your main independent variable(s) on all of the other independent variables (both those of interest and the "control" variables), restricted to the negative binomial estimation sample, and looking at the R2.

          Comment

          Working...
          X