ggPMX icon indicating copy to clipboard operation
ggPMX copied to clipboard

Test Tomas: Individual plots showing NA when stratified

Open tmss1 opened this issue 2 years ago • 2 comments
trafficstars

Describe the bug The function pmx_plot_individual() showing NA groups when stratified.

To Reproduce ctr %>% pmx_plot_individual(strat.facet = ~REGREG1C)

Screenshots image

Additional context Further investigation of the individual plot dataset: image

tmss1 avatar Dec 02 '22 11:12 tmss1

@tmss1

  • thanks for reporting this
  • it has been possible to reproduce the problem and develop a fix
    • pull request forthcoming after testing

tynsci avatar Jan 02 '23 09:01 tynsci

Not working yet in the latest development version.

While the above example appears to be working now with one facet variable, some subjects and time-points are missing when facetting. For example, without facetting: ctrx = pmx_mlxtran(file_name = mlx_fpath) ctrx %>% pmx_plot_individual() image

With facetting, some subjects and time-points are missing as the prediction lines are not covering the same range. For example, see the missing ID=1001_10003 and the shorter prediction line in others. ctrx %>% pmx_plot_individual(strat.facet = ~REGREG1C) image

Also, it cannot handle more than one facet variable. This will give an error, for example, ctrx %>% pmx_plot_individual(strat.facet = ~REGREG1C+HEM) image

In addition, BLOQ plotting cannot be switched off, whether by the bloq argument, or by setting the controller. For example, all of the following will generate the same plots with the red dots (labelled "ignored" to denote the BLOQ data I believe) as above. ctrx = pmx_mlxtran(file_name=mlx_fpath, bloq=pmx_bloq(cens="CENS", show=FALSE)) ctrx %>% pmx_plot_individual() ctrx %>% pmx_plot_individual(bloq=pmx_bloq(cens="CENS", show=TRUE)) ctrx %>% pmx_plot_individual(bloq=pmx_bloq(cens="CENS", show=FALSE))

tmss1 avatar May 04 '23 15:05 tmss1