Learn R Programming

bdots (version 1.2.5)

bdotsFit: 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,
  ...
)

Value

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

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

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab