Table Of Contents

Previous topic

algorithms.statistics.nlsmodel

Next topic

algorithms.statistics.regression

This Page

algorithms.statistics.onesample

Module: algorithms.statistics.onesample

TODO

Functions

nipy.algorithms.statistics.onesample.estimate_mean(Y, sd)

Estimate the mean of a sample given information about the standard deviations of each entry.

Parameters:

Y : np.ndarray

Data for which mean is to be estimated. Should have shape (nsubj, nvox).

sd : np.ndarray

Standard deviation (subject specific) of the data for which the mean is to be estimated. Should have shape (nsubj, nvox).

Returns:

value : dict

This dictionary has keys [‘mu’, ‘scale’, ‘t’, ‘resid’, ‘sd’]

nipy.algorithms.statistics.onesample.estimate_varatio(Y, sd, df=None, niter=10)

In a one-sample random effects problem, estimate the ratio between the fixed effects variance and the random effects variance.

Parameters:

Y : np.ndarray

Data for which mean is to be estimated. Should have shape (nsubj, nvox).

sd : np.ndarray

Standard deviation (subject specific) of the data for which the mean is to be estimated. Should have shape (nsubj, nvox).

df : [int]

If supplied, these are used as weights when deriving the fixed effects variance. Should have length [nsubj].

niter : int

Number of EM iterations to perform.

Returns:

value : dict

This dictionary has keys [‘fix’, ‘ratio’, ‘random’], where ‘fix’ is the fixed effects variance implied by the input parameter ‘sd’; ‘random’ is the random effects variance and ‘ratio’ is the estimated ratio of variances: ‘random’/’fixed’.