calc.betas: Calculate Beta Coefficients for Predictions

View source: R/predict.R

calc.betasR Documentation

Calculate Beta Coefficients for Predictions

Description

Calculates coefficients for predicting one dimension from others, using either linear model or PCA interpretation.

Usage

calc.betas(
  fit,
  est = NULL,
  stders = TRUE,
  y.dim,
  x.dim,
  type = "lm",
  vcov = FALSE
)

Arguments

fit

A fitted model object of class "lme.morph"

est

Optional parameter estimates (if NULL, extracted from fit)

stders

Logical; whether to compute standard errors

y.dim

Integer specifying which dimension to predict

x.dim

Integer vector specifying which dimensions to use as predictors

type

Character string, either "lm" or "pca"

vcov

Logical; if TRUE, returns variance-covariance matrix

Value

If vcov = FALSE, a matrix with estimates and standard errors. If vcov = TRUE, a list with components:

est

Vector of coefficient estimates

varcov

Variance-covariance matrix


morphErr documentation built on Aug. 30, 2026, 5:06 p.m.