Home > replicate_regression > replicate_regression > replicate_regression_core_single.m

replicate_regression_core_single

PURPOSE ^

[x_central, x_replicate, sigma_central, sigma_replicate, parameters, x_average, sigma_average, x_sample] = replicate_regression_core_single(t,y,sigma,tt,options)

SYNOPSIS ^

function [result, parameters, options, sample] = replicate_regression_core_single(t,y,sigma,tt,options)

DESCRIPTION ^

[x_central, x_replicate, sigma_central, sigma_replicate, parameters, x_average, sigma_average, x_sample] = replicate_regression_core_single(t,y,sigma,tt,options)

 Bayesian replicate regression for a time series with a single replicate

 DESCRIPTION
  Interpolation of single time series data
  The regression functions are represented by linear combinations of basis functions (e.g. Fourier components)
  The expansion coefficients (=model parameters) given prior distributions and estimated by taking the posterior mode

 FUNCTION ARGUMENTS
  Each data point is a triple [t(i), y(i), sigma(i)] of 
   - time point t(i) 
   - measured value y(i) 
   - standard deviation (error bar) sigma(i)

  In this script, the function arguments t, y, sigma 
  are given as ROW vectors (or as matrices, where each row is treated separately)

 FUNCTION OUTPUTS 
   Row vectors of regression curves:
    'x'  central regression curves
   and the corresponding uncertainties (row vector):
    'sigma_x'

  'parameters' is a structure array containing the estimated parameter values 
        (to be used for statistical evaluation of the prior hyperparameters)

  'x_sample' is a vector of predicted data, obtained from a random sample from the posterior

 OPTIONS FOR THE ALGORITHM
  Detailed options are given the function argument 'p', 
  a structure array with (optional) fields: 

    options.basis                 : type of basis functions
    options.use_offset            : (Boolean) flag for stating that there is a constant basis function
    options.n_comp                : number of Fourier components (not including the constant offset)
                                    (sin and cos for the same wavenumber are counted as one component)
    options.t_jump                : add (at the beginning) a component that yields a constant offset 
    options.t_smooth              : time constant for estimating production rates
    options.constant_before_start : set all basis functions to constant values for negative time values

    options.mode_mean             : prior mean for Fourier coefficients alpha for regression curve 
                                      (vector; same values are used for for sin and cos)
    options.offset_mean           : the same (scalar) for the constant basis function (default 1)
    options.jump_mean             : the same (scalar) for the jump basis function (default 1)
    options.mode_width            : prior width for Fourier coefficients alpha for central curve 
                                      (vector; same values are used for for sin and cos)
    options.offset_width          : the same (scalar) for the constant basis function (default 1)
    options.jump_width            : the same (scalar) for the jump basis function (default 1)
    options.flag_draw_sample      : Draw sample curve parameters and curve from the posterior
    options.flag_time_derivative  : Compute time derivative curves
 

  The basis functions are adjusted to the final time interval [ta,tb](from tt)
    'cos'            : cosine function, zero slope at t=ta and t=tb
    'sin'            : sine function, zero value at t=ta and t=tb
    'sin_half'       : sine function, zero value at t=ta
    'sin_horizontal' : sine function, zero value at t=ta, zero slope at t=tb
    'cos+sin'        : cosine and sine functions, no restriction
    'polynomial'     : polynomial function, zero value at t=ta
    'exp'            : exponentially relaxing functions (t<0 => f=0; t>0 => f = 1-exp(t/tau);

  The entire curves are shifted by a constant basis function 
  This can be suppressed by setting options.use_offset = 1

 Wolfram Liebermeister (2010)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 12-Feb-2016 23:46:45 by m2html © 2003