estimate_betas.matrix_dataset: Estimate betas for a matrix dataset

View source: R/fmri_betas.R

estimate_betas.matrix_datasetR Documentation

Estimate betas for a matrix dataset

Description

This function estimates betas (regression coefficients) for fixed and random effects in a matrix dataset using various methods.

Usage

## S3 method for class 'matrix_dataset'
estimate_betas(
  x,
  fixed = NULL,
  ran,
  block,
  method = c("mixed", "pls", "pls_global", "ols"),
  basemod = NULL,
  ncomp = 4,
  lambda = 0.01,
  ...
)

Arguments

x

An object of class matrix_dataset representing the matrix dataset

fixed

A formula specifying the fixed regressors that model constant effects (i.e., non-varying over trials)

ran

A formula specifying the random (trialwise) regressors that model single trial effects

block

A formula specifying the block factor

method

The regression method for estimating trialwise betas; one of "mixed", "pls", "pls_global", or "ols" (default: "mixed")

basemod

A baseline_model instance to regress out of data before beta estimation (default: NULL)

ncomp

Number of PLS components for the "pls" and "pls_global" methods (default: 4)

lambda

Lambda parameter (not currently used; default: 0.01)

...

Additional arguments passed to the estimation method

Value

A list of class "fmri_betas" containing the following components:

  • betas_fixed: Matrix representing the fixed effect betas

  • betas_ran: Matrix representing the random effect betas

  • design_ran: Design matrix for random effects

  • design_fixed: Design matrix for fixed effects

  • design_base: Design matrix for baseline model

See Also

matrix_dataset, baseline_model

Other estimate_betas: estimate_betas()


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.