smoothedMean: Smoothed Conditional Mean

View source: R/utils-stats.R

smoothedMeanR Documentation

Smoothed Conditional Mean

Description

This function returns for the range of x values the predicted mean, 95 Calculation is performed by the (currently undocumented) 'predictdf()' generic and its methods. 'loess', uses a t-based approximation, and for 'gam' the normal confidence interval is constructed on the link scale and then back-transformed to the response scale.

Usage

smoothedMean(dt, method, collapse = TRUE)

Arguments

dt

data.frame with at least two columns: x) representing the independent variable and y) representing the dependent variable

method

Character string one of 'loess' or 'gam'

Value

data.table with the follwing columns x, y (predicted mean), ymin, ymax (lower and upper bound of confidence interval), se (standard error)


VEuPathDB/plot.data documentation built on Feb. 20, 2025, 6:33 p.m.