Announcement

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

  • multilevel panal data analysis

    Dear statlists,
    I have a data set of 154 dental implants and 71 patients. i have recorded bone change in 4 times (year1,2,3,4) .
    frist i have reshape my data set in long: reshape long level change, i(CODICEIMP) j(time)
    then, i declare a panel data set
    :
    xtset CODICEIMP time

    I have predictors at patient level (sex, age, smoking) and implant level (type of surgery, depth, porsthesis,diameter).
    i want to predict my outcome (bone change) during the time on the basis of my predictors at both leve (implant and patients) so i need a random slope model.

    I set my model null model :
    mixed change i.time ||CODICEPZ: time, cov(unstruc) || CODICEIMP: time, cov(unstruc)mle

    but if i add my first predictor at implant level
    : mixed change i.time, cov(unstruc) ||CODICEPZ: time, cov(unstruc) || CODICEIMP: time DEPTH, cov(unstruc)mle

    then STATA gives to me:
    Hessian is not negative semidefinite
    conformability error

    I need a nested model beacuse of my outcome of interest (bone change related to implant and patients variables) . how can i solve my problem?

    Thankyou!
    Click image for larger version

Name:	Screenshot (99).png
Views:	1
Size:	258.9 KB
ID:	1445611

  • #2
    Duplicate post. Asked at #12 and answered at #13 in https://www.statalist.org/forums/for...%7C-panel-data.

    By the way, please read the Forum FAQ for advice that will enhance your ability to get helpful and timely responses. In particular, screenshots of data are not helpful. First, in this case, your screenshot is not readable at all on my computer. Even if it were, if I needed to work with your data, there is no way to import data from a screenshot to Stata. Also, screenshots do not provide complete metadata, which is sometimes crucial to the right answer.

    In the future, when showing data examples, please use the -dataex- command to do so. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.



    When asking for help with code, always show example data. When showing example data, always use -dataex-.

    Comment


    • #3
      Thankyou very much for your helpful advices!Sorry for my incorrect use of this forum

      Comment

      Working...
      X