0

I have a mixed-effects coxme model and wanted to plot a forest graph(similar to ggforest for coxph). I'm slightly new to this so not sure how to plot this. My df:

str(cats_52weeks)
'data.frame':   487 obs. of  50 variables:
 $ Cat_ID                             : chr  "Mor02" "Mor03" "Mor04" "Mor05" ...
 $ Sex                                : chr  "female" "male" "male" "male" ...
 $ Weight_Initialcapture.kg.          : num  2.45 5.1 5 4.9 5.95 4.4 4.8 5.5 5.6 5 ...
 $ Study_region                       : chr  "Central Kimberley" "Central Kimberley" "Central Kimberley" "Central Kimberley" ...
 $ cat_density                        : num  0.17 0.17 0.17 0.17 0.17 0.17 0.17 0.17 0.17 0.17 ...
 $ Study_length                       : Factor w/ 3 levels "short","baiting",..: 3 3 3 3 3 3 3 3 3 
 $ Rabbits_present                    : Factor w/ 2 levels "no","yes": 1 1 1 1 1 1 1 1 1 1 ...
 $ Fox_present                        : Factor w/ 2 levels "no","yes": 1 1 1 1 1 1 1 1 1 1 ...
  $ Dingo_present                      : Factor w/ 2 levels "no","yes": 2 2 2 2 2 2 2 2 2 2 ...
  $ Habitat_type                       : Factor w/ 4 levels "Savannah","Desert",..: 1 1 1 1 1 1 1 
 $ Time2                              : num  36 7 27 52 52 28 52 36 40 52 ...
 $ Time1                              : int  1 1 1 1 1 1 1 1 1 1 ...
 $ Status                             : num  1 0 0 0 0 1 0 0 0 0 ...
 $ age_category                       : Factor w/ 4 levels "tom","female",..: 4 1 1 1 1 3 1 1 1 1

And the model that I want to produce a forest plot is

m52_all <- coxme(Surv(cats_52weeks$Time2,cats_52weeks$Status) ~  Habitat_type+
                   Fox_present + Dingo_present + Rabbits_present + Weight_Initialcapture.kg. +
                   cat_density + (1|Study_region) + (1|Study_length),data=cats_52weeks)

Any help would be appreciated, thanks!!

markalex
  • 8,623
  • 2
  • 7
  • 32
V.Menon
  • 81
  • 1
  • 1
  • 3

0 Answers0