model2.FIX_PAR3: model2.FIX_PAR3

View source: R/PulseWaveform.R

model2.FIX_PAR3R Documentation

model2.FIX_PAR3

Description

model2.FIX_PAR3 takes a set of 12 parameters as input and fixes any that exceed constraints defined within the function. For every violation of model constraints a penalty is accrued, the sum of which is outputted along with the fixed parameters.

Usage

model2.FIX_PAR3(time, within_beat_params, across_beat_params, debug=FALSE, renal_param, sys_t)

Arguments

time

x values of the ppg segment being modelled

within_beat_params

parameters not fixed across beats

across_beat_params

parameters fixed across beats

debug

logical, if true function prints parameter values relative to constraint values, and the penalties accrued

renal_param

the timing of the 2nd reflectance wave, used as a reference to the initial estimation for this parameter

sys_t

the timing of the systolic wave, used as a reference to the initial estimation for this parameter

Value

result

vector of fixed parameters and total penalty accrued

Note

model2.FIX_PAR3 can handle parameter inputs that indicate only a single systolic wave, or two component waves only. Likewise it can handle one rather than two baseline parameter inputs. This is to support modelling of waveforms with only as many parameters as are necessary (hence also the use of reduced ChiSq as the chosen measure of goodness of fit). The optionality of parameter inputs is summarized as follows:

params: Baseline, baseline 2, t_sys, H_sys, W_sys, dt_1, H_1, W_1, dt_2, H_2, W_2 across_beat_params: w[1], t[2], w[2], t[3], w[3]

Or: par: base1, base2, t[1], h[1], #, #, h[2], #, #, h[3], ..., ...

Examples

temp <- model2.FIX_PAR3(time = data[, 1],
                          within_beat_params = params[c(1:4, 7, 10)],
                          across_beat_params, debug = F, renal_param = rp,
                          sys_t)










stw32/PulseWaveform documentation built on Dec. 6, 2022, 2:50 a.m.