ggstatsplot (version 0.1.4)

subtitle_meta_parametric: Making expression with frequentist random-effects meta-analysis results

Description

This analysis is carried out using the metafor package. For more, see ?metafor::rma.

Usage

subtitle_meta_parametric(
  data,
  k = 2,
  messages = TRUE,
  output = "subtitle",
  caption = NULL,
  ...
)

subtitle_meta_ggcoefstats( data, k = 2, messages = TRUE, output = "subtitle", caption = NULL, ... )

Arguments

data

A dataframe. It must contain columns named estimate (corresponding estimates of coefficients or other quantities of interest) and std.error (the standard error of the regression term).

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

messages

Decides whether messages references, notes, and warnings are to be displayed (Default: TRUE).

output

Character describing the desired output. If "subtitle", a formatted subtitle with summary effect and statistical details will be returned, and if "caption", expression containing details from model summary will be returned. The other option is to return "tidy" data frame with coefficients or "glance" dataframe with model summaries.

caption

The text for the plot caption.

...

Additional arguments (ignored).

Examples

Run this code
# NOT RUN {
# let's create a dataframe
df_results <-
  structure(
    .Data = list(estimate = c(
      0.382047603321706, 0.780783111514665,
      0.425607573765058, 0.558365541235078, 0.956473848429961
    ), std.error = c(
      0.0465576338644502,
      0.0330218199731529, 0.0362834986178494, 0.0480571500648261, 0.062215818388157
    ), t.value = c(
      8.20590677855356, 23.6444603038067, 11.7300588415607,
      11.6187818146078, 15.3734833553524
    ), conf.low = c(
      0.290515146096969,
      0.715841986960399, 0.354354575031406, 0.46379116008131, 0.827446138277154
    ), conf.high = c(
      0.473580060546444, 0.845724236068931, 0.496860572498711,
      0.652939922388847, 1.08550155858277
    ), p.value = c(
      3.28679518728519e-15,
      4.04778497135963e-75, 7.59757330804449e-29, 5.45155840151592e-26,
      2.99171217913312e-13
    ), df.residual = c(
      394L, 358L, 622L, 298L,
      22L
    )),
    row.names = c(NA, -5L),
    class = c("tbl_df", "tbl", "data.frame")
  )

# making subtitle
ggstatsplot::subtitle_meta_parametric(
  data = df_results,
  k = 3,
  messages = FALSE
)

# getting tidy data frame with coefficients
ggstatsplot::subtitle_meta_parametric(
  data = df_results,
  messages = FALSE,
  output = "tidy"
)

# making caption
ggstatsplot::subtitle_meta_parametric(
  data = df_results,
  k = 2,
  messages = FALSE,
  output = "caption"
)

# getting dataframe with model summary
ggstatsplot::subtitle_meta_parametric(
  data = df_results,
  messages = FALSE,
  output = "glance"
)
# }

Run the code above in your browser using DataCamp Workspace