Description Usage Arguments Details Value Author(s) Examples
View source: R/therapyMonitor.R
therapyMonitor & therapyMonitor.multi are useful for simple n-of-1 designs, and were written to make it easy for therapists or other practitioners to get some insight into the effects of their treatments.
1 2 3 4 5 6 7 8 9 10 11 12 13 | therapyMonitor(dat = NULL, design="AB", statistic="|A-B|",
conditionColumn = NULL, variableColumn = NULL,
timeColumn = NULL, conditionMoment = NULL,
limit=NULL, lines=NULL, ylab=NULL, xlab=NULL,
outputFile = NULL, outputFormats = c('svg', 'png'),
plotTitle = "therapyMonitor results",
plotWidth=25, plotHeight=15)
therapyMonitor.multi(dat = NULL,
variableColumn = NULL, conditionColumn = NULL,
conditionMoment = NULL, minLevels = 5,
outputFiles = FALSE, outputFilePath = getwd(),
outputFormats = c('svg', 'png'), silent=FALSE,
...)
|
dat |
A dataframe containing the variables to analyse. If not dataframe is
specified, get |
design |
The design to use; see |
statistic |
The statistic to use; see |
conditionColumn |
The name of the variable containing, for each measurement, the condition, or the phase of the treatment. This variable should normally only have two levels (e.g. 'A' and 'B'), indicating when the treatment changed from condition 'A' to condition 'B'. |
variableColumn |
For |
timeColumn |
The variable containing the time (datetime) of each measurement moment. If not specified in R's POSIXct format, the function tries to guess whether SPSS, SAS, or Stata timestamps were specified, and tries to convert. If the timeColumn isn't specified, the function will assume that all measurements were equidistant, and they'll simply be assigned consecutive numbers als measurement moments. |
conditionMoment |
The conditionMoment argument provides an alternative method of specifying when the condition changed; this can be the number of the first measurement in the new (second) condition/phase. For example, if the treatment started after the 6th measurement, this can be specified by passing 'conditionMoment=7'. |
limit |
The minimum number of consecutive measurements that has to be available
within one condition/phase to enable the analysis (see
|
lines |
Which lines in the |
ylab, xlab |
Labels to use when creating the plots. |
outputFile |
If not NULL, the filename to write the plot to. Note that this filename
should not include the extension - this is appended based on the
|
outputFormats |
Which format to use for the plot or plots to export. |
plotTitle |
The title for the plot. |
plotWidth, plotHeight |
The size of the plot (in centimeters). |
minLevels |
The minimum number of levels that a variable in the datafile has to have before it's included in the analyses. |
outputFiles |
Whether to export the plots and regular output to files. |
outputFilePath |
If |
silent |
Whether to suppress messages about progress etc. |
... |
Additional arguments to |
This function started as a wrapper to the pvalue.systematic
function in the SCRT-package
, but it now also does some extra
stuff.
For therapyMonitor, an object with the input and several output variables, as well as a plot. For therapyMonitor.multi, an object containing several therapyMonitor objects, as well as collated output.
Gjalt-Jorn Peters
Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>
1 2 3 | ### Explore and plot the weight of a chick in the ChickWeight dataset
therapyMonitor(ChickWeight, variableColumn='weight',
conditionMoment=6, lines=1:12);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.