estimate_design: Estimate single-case design

Description Usage Arguments Value

View source: R/estimate_design.R

Description

This functions takes an scdf and extracts design parameters. The resulting object can be unsed to randomly create new scdf files with the same underlying parameters. This is usefull for monte-carlo studies and bootstrapping procedures.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
estimate_design(
  data,
  dvar,
  pvar,
  mvar,
  m = NULL,
  s = NULL,
  rtt = NULL,
  between = TRUE,
  model = "JW",
  ...
)

Arguments

data

A single-case data frame. See scdf to learn about this format.

dvar

Character string with the name of the dependent variable. Defaults to the attributes in the scdf file.

pvar

Character string with the name of the phase variable. Defaults to the attributes in the scdf file.

mvar

Character string with the name of the measurement time variable. Defaults to the attributes in the scdf file.

m

The mean depcting the overall distribution of which all cases are a random sample of. m is estimated when m = NULL.

s

The standard deviation depcting the between case variance of the overall performance. If more than two single-cases are included in the scdf, the variance is estimated if s is set to NULL.

rtt

The reliability of the measurements. The reliability is estimated when rtt = NULL.

between

If FALSE trend, level, and slope effect estimations will be identical for each case. If TRUE effects are estimated for each case seperately.

model

Model used for calculating the slope parameter (see Huitema & McKean, 2000). Default is model = "B&L-B". Possible values are: "B&L-B", "H-M", "Mohr#1", "Mohr#2", "JW", "JW2", and "Manly".

...

Further arguments passed to the lm function used for parameter estimation.

Value

A list of parameters for each single-case. Parameters include name, length, and starting measurementtime of each phase, trend level, and slope effects for each phase, mean, standarddeviation, and reliability for each case.


scan documentation built on Feb. 12, 2021, 3:01 a.m.