![]() Here, VAR refers to the variable name and PROB1, PROB2, etc., relate to probability values. Given a dataset and a desired percentile, a corresponding value can be found using the quantile(VAR, c(PROB1, PROB2,…)) command. ![]() Percentiles Values from Percentiles (Quantiles) > #what range of age values are found in the sample?.> #calculate the range of a variable with range(VAR).This operation is demonstrated in the following code sample. Consequently, it is recommended that ranges also be computed on individual variables. As with the min and max functions, using range(DATAVAR) is not very useful, since it considers the entire dataset, rather than each individual variable. The range of a particular variable, that is, its maximum and minimum, can be retrieved using the range(VAR) command. > #what is the maximum age found in the sample?.> #calculate the max of a variable with max(VAR).> #what is the minimum age found in the sample?.> #calculate the min of a variable with min(VAR).The sample code below demonstrates the use of the min and max functions. Therefore, it is recommended that minimums and maximums be calculated on individual variables, rather than entire datasets, in order to produce more useful information. However, in contrast to the mean and standard deviation functions, min(DATAVAR) or max(DATAVAR) will retrieve the minimum or maximum value from the entire dataset, not from each individual variable. The maximum, via max(VAR), operates identically. Keeping with the pattern, a minimum can be computed on a single variable using the min(VAR) command. > #what is the standard deviation of each variable in the dataset?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |