testacf: Function to test adjust carried forward

View source: R/testacf_func.R

testacfR Documentation

Function to test adjust carried forward

Description

The goal of this script is to consider the height values that growthcleanr excludes as “carried forward” for potential re-inclusion by using a reverse absolute height velocity check based on step 15 of the Daymont et al. algorithm

Usage

testacf(
  infile,
  seed = 7,
  searchtype = "random",
  grid.length = 9,
  writeout = FALSE,
  outfile = paste0("test_adjustcarryforward_", format(Sys.time(),
    "%m-%d-%Y_%H-%M-%S")),
  quietly = FALSE,
  param = "none",
  debug = FALSE,
  maxrecs = 0,
  exclude_opt = 0,
  add_answers = TRUE
)

Arguments

infile

Input data frame/data table, cleaned by cleangrowth(), with columns as described in main README.md

seed

Numeric random seed, used only when performing random search

searchtype

Type of search to perform: random (default), line-grid, full-grid

grid.length

Number of steps in grid to search

writeout

Write output to file? Default FALSE.

outfile

"Output file name, default 'test_adjustcarrforward_DATE_TIME', where DATE is the current system date and time"

quietly

Verbose progress info

param

"none", or data frame to specify which parameters to run full search on, and values to use if not, used only when performing full-grid search

debug

Produce extra data files for debugging

maxrecs

Limit to specified # subjects, default 0 (no limit)

exclude_opt

Type of exclusion method for carried forward strings, 0 to 3. See adjustcarryforward documentation for more information

add_answers

TRUE or FALSE, indicating whether or not to add answers (definely include/exclude) for the given dataset. Defaults to TRUE

Value

A list containing: testacf_res: data frame with adjustcarryforward results for each run, params: a data frame containing parameter values for each run. debug_filtered_data: data frame with original data, returned if debug TRUE


growthcleanr documentation built on June 24, 2024, 5:16 p.m.