bdotsFit: Fit nlme curves to grouped observations

Description Usage Arguments Details Value Examples

View source: R/bdotsFit.R

Description

Creates observation level curves to use in bdotsBoot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
bdotsFit(
  data,
  subject,
  time,
  y,
  group,
  curveType = doubleGauss(concave = TRUE),
  cor = TRUE,
  numRefits = 0,
  cores = 0,
  verbose = FALSE,
  returnX = NULL,
  ...
)

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

returnX

Boolean. Return data with bdObj? Currently not implemented

...

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 function. See the vignette on customizing this

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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 March 27, 2021, 9:07 a.m.