quantile_info: Create a list with quantile-information.

Description Usage Arguments

Description

The purpose of this function is to create a list with information related to different quantiles, in order for this to be used as arguments in add_label_to_plot.

Usage

1
2
3
quantile_info(.type = c("chisq", "norm", "t"), .alpha = 0.05,
  .df = NULL, .df_txt = "nu", digits = 2, not_IEC60559 = TRUE,
  .plotmath = TRUE, .decimal = ".")

Arguments

.type

The distribution to be used, which should be one of c("chisq", "norm", "t").

.alpha

The number to be used for the alpha value when computing the quantile, which as usual refers to the upper tail of the distribution. The default value for this argument is 0.05.

.df

The degrees of freedom, default NULL, to be used for those quantiles that requires this argument.

.df_txt

The text to be used for the specification of the df-value. The default value is "nu", but it might in some cases be of interest to use e.g. "n-1" or "n-2".

digits

An integer, default value 2, which will decide the number of digits to use when rounding the quantile values. Note: The rounding will

.plotmath

A logical value, default TRUE, which will ensure that the format of the returned character-string works as desired when included as a part of some text or label in a ggplot. In particular, this ensures that any trailing zeros are properly preserved when parse=TRUE is used when adding the text.

.decimal

A character, default value ., which is to be used for the decimal sign for the converted number. This enables the decimal sign to be replaced with ,, which is of interest for those countries where that is the norm.

not_IEC60599

A logical value, default TRUE, which can be used to round x in the same manner a human normally would do, e.g. that "2.5" rounds to "3" instead of "2". Reminder: This is included to avoid that students must be explained why the rounding used in the text is different from what they themselves have computed.


LAJordanger/HVLstatistikk documentation built on June 21, 2019, 7:56 p.m.