estimate_prior_from_DR: Estimate prior from DR

View source: R/estimate_prior.R

estimate_prior_from_DRR Documentation

Estimate prior from DR

Description

Estimate variance decomposition and priors from DR estimates.

Usage

estimate_prior_from_DR(DR, LV = NULL)

Arguments

DR

the test/retest dual regression estimates, as an array with dimensions M \times N \times (L \times V), where M is the number of visits (2), N is the number of subjects, L is the number of brain networks, and V is the number of data locations.

(L and V are collapsed because they are treated equivalently in the context of calculating the variance decomposition and priors).

LV

A length-two integer vector giving the dimensions L and V to reshape the result. Default: NULL (do not reshape the result).

Value

List of two elements: the priors and the variance decomposition.

There are two version of the variance prior: varUB gives the unbiased variance estimate, and varNN gives the upwardly-biased non-negative variance estimate. Values in varUB will need to be clamped above zero before using in BrainMap.


BayesBrainMap documentation built on Aug. 8, 2025, 7:25 p.m.