Closed RyanJField closed 3 years ago
I see your point, and I will add a ylim
argument to allow for finer control. With that being said, the reason why I have done it like this is to show the biomarker levels for this patient compared to the other patients in the dataset.
The plot()
method for predict_jm
objects has gained the argument ylim_long_outcome_range
that defaults to TRUE
. If set to FALSE
, the ylim
is set according to the value of the specific subject being plotted.
I changed a little for the function plot.predict_jm
From
ry <- r range(preds, low, upp, na.rm = TRUE)
to
ry1 = range(preds, low, upp, na.rm = TRUE)
ry <- range(ry1[1]*0.8,ry1[2]*1.2)
And it looks much better to me.
Thanks, I will try it.
Hi,
I have found a possible issue with the
plot.predict_jm()
, currently it uses the range of values from the predict function for the ylim values, however if I have a biomarker with a valid range from 1-50000 (or 1-11 on the log scale) and I use the log scale of that variable in the JM theplot.predict_jm()
function produces the following graph:Which is easy to interpret, however if I use
fun_long = exp
, to use the original biomarker scale I get the following plot in which the ylim makes the graph hard to interpret:It would be good if you could override the ylim for the longitudinal model(s) by specifying a custom range so the graph looks like this:
Many Thanks.