predict_component: Predict y values for an individual component

View source: R/add_model_preds.R

predict_componentR Documentation

Predict y values for an individual component

Description

A helper function for get_component_predictions. Given a qutoed formula and x data, predicts the values of he individual components.

Usage

predict_component(
  df,
  temp_vec,
  .component_type_col = "component_type",
  .est_col = "estimate",
  .term_type_col = "term_type"
)

Arguments

df

data, after drop_and_pivot, to which the predicted component values will be added.

temp_vec

numeric vector containing the temperature

.component_type_col

the name of the column in the df argument, containing the componet type to be reconstructed.

.est_col

a string, giving the name of the column containing estimates values.

.term_type_col

a string, giving the name of the column containing the term type values.

Value

a tibble containing two columns, x and y, containing the input temperature vector and the predicted y values for the predicted component.


taiawu/dsfworld_package documentation built on June 18, 2024, 5:39 a.m.