All the MATLAB code examples accompanying this book can be run directly. The examples are self-contained and do not require additional path variables being set up. The following is a partial list of the supplementary MATLAB functions that are called at various stages by the state estimators.

  • get_linear_parameters (\(\ldots \))

    Calculates the updates for the constant coefficients (e.g., \(\gamma _{0}\) and \(\gamma _{1}\)) for a continuous variable (e.g., \(r_{k}\)). If this function is present in a MATLAB example where there is an MPP, but not a continuous variable, then it calculates the constant coefficients based on the MPP amplitudes.

  • get_maximum_variance (\(\ldots \)) or get_continuous_variable_variance_update (\(\ldots \))

    Calculates the sensor noise variance update (e.g., \(\sigma ^{2}_{v}\)) for a continuous variable (e.g., \(r_{k}\)). If this function is present in a MATLAB example where there is an MPP, but not a continuous variable, then it calculates the sensor noise variance based on the MPP amplitudes.

  • get_linear_parameters_for_mpp (\(\ldots \))

    Calculates the updates for the constant coefficients (e.g., \(\gamma _{0}\) and \(\gamma _{1}\)) for a series of MPP amplitudes (e.g., \(r_{k}\)). This function is used to calculate the updates corresponding to an MPP when a continuous variable is also present.

  • get_maximum_variance_for_mpp (\(\ldots \))

    Calculates the sensor noise variance update (e.g., \(\sigma ^{2}_{v}\)) for a series of MPP amplitudes. This function is used to calculate the update corresponding to an MPP when a continuous variable is also present.

  • get_posterior_mode (\(\ldots \)) or get_state_update (\(\ldots \))

    Calculates the update \(x_{k|k}\) based on the Newton–Raphson method

  • get_pk_conf_lims (\(\ldots \))

    Calculates the confidence limits for the probability of binary event occurrence \(p_{k}\)

  • get_certainty_curve (\(\ldots \))

    Calculates the HAI value based on the probability of binary event occurrence \(p_{k}\) exceeding a baseline value

  • rhythm (\(\ldots \))

    Calculates the cortisol-related circadian term \(I_{k}\) in the state equation

  • circadian_parameters (\(\ldots \))

    Calculates the log-likelihood term to be optimized when estimating the (cortisol-related) circadian rhythm terms in the state equation

  • get_log_likelihood (\(\ldots \))

    Calculates the log-likelihood of the term involving the CIF

  • get_ks_plot(\(\ldots \))

    Calculates the Kolmogorov–Smirnov (KS) plot for assessing the goodness of fit of a CIF to point process observations

  • Other functions related to a CIF

    Functions such as fetch_lambda (\(\ldots \)), dlambda_dx (\(\ldots \)), f (\(\ldots \)), and mu (\(\ldots \)) are all supplementary functions that calculate various components or derivatives related to an HDIG-based CIF