plot_p_spline_prev: Plotting function for the P_spline model

View source: R/plot_p_spline_prev.R

plot_p_spline_prevR Documentation

Plotting function for the P_spline model

Description

Plotting function for the P_spline model

Usage

plot_p_spline_prev(
  X,
  Y,
  N,
  p_spline_fit,
  target_dist_between_knots = 5,
  spline_degree = 3,
  ylim = 1
)

Arguments

X

date vector.

Y

Numeric vector of number of positive samples

N

Numeric vector of total number of samples

target_dist_between_knots

sets the number of days between adjacent knots (default = 5)

spline_degree

sets the degree of the splines (default = 3)

ylim

sets the ylimit of the plot

p_splinefit

fit of the model to the same set of data using reactidd::stan_p_spline()

Value

A list of the created plot, the raw data and CI's used in the plot, the raw data for the model fit in the plot.

Plot of the model fit


mrc-ide/reactidd documentation built on May 12, 2024, 11:47 a.m.