Announcement

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

  • mutiple imputation mixed effect model predicted value

    Dear members, I am analyzing a cross-sectional big dataset includes serval CVDs and demographic data and want to plot a plot like the attachment. Our dataset is post-imputated, Hence, I am using a code: mi estimate: “mixed sbpa age if medication!=1||country:, reml emonly” However after this model, It seems “predict plot1, fitted” doesn’t work as usual. It can use if I drop the mi estimate commend. I wanna plot this graph with 95%CI fitted in the line and without the scartter of true value. Could you please kindly give me some advice? Many Thanks for your help!

  • #2
    there is no attachment - please read the FAQ; also, see
    Code:
    help mi predict

    Comment


    • #3
      Originally posted by Queran Lin View Post
      ... I wanna plot this graph with 95%CI fitted in the line and without the scartter of true value. Could you please kindly give me some advice? Many Thanks for your help!
      When you ask for a 95% CI and a fitted line, I wonder if you should be using the margins command instead. margins doesn't normally work with mi estimate. You'd want the user-written command mimrgns (by our own Daniel Klein, available on the SSC site, type ssc install mimrgns).

      Of course, maybe this isn't what you want - I'm just guessing. If you want to post an attachment, do read the FAQ. If you couldn't successfully upload a PNG file to the forum, it can help to upload your graphic to a site like Imgur, then post the link here.
      Last edited by Weiwen Ng; 12 Mar 2020, 10:05.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment


      • #4
        Thanks for replying to me guys! here are the acctachments! what I really want to plot is the first plot! But I can't get it when I use mi estimate. Could anyone advice on this?

        I have tried in the subdataset by using
        Code:
        mixed sbpa age if stroke==1&gender==1&medication!=1||country:, reml emonly
        and then I used
        Code:
        predict plot, xb
        twoway (lfitci age plot)
        However, What I got was a straight line which doesn't make sensce. I manually plot a plot by calculating each mean of blood pressure in age group and get the attachment2 which is a curve instead of a straight line. Could you please to advice on this? how to get the curve like the figure 1 after mi estimate ? Many thanks!
        Attached Files

        Comment


        • #5
          This is a dataset with 145 million datapoints BTW. Thanks!

          Comment


          • #6
            Clyde Schechter can you please to take a look at this? I am sorry that I am new to here! Now I know how to used this forum! Many Thanks!

            Comment

            Working...
            X