step1measures | R Documentation |
Compute 24 measures for each of the Trajectories. See details for the list of measures.
step1measures(Data, ID = FALSE, verbose = TRUE)
Data |
A n by m matrix or data frame containing the values of each individual trajectory. Each row corresponds to one of the n trajectories, while the m columns correspond to the ordered values of a given trajectory. See details. |
ID |
Logical. Set to |
verbose |
Logical. Set to |
There must be a minimum of 4 observations for each trajectory or the trajectory will be omitted from the analysis. The
trajectories do not need to have the same number of observations, nor the same values of Time
.
When ID
is set to FALSE
, a generic ID
variable is created and appended as the first
colunm of both the Data
and Time
data.frames.
The 24 measures are:
Range
Mean-over-time*
Standard deviation (SD)
Coefficient of variation (CV)
Change
Mean change per unit time
Change relative to the first score
Change relative to the mean over time
Slope of the linear model*
R^2: Proportion of variance explained by the linear model
Maximum of the first differences
SD of the first differences
SD of the first differences per time unit
Mean of the absolute first differences*
Maximum of the absolute first differences
Ratio of the maximum absolute difference to the mean-over-time
Ratio of the maximum absolute first difference to the slope
Ratio of the SD of the first differences to the slope
Mean of the second differences
Mean of the absolute second differences
Maximum of the absolute second differences
Ration of the maximum absolute second difference to the mean-over-time
Ratio of the maximum absolute second difference to mean absolute first difference
Ratio of the mean absolute second difference to the mean absolute first difference
If a measure is equal to zero, it will be set to the smallest, non-zero value of the same measure across the sample during further calculations. If Y_1, the first observation of the trajectory of an individual, is equal to zero, it will aslo be replaced.
For the exact equations of the measures, please go to "User guides, package vignettes and other documentation" section of the "traj" package.
trajMeasures, object containing the data used for the calculations and the 24 measures.
Marie-Pierre Sylvestre, Dan Vatnik
marie-pierre.sylvestre@umontreal.ca
## Not run:
# Setup data
data = example.data$data
# Run step1measures
s1 = step1measures(data, ID=TRUE)
# Display measures
head(s1$measurments)
# Plot mean trajectory of all individuals
plot(s1$measurments$ID, s1$measurments$m5)
# The next step would be to run "step2factors"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.