Skip to contents

Creates an instance of the ftmlm class, initializing it with specific matrices necessary for the flexible transfer model calculations. This function is typically called internally within higher-level functions that prepare data and perform model fitting.

Usage

ftmlm(XtX, Xty, s = 0, n = NA_real_, yty = NA_real_, y_mean = NA_real_)

Arguments

XtX

A numeric matrix representing the cross product of predictors.

Xty

A numeric matrix representing the cross product of predictors and outcomes.

s

A numeric value representing the optimal Ridge penalty from cross-validation (if available).

n

A numeric value representing the number of observations.

yty

A numeric value representing the sum of squared responses.

y_mean

A numeric value representing the mean of the outcome variable.

Value

An object of class ftmlm.

See also

ftmlm-class for details on the class structure.

Examples

if (FALSE) { # \dontrun{
  XtX <- matrix(rnorm(100), 10, 10)
  Xty <- matrix(rnorm(10), 10, 1)
  model <- ftmlm(XtX, Xty)
} # }