simplex.MakeSimplex2: simplex.MakeSimplex2

View source: R/PulseWaveform.R

simplex.MakeSimplex2R Documentation

simplex.MakeSimplex2

Description

simplex.MakeSimplex2 iterates on the initially estimated values for fixed parameters, refining them to give the simplex an improved starting position.

Usage

simplex.MakeSimplex2(data,param,f,inScale,directions=NULL,inTol=-1, optional=NULL,debug=FALSE, beat_vector = beat_vector, beat = beat, renal_param = renal_param, dias_param = dias_param, sys_time = sys_time, w)

Arguments

data

ppg time series segment

param

model parameter inputs

f

model2.ChiSq3 function

inScale

the starting value by which to iterate on parameter values (0.1 recommended)

directions

the initial direction in which to iterate parameter values (default null)

inTol

the minimum value a parameter can change if it cannot be iterated upon to improve goodness of fit

optional

for direct input into model2.ChiSq3 function, default NULL

debug

logical, if true iteration and refinement statuses will be printed to console

beat_vector

an index of beats to be modeled and their x-coordinates to extract from the PPG time series (for direct input to f)

beat

matrix of intial parameter estimates

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

result

Da matrix of parameter sets, including the initially inputted parameters (row 1) and a parameter set for each refined parameter

Note

simplex.MakeSimplex2 is for fixed (across beat) parameters only. Thus the outputted matrix will include absent (NA) rows where non-fixed parameters are represented (these are refined separately in the simplex.MakeSimplex3 function).

Examples

across_params <- simplex.MakeSimplex2(data=ppg, param = par, f = model2.ChiSq3,
                                                    inScale = 0.1, beat_vector = beat_vector,
                                                    beat = new_beat, 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.