z.calc {vannstats} | R Documentation |
Simplified Z Scores
Description
This function calculates the Z score for a given value, relative to the mean and standard deviation for a variable in a given data frame.
Usage
z.calc(df, var1, raw, tails = NULL)
Arguments
df |
data frame to read in. |
var1 |
the variable of interest for which the mean and standard deviations will be calculated. |
raw |
the desired raw score to compare with the mean and standard deviation of |
tails |
to report a p-value (level of significance) for the reported Z score, user must select a desired number of tails (either |
Value
This function returns the raw score, mean, and z-score for a given raw score.
Examples
data <- mtcars
z.calc(data,mpg,12)
[Package vannstats version 1.3.4.14 Index]