ClinReport Vignette 3: Graphic Outputs

Jean-Francois COLLIN



In this vignette we will see the different graphics that you can produce with ClinReport.

First step

Start by loading all usual libraries.


Load your data.

# We will use fake data
#>    y_numeric y_logistic y_poisson   baseline   VAR GROUP TIMEPOINT SUBJID
#> 1 -0.4203490          1         5 -0.4203490 Cat 1     A        D0 Subj 1
#> 2 -0.1570941          1         5 -0.1570941 Cat 2     A        D0 Subj 1
#> 3         NA          0         3 -2.0853720 Cat 2     A        D0 Subj 1
#> 4 -0.4728527          0         5 -0.4728527 Cat 1     A        D0 Subj 1
#> 5 -0.8651713          1         4 -0.8651713 Cat 1     A        D0 Subj 1
#> 6 -1.5476907          1         3 -1.5476907 Cat 1     A        D0 Subj 1

Quantitative graphics

First you need to produce a quantitative table using report.quanti() function then you use the plot() function on the result:

If there is no explicative variable, the corresponding graphic of the call to report.quanti() is a barplot of the mean of the response value.

If there is one explicative variable, the corresponding graphic will be a barplot per treatment group.

You can personnalize the outputs using, the usual, title xlab ylab ylim etc.. options.

If there is also a second explicative variable. The corresponding plot will be a lineplot:

The means will be connected according to this second variable to capture the evolution accross its different levels.

Qualitative graphics

For qualitative statistics, the corresponding graphics will be barplots.

If only the argument y is supplied, the corresponding graphic will looks like:

If there is one explicative variable, it will be split by color and split on the x-axis:

If there is two explicative variables, it will be split by color, split on the x-axis and split by panels:

LS-means graphics

For LS-Means graphics, it will be pretty much the same graphics as the graphics of quantitative statistics.

Instead of displaying the standard deviations, it’s the 95% confidence intervals that are displayed.

For one explicative variable:

With two explicative variables: