FixBaseline: FixBaseline

View source: R/PulseWaveform.R

FixBaselineR Documentation

FixBaseline

Description

FixBaseline assesses the first and second fitted baselines for each waveform in a batch. If the baselines are close in value and the reduced ChiSq value (goodness of fit) for a waveform's parameter set is lower when the baselines are equal (i.e baseline2 equal to baseline1), then baseline2 will be made equal to baseline1.

Usage

FixBaseline(new_beat, f = model2.ChiSq3, renal_param, dias_param, sys_time, w)

Arguments

new_beat

dataframe of model parameter outputs

f

model2.ChiSq3 function

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

new_beat

dataframe of model parameter outputs with baseline parameters further corrected

Examples

new_beat <- FixBaseline(new_beat, f = model2.ChiSq4, renal_param, dias_param, sys_time, w)










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