plot_1D: Plot 1D smooth effects for 'pffr' models

Description Usage Arguments

View source: R/effect_plots.R

Description

Plots 1D smooth effects for a function-on-scalar model fitted with pffr. Additionally, Marra \& Wood (2012) or bootstrapped-based confidence intervals (CIs) can be plotted, specifying the plot_type argument.

Usage

1
2
3
plot_1D(model, plot_type = 1, plot_ci = TRUE, alpha = 0.05, CIs_list,
  select, xlab, ylab, ylim, main, effect_label, shift = 0,
  base_size = 11)

Arguments

model

Function-on-scalar model fitted with pffr

plot_type

Either 1 (plotting CIs after Marra \& Wood (2012)) or 2 (bootstrap-based CIs, by specyfing CIs_list). Defaults to 1.

plot_ci

If TRUE CIs are plotted. Only used if plot_type = 1.

alpha

(1-alpha) CIs are calculated. The default 0.05 leads to 95% CIs. Only used if plot_type = 1.

CIs_list

Output of function calc_bootstrapCIs. Only necessary if plot_type = 2.

select

Index of smooth term to be plotted. If a vector of length two is passed, then the difference of the second smooth minus the first smooth will be plotted. Note that CIs from plot_type == 1 are suppressed in this case. However, using the CIs_list argument one can still plot boostrapped CIs for such a difference of smooths, by passing a list with only one CI element. Such a CI element can be obtained by using calc_singleBootstrapCI, using the select argument.

xlab, ylab, ylim, main

Optional parameters for overwriting the default plot parameters

effect_label

Used in the main title of the plot as 'effect_label with global 95% CI'. Only used if main is not specified.

shift

Numeric shift of the plotted effect.

base_size

Size of plot elements. see theme_bw. Defaults to 11.


bauer-alex/FoSIntro documentation built on Feb. 11, 2022, 8:33 a.m.