The xpnorm() function will generate the probability and z-score for a value (X) based on the mathematical function for a normal distribution. It can do this with just three pieces of information: the border you are interested in, and the mean and ...
The gf_dist() function can graphically overlay a number of different mathematical probability distributions. If we want to overlay the normal distribution, we’ll have to specify that with the argument “norm”, and then enter in the mean and standard ...
The function zscore() will standardize a variable by converting all of its values to z-scores (i.e., the number of standard deviations the score is above or below the mean). Example 1: Using the zscore() function alone will produce a list of z-scores ...
The do()* function runs one or more lines of code the number of times specified inside the parentheses and returns the results as a data frame. Example 1: # take a random sample (n=10) of a variable, with replacement, # and calculate the standard ...