Desc.logical: Describe a dichotomous variable
Description
Description of a dichotomous variable. This can either be a boolean vector, a factor with two levels or a numeric variable
with only two unique values.Usage
## S3 method for class 'logical':
Desc(x, xname = NULL, digits = 3,
conf.level = 0.95, plotit = FALSE, ...)
Arguments
x
the dichotomous vector to be described.
xname
the caption for the output.
digits
integer. With how many digits shoud the relative frequencies be formatted? Default is 3.
conf.level
confidence level of the interval.
plotit
boolean. Should a plot be created? The vector would be plotted by means of PlotDesc.numeric
, which again basically is
PlotFdist
. Default is FA ...
the dots are passed to the table
command within Desc.logical
.
Value
- A list containing the following components:
- lengththe length of the vector (n + NAs).
- nthe valid entries (NAs are excluded)
- NAsnumber of NAs
- uniquenumber of unique values.
- frqa data.frame of absolute and relative frequencies given by
Freq
if maxlevels > unique values in the vector.
Details
The confidence levels for the relative frequencies are calculated by BinomCI
, method "Wilson"
on a confidence level defined by conf.level
.