simplex.Run2: simplex.Run2

View source: R/PulseWaveform.R

simplex.Run2R Documentation

simplex.Run2

Description

Simplex.Run2 intiates the Nelder Mead downhill simplex routine to optimise model parameters and goodness of fit.

Usage

simplex.Run2(data = ppg,simplexParam = mat, f = model2.ChiSq3, optional=NULL, beat_vector = beat_vector, ms = simplex_iterations, renal_param = renal_param, dias_param = dias_param, sys_time = sys_time, w = w, run = NULL)

Arguments

data

ppg time series segment

simplexParam

the matrix outputted by make.matrix, representative of all model parameters in an inputted batch of beats

f

model2.ChiSq3 function

optional

currently redundant

beat_vector

an index of beats to be modeled and their x-coordinates to extract from the PPG time series

ms

number of simplex iterations to conduct

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

run

indicates which iteration of the simplex routine is being run

Value

A matrix with equivalent structure to the one inputted, with optimised parameter values.

Examples

sim <- simplex.Run2(data = ppg, simplexParam = mat, f = model2.ChiSq3, optional=NULL,
                                  beat_vector = beat_vector, renal_param = renal_param,
                                  dias_param = dias_param, sys_time = sys_time, w = w, run = c("run", i))










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