Learn R Programming

refund (version 0.1-40)

pffr_prepare: Prepare data, formula, and call for pffr()

Description

Internal helper that performs input validation, formula parsing and transformation, construction of the mgcv data object, and assembly of the mgcv call. The returned list contains everything required to fit and post-process a pffr model.

Usage

pffr_prepare(
  call,
  formula,
  yind,
  yind_missing,
  yind_expr,
  data,
  ydata,
  algorithm,
  method,
  tensortype,
  bs_yindex,
  bs_int,
  sandwich,
  dots
)

Value

A list with preparation outputs, including `new_call` and `pffr_data`.

Arguments

call

The matched call from pffr().

formula

The original pffr formula.

yind

The y-index argument (may be `NULL` if missing).

yind_missing

Logical, whether `yind` was missing in the original call.

yind_expr

The yind expression from the original call (for naming).

data

The data argument (list/data.frame).

ydata

Sparse response data (or `NULL`).

algorithm

User-specified algorithm (may be NA).

method

The requested mgcv method (character).

tensortype

Tensor product type (symbol).

bs_yindex

Basis specification for y-index.

bs_int

Basis specification for functional intercept.

sandwich

Character sandwich type (`"none"`, `"cluster"`, `"cl2"`, or `"hc"`).

dots

The list of additional arguments (...).