Class AutoCorrelationEstimate

java.lang.Object
com.xinapse.dynamic.AutoCorrelationEstimate

public class AutoCorrelationEstimate extends Object
Class to estimate the auto-correlation of a time-series by examining the residuals of a GLM fit. The auto-correlation is estimated pixel-by-pixel and then a spatial smoothing of the auto-correlation values is applied. The method follows that in: "Temporal Autocorrelation in Univariate Linear Modeling of FMRI Data" Woolrich MW et al NeuroImage 14: 1370-1386 (2001).
  • Constructor Summary

    Constructors
    Constructor
    Description
    AutoCorrelationEstimate(float[][] residuals, int nCols, int nRows, int nSlices, float pixelXSize, float pixelYSize, float pixelZSize, MonitorWorker worker, boolean verbose)
    Estimate the auto-correlation for the supplied residuals.
  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
    getVarContrasts(List<com.xinapse.dynamic.GLMContrastVector> contrastVectors, int col, int row, int slice, float[][] moorePenrosePsuedoInverse, float[][] moorePenrosePsuedoInverseTranspose, float[][] residualFormingMatrix, double sumSqResiduals)
    Get the estimated variances of a set of contrast of Beta (fitted parameter) estimates for a single pixel using this auto-correlation estimate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AutoCorrelationEstimate

      public AutoCorrelationEstimate(float[][] residuals, int nCols, int nRows, int nSlices, float pixelXSize, float pixelYSize, float pixelZSize, MonitorWorker worker, boolean verbose) throws CancelledException
      Estimate the auto-correlation for the supplied residuals. The auto-correlation can be used for variance correction for estimating the variance of the fitted Beta parameters in a GLM.
      Parameters:
      residuals - the residuals after fitting using a GLM. The first array index refers to the pixel index, and the second array index refers to the time point.
      nCols - number of image columns.
      nRows - number of image rows.
      nSlices - number of image slices.
      pixelXSize - the horizontal pixel size.
      pixelYSize - the vertical pixel size.
      pixelZSize - the slice spacing.
      worker - if non-null, the MonitorWorker that is performing the estimate.
      verbose - if verbose reporting to System.out is turned on.
      Throws:
      CancelledException - if calculation of the auto-correlation is cancelled by the user.
  • Method Details

    • getVarContrasts

      public float[] getVarContrasts(List<com.xinapse.dynamic.GLMContrastVector> contrastVectors, int col, int row, int slice, float[][] moorePenrosePsuedoInverse, float[][] moorePenrosePsuedoInverseTranspose, float[][] residualFormingMatrix, double sumSqResiduals)
      Get the estimated variances of a set of contrast of Beta (fitted parameter) estimates for a single pixel using this auto-correlation estimate.
      Parameters:
      contrastVectors - the set of contrast vectors for which to assess the variances.
      col - the column number for the pixel.
      row - the row number for the pixel.
      slice - the slice umber for the pixel.
      moorePenrosePsuedoInverse - the Moore-Penrose pseudo inverse for the GLM design matrix.
      moorePenrosePsuedoInverseTranspose - the transpose of the Moore-Penrose pseudo inverse for the GLM design matrix.
      residualFormingMatrix - the residual-forming matrix.
      sumSqResiduals - the sum of squares of the residuals.
      Returns:
      a vector of variance estimates for the contrasts in the fitted Beta parameters of the GLM.