bdotsFit: Fit nlme curves to grouped observations

View source: R/bdotsFit.R

bdotsFitR Documentation

Fit nlme curves to grouped observations

Description

Creates observation level curves to use in bdotsBoot

Usage

bdotsFit(
  data,
  subject,
  time,
  y,
  group,
  curveType = doubleGauss(concave = TRUE),
  cor = TRUE,
  numRefits = 0,
  cores = 0,
  verbose = FALSE,
  ...
)

Arguments

data

Dataset used

subject

Column name of dataset containing subject identifiers

time

Column name containing time variable

y

Column name containing outcome of interest

group

Character vector containing column names of groups. Can be greater than one

curveType

See details/vignette

cor

Boolean. Autocorrelation?

numRefits

Integer indicating number of attempts to fit an observation if the first attempt fails

cores

number of cores. Default is 0, indicating half cores available

verbose

currently not used

...

Secret

Details

This is step one of the three step bdots process. Things should be more or less straight forward. The only tricky part involves curveType. For now know that one can use doubleGauss(concave = TRUE/FALSE) or logistic(). Should be passed in as a call. See the vignette on customizing this

Value

Object of class 'bdotsObj', inherits from data.table

Examples

## Not run: 
res <- bdotsFit(data = cohort_unrelated,
                subject = "Subject",
                time = "Time",
                y = "Fixations",
                group = c("Group", "LookType"),
                curveType = doubleGauss(concave = TRUE),
                cor = TRUE,
                numRefits = 2,
                cores = 0,
                verbose = FALSE)

## End(Not run)


bdots documentation built on Jan. 7, 2023, 1:18 a.m.