model2.ChiSq4: model2.ChiSq4

View source: R/PulseWaveform.R

model2.ChiSq4R Documentation

model2.ChiSq4

Description

model2.ChiSq4 is a clone of model2.ChiSq3. It differs by providing additional measures of goodness of fit besides reduced ChiSq for the inputted batch. These are listed below.

Usage

model2.ChiSq4(data, params, debug=FALSE, beats, beat, a = NULL, plot = FALSE, renal_param, dias_param, sys_time, w)

Arguments

data

section of ppg time series

params

model parameters

debug

logical, currently redundant

beats

list of number of inputted beats, there beginnings in the time series, and their endings

beat

dataframe of model parameters

a

the combined matrix used in the downhill simplex routine (alternative source of parameters)

plot

logical, if set to true plots model generated waveform against original waveform

renal_param

the starting parameter for 1st reflectance peak timing (inputted to prevent drastic deviations from this value)

dias_param

the starting parameter for 2nd reflectance peak timing (inputted to prevent drastic deviations from this value)

sys_time

the starting parameter for systolic peak timing (inputted to prevent drastic deviations from this value)

w

the timing of the 1st derivative peaks on the ppg time series

Value

fit

list consisting of:

ts_fit

total reduced ChiSq value summed across all beats inputted

beat_fit

list of reduced ChiSq values for each individual beat

max_error

residual of greatest value for each individual beat

NRMSE

Normalised root mean square error (see supplementary material)

aNRMSE

alternative normalised root mean square error (see supplementary material)

Examples

fit_check[[k]] <- model2.ChiSq4(data = ppg, params = NULL, beats = beat_vector,
                                            beat = new_beat, a = sim[1, ], plot = FALSE,
                                            renal_param = renal_param, dias_param = dias_param,
                                            sys_time = sys_time, w = w)










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