descr.Rd
descr
offers a fast and detailed description of each variable in a data frame. Since v1.9.0 it fully supports grouped and weighted computations.
descr(X, ...)
# S3 method for default
descr(X, by = NULL, w = NULL, cols = NULL,
Ndistinct = TRUE, higher = TRUE, table = TRUE, sort.table = "freq",
Qprobs = c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99), Qtype = 7L,
label.attr = "label", stepwise = FALSE, ...)
# S3 method for grouped_df
descr(X, w = NULL,
Ndistinct = TRUE, higher = TRUE, table = TRUE, sort.table = "freq",
Qprobs = c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99), Qtype = 7L,
label.attr = "label", stepwise = FALSE, ...)
# S3 method for descr
as.data.frame(x, ..., gid = "Group")
# S3 method for descr
print(x, n = 14, perc = TRUE, digits = 2, t.table = TRUE, total = TRUE,
compact = FALSE, summary = !compact, reverse = FALSE, stepwise = FALSE, ...)
a (grouped) data frame or list of atomic vectors. Atomic vectors, matrices or arrays can be passed but will first be coerced to data frame using qDF
.
a factor, GRP
object, or atomic vector / list of vectors (internally grouped with GRP
), or a one- or two-sided formula e.g. ~ group1
or var1 + var2 ~ group1 + group2
to group X
. See Examples.
a numeric vector of (non-negative) weights. the default method also supports a one-sided formulas i.e. ~ weightcol
or ~ log(weightcol)
. The grouped_df
method supports lazy-expressions (same without ~
). See Examples.
select columns to describe using column names, indices a logical vector or selector function (e.g. is.numeric
). Note: cols
is ignored if a two-sided formula is passed to by
.
logical. TRUE
(default) computes the number of distinct values on all variables using fndistinct
.
logical. Argument is passed down to qsu
: TRUE
(default) computes the skewness and the kurtosis.
logical. TRUE
(default) computes a (sorted) frequency table for all categorical variables (excluding Date variables).
an integer or character string specifying how the frequency table should be presented:
Int. | String | Description | ||
1 | "value" | sort table by values. | ||
2 | "freq" | sort table by frequencies. | ||
3 | "none" | return table in first-appearance order of values, or levels for factors (most efficient). |
double. Probabilities for quantiles to compute on numeric variables, passed down to .quantile
. If something non-numeric is passed (i.e. NULL
, FALSE
, NA
, ""
etc.), no quantiles are computed.
integer. Quantile types 5-9 following Hyndman and Fan (1996) who recommended type 8, default 7 as in quantile
.
character. The name of a label attribute to display for each variable (if variables are labeled).
for descr
: other arguments passed to qsu.default
. For [.descr
: variable names or indices passed to [.list
. The argument is unused in the print
and as.data.frame
methods.
an object of class 'descr'.
integer. The maximum number of table elements to print for categorical variables. If the number of distinct elements is <= n
, the whole table is printed. Otherwise the remaining items are summed into an '... %s Others' category.
logical. TRUE
(default) adds percentages to the frequencies in the table for categorical variables.
integer. The number of decimals to print in statistics, quantiles and percentage tables.
logical. TRUE
(default) prints a transposed table.
logical. TRUE
(default) adds a 'Total' column for grouped tables (when using by
argument).
logical. TRUE
combines statistics and quantiles to generate a more compact printout. Especially useful with groups (by
).
logical. TRUE
(default) computes and displays a summary of the frequencies, if the size of the table for a categorical variable exceeds n
.
logical. TRUE
prints contents in reverse order, starting with the last column, so that the dataset can be analyzed by scrolling up the console after calling descr
.
logical. TRUE
prints one variable at a time. The user needs to press [enter] to see the printout for the next variable. If called from descr
, the computation is also done one variable at a time, and the finished 'descr' object is returned invisibly.
character. Name assigned to the group-id column, when describing data by groups.
descr
was heavily inspired by Hmisc::describe
, but is much faster and has more advanced statistical capabilities. It is principally a wrapper around qsu
, fquantile
(.quantile
), and fndistinct
for numeric variables, and computes frequency tables for categorical variables using qtab
. Date variables are summarized with fnobs
, fndistinct
and frange
.
Since v1.9.0 grouped and weighted computations are fully supported. The use of sampling weights will produce a weighted mean, sd, skewness and kurtosis, and weighted quantiles for numeric data. For categorical data, tables will display the sum of weights instead of the frequencies, and percentage tables as well as the percentage of missing values indicated next to 'Statistics' in print, be relative to the total sum of weights. All this can be done by groups. Grouped (weighted) quantiles are computed using BY
.
For larger datasets, calling the stepwise
option directly from descr()
is recommended, as precomputing the statistics for all variables before digesting the results can be time consuming.
The list-object returned from descr
can efficiently be converted to a tidy data frame using the as.data.frame
method. This representation will not include frequency tables computed for categorical variables.
A 2-level nested list-based object of class 'descr'. The list has the same size as the dataset, and contains the statistics computed for each variable, which are themselves stored in a list containing the class, the label, the basic statistics and quantiles / tables computed for the variable (in matrix form).
The object has attributes attached providing the 'name' of the dataset, the number of rows in the dataset ('N'), an attribute 'arstat' indicating whether arrays of statistics where generated by passing arguments (e.g. pid
) down to qsu.default
, an attribute 'table' indicating whether table = TRUE
(i.e. the object could contain tables for categorical variables), and attributes 'groups' and/or 'weights' providing a GRP
object and/or weight vector for grouped and/or weighted data descriptions.
## Simple Use
descr(iris)
#> Dataset: iris, 5 Variables, N = 150
#> --------------------------------------------------------------------------------
#> Sepal.Length (numeric):
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 150 35 5.84 0.83 4.3 7.9 0.31 2.43
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 4.4 4.6 4.8 5.1 5.8 6.4 6.9 7.25 7.7
#> --------------------------------------------------------------------------------
#> Sepal.Width (numeric):
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 150 23 3.06 0.44 2 4.4 0.32 3.18
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 2.2 2.34 2.5 2.8 3 3.3 3.61 3.8 4.15
#> --------------------------------------------------------------------------------
#> Petal.Length (numeric):
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 150 43 3.76 1.77 1 6.9 -0.27 1.6
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1.15 1.3 1.4 1.6 4.35 5.1 5.8 6.1 6.7
#> --------------------------------------------------------------------------------
#> Petal.Width (numeric):
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 150 22 1.2 0.76 0.1 2.5 -0.1 1.66
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0.1 0.2 0.2 0.3 1.3 1.8 2.2 2.3 2.5
#> --------------------------------------------------------------------------------
#> Species (factor):
#> Statistics
#> N Ndist
#> 150 3
#> Table
#> Freq Perc
#> setosa 50 33.33
#> versicolor 50 33.33
#> virginica 50 33.33
#> --------------------------------------------------------------------------------
descr(wlddev)
#> Dataset: wlddev, 13 Variables, N = 13176
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics
#> N Ndist
#> 13176 216
#> Table
#> Freq Perc
#> Afghanistan 61 0.46
#> Albania 61 0.46
#> Algeria 61 0.46
#> American Samoa 61 0.46
#> Andorra 61 0.46
#> Angola 61 0.46
#> Antigua and Barbuda 61 0.46
#> Argentina 61 0.46
#> Armenia 61 0.46
#> Aruba 61 0.46
#> Australia 61 0.46
#> Austria 61 0.46
#> Azerbaijan 61 0.46
#> Bahamas, The 61 0.46
#> ... 202 Others 12322 93.52
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 61 61 61 61 61 61
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics
#> N Ndist
#> 13176 216
#> Table
#> Freq Perc
#> ABW 61 0.46
#> AFG 61 0.46
#> AGO 61 0.46
#> ALB 61 0.46
#> AND 61 0.46
#> ARE 61 0.46
#> ARG 61 0.46
#> ARM 61 0.46
#> ASM 61 0.46
#> ATG 61 0.46
#> AUS 61 0.46
#> AUT 61 0.46
#> AZE 61 0.46
#> BDI 61 0.46
#> ... 202 Others 12322 93.52
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 61 61 61 61 61 61
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics
#> N Ndist Min Max
#> 13176 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 13176 61 1990 17.61 1960 2020 -0 1.8
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 13176 7 1985.57 17.51 1960 2020 0.03 1.79
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics
#> N Ndist
#> 13176 7
#> Table
#> Freq Perc
#> Europe & Central Asia 3538 26.85
#> Sub-Saharan Africa 2928 22.22
#> Latin America & Caribbean 2562 19.44
#> East Asia & Pacific 2196 16.67
#> Middle East & North Africa 1281 9.72
#> South Asia 488 3.70
#> North America 183 1.39
#> --------------------------------------------------------------------------------
#> income (factor): Income Level
#> Statistics
#> N Ndist
#> 13176 4
#> Table
#> Freq Perc
#> High income 4819 36.57
#> Upper middle income 3660 27.78
#> Lower middle income 2867 21.76
#> Low income 1830 13.89
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics
#> N Ndist
#> 13176 2
#> Table
#> Freq Perc
#> FALSE 10980 83.33
#> TRUE 2196 16.67
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (28.13% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 9470 9470 12048.78 19077.64 132.08 196061.42 3.13 17.12
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 227.71 399.62 555.55 1303.19 3767.16 14787.03 35646.02 48507.84
#> 99%
#> 92340.28
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (11.43% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 11670 10548 64.3 11.48 18.91 85.42 -0.67 2.67
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 35.83 42.77 46.83 56.36 67.44 72.95 77.08 79.34 82.36
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (86.76% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 1744 368 38.53 9.2 20.7 65.8 0.6 2.53
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 24.6 26.3 27.6 31.5 36.4 45 52.6 55.98 60.5
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (34.67% NAs)
#> N Ndist Mean SD Min Max Skew
#> 8608 7832 454'720131 868'712654 -997'679993 2.56715605e+10 6.98
#> Kurt
#> 114.89
#> Quantiles
#> 1% 5% 10% 25% 50% 75%
#> -12'593999.7 1'363500.01 8'347000.31 44'887499.8 165'970001 495'042503
#> 90% 95% 99%
#> 1.18400697e+09 1.93281696e+09 3.73380782e+09
#> --------------------------------------------------------------------------------
#> POP (numeric): Population, total
#> Statistics (1.95% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 12919 12877 24'245971.6 102'120674 2833 1.39771500e+09 9.75 108.91
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90%
#> 8698.84 31083.3 62268.4 443791 4'072517 12'816178 46'637331.4
#> 95% 99%
#> 81'177252.5 308'862641
#> --------------------------------------------------------------------------------
descr(GGDC10S)
#> Dataset: GGDC10S, 16 Variables, N = 5027
#> --------------------------------------------------------------------------------
#> Country (character): Country
#> Statistics
#> N Ndist
#> 5027 43
#> Table
#> Freq Perc
#> USA 129 2.57
#> EGY 129 2.57
#> MOR 128 2.55
#> IDN 126 2.51
#> PHL 126 2.51
#> TWN 126 2.51
#> DNK 126 2.51
#> ESP 126 2.51
#> FRA 126 2.51
#> GBR 126 2.51
#> ITA 126 2.51
#> NLD 126 2.51
#> SWE 126 2.51
#> CHN 125 2.49
#> ... 29 Others 3256 64.77
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 4 105 124 117 126 129
#> --------------------------------------------------------------------------------
#> Regioncode (character): Region code
#> Statistics
#> N Ndist
#> 5027 6
#> Table
#> Freq Perc
#> ASI 1372 27.29
#> SSA 1148 22.84
#> LAM 1117 22.22
#> EUR 1004 19.97
#> MENA 257 5.11
#> NAM 129 2.57
#> --------------------------------------------------------------------------------
#> Region (character): Region
#> Statistics
#> N Ndist
#> 5027 6
#> Table
#> Freq Perc
#> Asia 1372 27.29
#> Sub-saharan Africa 1148 22.84
#> Latin America 1117 22.22
#> Europe 1004 19.97
#> Middle East and North Africa 257 5.11
#> North America 129 2.57
#> --------------------------------------------------------------------------------
#> Variable (character): Variable
#> Statistics
#> N Ndist
#> 5027 2
#> Table
#> Freq Perc
#> EMP 2516 50.05
#> VA 2511 49.95
#> --------------------------------------------------------------------------------
#> Year (numeric): Year
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 5027 67 1981.58 17.57 1947 2013 -0.05 1.86
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1950 1953 1957 1967 1982 1997 2006 2009 2011
#> --------------------------------------------------------------------------------
#> AGR (numeric): Agriculture
#> Statistics (13.19% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4364 4353 2'526696.5 37'129098.1 0 1.19187778e+09 23.95 642.16
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.09 23.18 144.56 930.7 4394.52 29781.04 315403 2'393977.49
#> 99%
#> 24'932575.1
#> --------------------------------------------------------------------------------
#> MIN (numeric): Mining
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4224 1'867908.95 32'334251.7 0 1.10344053e+09 25.27 712.33
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0.02 1.2 3.78 38.95 173.22 4841.26 64810.08 713420.36 14'309891.9
#> --------------------------------------------------------------------------------
#> MAN (numeric): Manufacturing
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4353 5'538491.36 63'090998.4 0 1.86843541e+09 20.71 498.7
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.05 27.31 103.84 620.44 3718.1 52805.35 516077.08 2'978846.99
#> 99%
#> 108'499037
#> --------------------------------------------------------------------------------
#> PU (numeric): Utilities
#> Statistics (13.39% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4354 4237 335679.47 2'576027.41 0 65'324543.8 13.5 244.29
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0 2.16 6.3 25.74 167.95 4892.25 63004.56 291356.48 11'866259.3
#> --------------------------------------------------------------------------------
#> CON (numeric): Construction
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4339 1'801597.63 24'382598 0 860'638677 26.15 774.73
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 15.03 43.37 215.57 1473.45 13514.84 132609.51 829361.57
#> 99%
#> 37'430603.6
#> --------------------------------------------------------------------------------
#> WRT (numeric): Trade, restaurants and hotels
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4344 3'392909.52 36'950812.9 0 1.15497404e+09 21.19 530.06
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.03 25.07 96.85 650.38 3773.64 41648.17 475116.68 2'646521.57
#> 99%
#> 79'618054.2
#> --------------------------------------------------------------------------------
#> TRA (numeric): Transport, storage and communication
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4334 1'473269.72 16'815143.2 0 547'047040 22.77 604.58
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.05 12.28 37.35 205.79 1174.8 18927.21 195055.31 1'059843.16
#> 99%
#> 31'750009.1
#> --------------------------------------------------------------------------------
#> FIRE (numeric): Finance, insurance, real estate and business services
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4349 1'657114.84 13'709981.9 -2848.81 387'997506 16.48 356.43
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0 3.87 14.3 128.18 960.13 13460.4 252299.08 1'599086.92 55'536957
#> --------------------------------------------------------------------------------
#> GOV (numeric): Government services
#> Statistics (30.73% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 3482 3470 1'712300.28 16'967383.7 0 485'535400 18.67 430.18
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 48.14 121.87 723.98 3928.51 37689.12 331990.24 1'400263.37
#> 99%
#> 56'340246.3
#> --------------------------------------------------------------------------------
#> OTH (numeric): Community, social and personal services
#> Statistics (15.5% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4248 4238 1'684527.32 15'613923.6 0 402'671182 14.93 273.79
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 15.92 49.56 310.09 1433.17 13321.29 107230.29 605013.39
#> 99%
#> 42'264477.4
#> --------------------------------------------------------------------------------
#> SUM (numeric): Summation of sector GDP
#> Statistics (13.19% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4364 4364 21'566436.8 251'812500 0 8.06794210e+09 22.53 589.58
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.38 269.63 1242.98 4803.94 23186.19 284646.08 2'644610.11 15'030223.5
#> 99%
#> 435'513356
#> --------------------------------------------------------------------------------
# Some useful print options (also try stepwise argument)
print(descr(GGDC10S), reverse = TRUE, t.table = FALSE)
#> SUM (numeric): Summation of sector GDP
#> Statistics (13.19% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4364 4364 21'566436.8 251'812500 0 8.06794210e+09 22.53 589.58
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.38 269.63 1242.98 4803.94 23186.19 284646.08 2'644610.11 15'030223.5
#> 99%
#> 435'513356
#> --------------------------------------------------------------------------------
#> OTH (numeric): Community, social and personal services
#> Statistics (15.5% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4248 4238 1'684527.32 15'613923.6 0 402'671182 14.93 273.79
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 15.92 49.56 310.09 1433.17 13321.29 107230.29 605013.39
#> 99%
#> 42'264477.4
#> --------------------------------------------------------------------------------
#> GOV (numeric): Government services
#> Statistics (30.73% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 3482 3470 1'712300.28 16'967383.7 0 485'535400 18.67 430.18
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 48.14 121.87 723.98 3928.51 37689.12 331990.24 1'400263.37
#> 99%
#> 56'340246.3
#> --------------------------------------------------------------------------------
#> FIRE (numeric): Finance, insurance, real estate and business services
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4349 1'657114.84 13'709981.9 -2848.81 387'997506 16.48 356.43
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0 3.87 14.3 128.18 960.13 13460.4 252299.08 1'599086.92 55'536957
#> --------------------------------------------------------------------------------
#> TRA (numeric): Transport, storage and communication
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4334 1'473269.72 16'815143.2 0 547'047040 22.77 604.58
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.05 12.28 37.35 205.79 1174.8 18927.21 195055.31 1'059843.16
#> 99%
#> 31'750009.1
#> --------------------------------------------------------------------------------
#> WRT (numeric): Trade, restaurants and hotels
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4344 3'392909.52 36'950812.9 0 1.15497404e+09 21.19 530.06
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.03 25.07 96.85 650.38 3773.64 41648.17 475116.68 2'646521.57
#> 99%
#> 79'618054.2
#> --------------------------------------------------------------------------------
#> CON (numeric): Construction
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4339 1'801597.63 24'382598 0 860'638677 26.15 774.73
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.02 15.03 43.37 215.57 1473.45 13514.84 132609.51 829361.57
#> 99%
#> 37'430603.6
#> --------------------------------------------------------------------------------
#> PU (numeric): Utilities
#> Statistics (13.39% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4354 4237 335679.47 2'576027.41 0 65'324543.8 13.5 244.29
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0 2.16 6.3 25.74 167.95 4892.25 63004.56 291356.48 11'866259.3
#> --------------------------------------------------------------------------------
#> MAN (numeric): Manufacturing
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4353 5'538491.36 63'090998.4 0 1.86843541e+09 20.71 498.7
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.05 27.31 103.84 620.44 3718.1 52805.35 516077.08 2'978846.99
#> 99%
#> 108'499037
#> --------------------------------------------------------------------------------
#> MIN (numeric): Mining
#> Statistics (13.37% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4355 4224 1'867908.95 32'334251.7 0 1.10344053e+09 25.27 712.33
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0.02 1.2 3.78 38.95 173.22 4841.26 64810.08 713420.36 14'309891.9
#> --------------------------------------------------------------------------------
#> AGR (numeric): Agriculture
#> Statistics (13.19% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 4364 4353 2'526696.5 37'129098.1 0 1.19187778e+09 23.95 642.16
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 0.09 23.18 144.56 930.7 4394.52 29781.04 315403 2'393977.49
#> 99%
#> 24'932575.1
#> --------------------------------------------------------------------------------
#> Year (numeric): Year
#> Statistics
#> N Ndist Mean SD Min Max Skew Kurt
#> 5027 67 1981.58 17.57 1947 2013 -0.05 1.86
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1950 1953 1957 1967 1982 1997 2006 2009 2011
#> --------------------------------------------------------------------------------
#> Variable (character): Variable
#> Statistics
#> N Ndist
#> 5027 2
#> Table
#> EMP VA
#> Freq 2516 2511
#> Perc 50.05 49.95
#> --------------------------------------------------------------------------------
#> Region (character): Region
#> Statistics
#> N Ndist
#> 5027 6
#> Table
#> Asia Sub-saharan Africa Latin America Europe
#> Freq 1372 1148 1117 1004
#> Perc 27.29 22.84 22.22 19.97
#> Middle East and North Africa North America
#> Freq 257 129
#> Perc 5.11 2.57
#> --------------------------------------------------------------------------------
#> Regioncode (character): Region code
#> Statistics
#> N Ndist
#> 5027 6
#> Table
#> ASI SSA LAM EUR MENA NAM
#> Freq 1372 1148 1117 1004 257 129
#> Perc 27.29 22.84 22.22 19.97 5.11 2.57
#> --------------------------------------------------------------------------------
#> Country (character): Country
#> Statistics
#> N Ndist
#> 5027 43
#> Table
#> USA EGY MOR IDN PHL TWN DNK ESP FRA GBR ITA NLD
#> Freq 129 129 128 126 126 126 126 126 126 126 126 126
#> Perc 2.57 2.57 2.55 2.51 2.51 2.51 2.51 2.51 2.51 2.51 2.51 2.51
#> SWE CHN ... 29 Others
#> Freq 126 125 3256
#> Perc 2.51 2.49 64.77
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 4 105 124 117 126 129
#> --------------------------------------------------------------------------------
#> Dataset: GGDC10S, 16 Variables, N = 5027
# For bigger data consider: descr(big_data, stepwise = TRUE)
# Generating a data frame
as.data.frame(descr(wlddev, table = FALSE))
#> Variable Class Label N Ndist Min Max Mean SD
#> 1 country character Country Name 13176 216 NA NA NA NA
#> 2 iso3c factor Country Code 13176 216 NA NA NA NA
#> 3 date Date Date Recorded (Fictitious) 13176 61 -3287 18628 NA NA
#> Skew Kurt 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1 NA NA NA NA NA NA NA NA NA NA NA
#> 2 NA NA NA NA NA NA NA NA NA NA NA
#> 3 NA NA NA NA NA NA NA NA NA NA NA
#> [ reached 'max' / getOption("max.print") -- omitted 10 rows ]
## Weighted Desciptions
descr(wlddev, w = ~ replace_NA(POP)) # replacing NA's with 0's for fquantile()
#> Dataset: wlddev, 12 Variables, N = 13176, WeightSum = 313233706778
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics
#> WeightSum Ndist
#> 3.13233707e+11 216
#> Table
#> WeightSum Perc
#> China 65272180000 20.84
#> India 52835203044 16.87
#> United States 15226426293 4.86
#> Indonesia 10681870259 3.41
#> Brazil 8711884458 2.78
#> Russian Federation 8388319293 2.68
#> Japan 7088669911 2.26
#> Pakistan 6865420747 2.19
#> Bangladesh 6217567789 1.98
#> Nigeria 6191168112 1.98
#> Mexico 4948012523 1.58
#> Germany 4773054666 1.52
#> Vietnam 3955178878 1.26
#> Philippines 3805345278 1.21
#> ... 202 Others 108273405527 34.57
#>
#> Summary of Table WeightSums
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 5.0e+05 3.1e+07 2.6e+08 1.5e+09 8.3e+08 6.5e+10
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics
#> WeightSum Ndist
#> 3.13233707e+11 216
#> Table
#> WeightSum Perc
#> CHN 65272180000 20.84
#> IND 52835203044 16.87
#> USA 15226426293 4.86
#> IDN 10681870259 3.41
#> BRA 8711884458 2.78
#> RUS 8388319293 2.68
#> JPN 7088669911 2.26
#> PAK 6865420747 2.19
#> BGD 6217567789 1.98
#> NGA 6191168112 1.98
#> MEX 4948012523 1.58
#> DEU 4773054666 1.52
#> VNM 3955178878 1.26
#> PHL 3805345278 1.21
#> ... 202 Others 108273405527 34.57
#>
#> Summary of Table WeightSums
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 5.0e+05 3.1e+07 2.6e+08 1.5e+09 8.3e+08 6.5e+10
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics
#> N Ndist Min Max
#> 13176 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics (1.95% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 12919 61 1994.1 336131.12 1960 2019 15996.23 4.10398088e+09
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1961 1965 1969 1981 1996 2009 2015 2017 2019
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics (1.95% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 12919 7 1989.47 331741.3 1960 2010 13215.11 3.80966822e+09
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1960 1960 1960 1980 1990 2000 2010 2010 2010
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics
#> WeightSum Ndist
#> 3.13233707e+11 7
#> Table
#> WeightSum Perc
#> East Asia & Pacific 103222500256 32.95
#> South Asia 69206603131 22.09
#> Europe & Central Asia 49081067014 15.67
#> Sub-Saharan Africa 33308413094 10.63
#> Latin America & Caribbean 26135854126 8.34
#> North America 16881058226 5.39
#> Middle East & North Africa 15398210931 4.92
#> --------------------------------------------------------------------------------
#> income (factor): Income Level
#> Statistics
#> WeightSum Ndist
#> 3.13233707e+11 4
#> Table
#> WeightSum Perc
#> Upper middle income 119606023798 38.18
#> Lower middle income 113837684528 36.34
#> High income 58840837058 18.78
#> Low income 20949161394 6.69
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics
#> WeightSum Ndist
#> 3.13233707e+11 2
#> Table
#> WeightSum Perc
#> FALSE 249344473835 79.6
#> TRUE 63889232943 20.4
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (28.13% NAs)
#> N Ndist Mean SD Min Max Skew
#> 9470 9470 7956.24 210'283027 132.08 196061.42 -20351.22
#> Kurt
#> 2.20701148e+09
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 164.33 221.56 369.9 709.8 1795.07 7789.48 26567.48 41281.51 51150.17
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (11.51% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 11659 10548 65.88 169350.69 18.91 85.42 -6714.56 3.87694984e+09
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 41.61 46.1 50.77 60.14 67.98 72.93 76.57 78.58 82.49
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (86.76% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> 1744 368 39.52 103006.63 20.7 65.8 14172.98 1.76761232e+09
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 26 29.2 31.3 34.3 39.2 42.2 52 55.6 -87.44
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (34.75% NAs)
#> N Ndist Mean SD Min Max
#> 8597 7832 1.61325042e+09 3.92849624e+13 -997'679993 2.56715605e+10
#> Skew Kurt
#> 18291.8 4.46716880e+09
#> Quantiles
#> 1% 5% 10% 25% 50%
#> -1.11187870e+09 -350'160357 55'982433.9 330'288689 1.29779967e+09
#> 75% 90% 95% 99%
#> 2.51422299e+09 3.52610543e+09 4.47772251e+09 8.18240824e+09
#> --------------------------------------------------------------------------------
## Grouped Desciptions
descr(wlddev, ~ income)
#> Dataset: wlddev, 12 Variables, N = 13176
#> Grouped by: income [4]
#> N
#> High income 4819
#> Low income 1830
#> Lower middle income 2867
#> Upper middle income 3660
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 79
#> Low income 1830 30
#> Lower middle income 2867 47
#> Upper middle income 3660 60
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> Afghanistan 0 0.00 61 3.33 0 0.00
#> Albania 0 0.00 0 0.00 0 0.00
#> Algeria 0 0.00 0 0.00 0 0.00
#> American Samoa 0 0.00 0 0.00 0 0.00
#> Andorra 61 1.27 0 0.00 0 0.00
#> Angola 0 0.00 0 0.00 61 2.13
#> Antigua and Barbuda 61 1.27 0 0.00 0 0.00
#> Argentina 0 0.00 0 0.00 0 0.00
#> Armenia 0 0.00 0 0.00 0 0.00
#> Aruba 61 1.27 0 0.00 0 0.00
#> Australia 61 1.27 0 0.00 0 0.00
#> Austria 61 1.27 0 0.00 0 0.00
#> Azerbaijan 0 0.00 0 0.00 0 0.00
#> Bahamas, The 61 1.27 0 0.00 0 0.00
#> Upper middle income Total
#> Afghanistan 0 0.00 61 0.46
#> Albania 61 1.67 61 0.46
#> Algeria 61 1.67 61 0.46
#> American Samoa 61 1.67 61 0.46
#> Andorra 0 0.00 61 0.46
#> Angola 0 0.00 61 0.46
#> Antigua and Barbuda 0 0.00 61 0.46
#> Argentina 61 1.67 61 0.46
#> Armenia 61 1.67 61 0.46
#> Aruba 0 0.00 61 0.46
#> Australia 0 0.00 61 0.46
#> Austria 0 0.00 61 0.46
#> Azerbaijan 61 1.67 61 0.46
#> Bahamas, The 0 0.00 61 0.46
#> [ reached getOption("max.print") -- omitted 1 row ]
#>
#> Summary of Table Frequencies
#> High income Low income Lower middle income Upper middle income
#> Min. : 0.00 Min. : 0.000 Min. : 0.00 Min. : 0.00
#> 1st Qu.: 0.00 1st Qu.: 0.000 1st Qu.: 0.00 1st Qu.: 0.00
#> Median : 0.00 Median : 0.000 Median : 0.00 Median : 0.00
#> Mean :22.31 Mean : 8.472 Mean :13.27 Mean :16.94
#> 3rd Qu.:61.00 3rd Qu.: 0.000 3rd Qu.: 0.00 3rd Qu.:61.00
#> Max. :61.00 Max. :61.000 Max. :61.00 Max. :61.00
#> Total
#> Min. :61
#> 1st Qu.:61
#> Median :61
#> Mean :61
#> 3rd Qu.:61
#> Max. :61
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 79
#> Low income 1830 30
#> Lower middle income 2867 47
#> Upper middle income 3660 60
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> ABW 61 1.27 0 0.00 0 0.00
#> AFG 0 0.00 61 3.33 0 0.00
#> AGO 0 0.00 0 0.00 61 2.13
#> ALB 0 0.00 0 0.00 0 0.00
#> AND 61 1.27 0 0.00 0 0.00
#> ARE 61 1.27 0 0.00 0 0.00
#> ARG 0 0.00 0 0.00 0 0.00
#> ARM 0 0.00 0 0.00 0 0.00
#> ASM 0 0.00 0 0.00 0 0.00
#> ATG 61 1.27 0 0.00 0 0.00
#> AUS 61 1.27 0 0.00 0 0.00
#> AUT 61 1.27 0 0.00 0 0.00
#> AZE 0 0.00 0 0.00 0 0.00
#> BDI 0 0.00 61 3.33 0 0.00
#> Upper middle income Total
#> ABW 0 0.00 61 0.46
#> AFG 0 0.00 61 0.46
#> AGO 0 0.00 61 0.46
#> ALB 61 1.67 61 0.46
#> AND 0 0.00 61 0.46
#> ARE 0 0.00 61 0.46
#> ARG 61 1.67 61 0.46
#> ARM 61 1.67 61 0.46
#> ASM 61 1.67 61 0.46
#> ATG 0 0.00 61 0.46
#> AUS 0 0.00 61 0.46
#> AUT 0 0.00 61 0.46
#> AZE 61 1.67 61 0.46
#> BDI 0 0.00 61 0.46
#> [ reached getOption("max.print") -- omitted 1 row ]
#>
#> Summary of Table Frequencies
#> High income Low income Lower middle income Upper middle income
#> Min. : 0.00 Min. : 0.000 Min. : 0.00 Min. : 0.00
#> 1st Qu.: 0.00 1st Qu.: 0.000 1st Qu.: 0.00 1st Qu.: 0.00
#> Median : 0.00 Median : 0.000 Median : 0.00 Median : 0.00
#> Mean :22.31 Mean : 8.472 Mean :13.27 Mean :16.94
#> 3rd Qu.:61.00 3rd Qu.: 0.000 3rd Qu.: 0.00 3rd Qu.:61.00
#> Max. :61.00 Max. :61.000 Max. :61.00 Max. :61.00
#> Total
#> Min. :61
#> 1st Qu.:61
#> Median :61
#> Mean :61
#> 3rd Qu.:61
#> Max. :61
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics (N = 13176)
#> N Ndist Min Max
#> High income 4819 61 1961-01-01 2021-01-01
#> Low income 1830 61 1961-01-01 2021-01-01
#> Lower middle income 2867 61 1961-01-01 2021-01-01
#> Upper middle income 3660 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics (N = 13176)
#> N Ndist Mean SD Min Max Skew Kurt
#> High income 4819 61 1990 17.61 1960 2020 0 1.8
#> Low income 1830 61 1990 17.61 1960 2020 -0 1.8
#> Lower middle income 2867 61 1990 17.61 1960 2020 -0 1.8
#> Upper middle income 3660 61 1990 17.61 1960 2020 0 1.8
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> Low income 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> Lower middle income 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> Upper middle income 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics (N = 13176)
#> N Ndist Mean SD Min Max Skew Kurt
#> High income 4819 7 1985.57 17.51 1960 2020 0.03 1.79
#> Low income 1830 7 1985.57 17.52 1960 2020 0.03 1.79
#> Lower middle income 2867 7 1985.57 17.51 1960 2020 0.03 1.79
#> Upper middle income 3660 7 1985.57 17.51 1960 2020 0.03 1.79
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> Low income 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> Lower middle income 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> Upper middle income 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 6
#> Low income 1830 5
#> Lower middle income 2867 6
#> Upper middle income 3660 6
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> Europe & Central Asia 2257 46.8 61 3.3 244 8.5
#> Sub-Saharan Africa 61 1.3 1464 80.0 1037 36.2
#> Latin America & Caribbean 1037 21.5 61 3.3 244 8.5
#> East Asia & Pacific 793 16.5 0 0.0 793 27.7
#> Middle East & North Africa 488 10.1 122 6.7 305 10.6
#> South Asia 0 0.0 122 6.7 244 8.5
#> North America 183 3.8 0 0.0 0 0.0
#> Upper middle income Total
#> Europe & Central Asia 976 26.7 3538 26.9
#> Sub-Saharan Africa 366 10.0 2928 22.2
#> Latin America & Caribbean 1220 33.3 2562 19.4
#> East Asia & Pacific 610 16.7 2196 16.7
#> Middle East & North Africa 366 10.0 1281 9.7
#> South Asia 122 3.3 488 3.7
#> North America 0 0.0 183 1.4
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 2
#> Low income 1830 1
#> Lower middle income 2867 1
#> Upper middle income 3660 2
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income Upper middle income
#> FALSE 2745 57.0 1830 100.0 2867 100.0 3538 96.7
#> TRUE 2074 43.0 0 0.0 0 0.0 122 3.3
#> Total
#> FALSE 10980 83.3
#> TRUE 2196 16.7
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (N = 9470, 28.13% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 3179 3179 30280.73 23847.05 932.04 196061.42 2.17
#> Low income 1311 1311 597.41 288.44 164.34 1864.79 1.24
#> Lower middle income 2246 2246 1574.25 858.72 144.99 4818.19 0.91
#> Upper middle income 2734 2734 4945.33 2979.56 132.08 20532.95 1.23
#> Kurt
#> High income 10.34
#> Low income 4.71
#> Lower middle income 3.72
#> Upper middle income 4.94
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75%
#> High income 3053.83 5395.18 7768.74 14369.61 24745.65 38936.22
#> Low income 191.73 234.77 289.48 396.52 535.96 745.29
#> Lower middle income 194.43 398.88 585.24 961.12 1437.78 1987.89
#> Upper middle income 466.58 1248.19 1835.98 2864.47 4219.97 6452.07
#> 90% 95% 99%
#> High income 57259 75529.1 116493.28
#> Low income 985.45 1180.37 1513.83
#> Lower middle income 2829.09 3192.75 4191.8
#> Upper middle income 8966.02 10867.95 14416.71
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (N = 11670, 11.43% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> High income 3831 3566 73.62 5.67 42.67 85.42 -1.01 5.56
#> Low income 1800 1751 49.73 9.09 26.17 74.43 0.27 2.67
#> Lower middle income 2790 2694 58.15 9.31 18.91 76.7 -0.34 2.68
#> Upper middle income 3249 3083 66.65 7.54 36.53 80.28 -1.1 4.23
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> High income 55.62 63.95 67.12 70.5 73.93 77.61 80.67 81.79
#> Low income 31.5 35.78 38.2 43.52 49.04 56.06 61.98 65.87
#> Lower middle income 36.62 42.66 45.73 51.5 58.53 65.79 70 71.72
#> Upper middle income 42.66 51.22 55.93 62.8 68.36 71.95 74.66 75.94
#> 99%
#> High income 83.22
#> Low income 71.71
#> Lower middle income 74.91
#> Upper middle income 78.42
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (N = 1744, 86.76% NAs)
#> N Ndist Mean SD Min Max Skew Kurt
#> High income 680 213 33.3 6.79 20.7 58.9 1.49 5.68
#> Low income 107 88 41.13 6.58 29.5 65.8 0.75 4.24
#> Lower middle income 369 219 40.05 9.3 24 63.2 0.44 2.22
#> Upper middle income 588 280 43.16 8.95 25.2 64.8 0.08 2.35
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> High income 23.42 25.2 26.39 28.48 32.35 35.5 41.01 48.72
#> Low income 29.81 32.35 33.26 35.65 41.1 44.9 48.26 51.61
#> Lower middle income 24.77 26.84 28.88 32.7 38.7 46.6 54.52 56.94
#> Upper middle income 26.21 27.87 30.6 36.77 42.45 49.5 54.83 58.56
#> 99%
#> High income 56.62
#> Low income 60.99
#> Lower middle income 59.82
#> Upper middle income 63
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (N = 8608, 34.67% NAs)
#> N Ndist Mean SD Min
#> High income 1575 1407 153'663194 425'918409 -464'709991
#> Low income 1692 1678 631'660165 941'498380 -500000
#> Lower middle income 2544 2503 692'072692 1.02452490e+09 -605'969971
#> Upper middle income 2797 2700 301'326218 765'116131 -997'679993
#> Max Skew Kurt
#> High income 4.34612988e+09 5.25 36.27
#> Low income 1.04032100e+10 4.46 32.13
#> Lower middle income 1.18790801e+10 3.79 25.24
#> Upper middle income 2.56715605e+10 16.31 464.86
#>
#> Quantiles
#> 1% 5% 10% 25%
#> High income -54'802401.1 -755999.99 264000 4'400000.1
#> Low income 1'100000.02 33'997999.8 71'296000.7 151'814999
#> Lower middle income 209999.99 14'721500.3 41'358000.2 100'485003
#> Upper middle income -73'793201.9 4'558000.18 12'666000 38'000000
#> 50% 75% 90% 95%
#> High income 21'209999.1 104'934998 375'347992 661'426996
#> Low income 332'904999 692'777496 1.47914895e+09 2.14049348e+09
#> Lower middle income 336'494995 810'707520 1.84614302e+09 2.59226945e+09
#> Upper middle income 105'139999 311'519989 714'823975 1.18504797e+09
#> 99%
#> High income 2.31632209e+09
#> Low income 4.82899863e+09
#> Lower middle income 4.69573516e+09
#> Upper middle income 2.98750435e+09
#> --------------------------------------------------------------------------------
#> POP (numeric): Population, total
#> Statistics (N = 12919, 1.95% NAs)
#> N Ndist Mean SD Min
#> High income 4737 4712 12'421540.4 34'160829.5 2833
#> Low income 1792 1791 11'690380.2 13'942313.8 365047
#> Lower middle income 2790 2790 40'802037.5 137'302296 41202
#> Upper middle income 3600 3596 33'223895.5 143'647992 4375
#> Max Skew Kurt
#> High income 328'239523 5.5 39.75
#> Low income 112'078730 3.22 16.57
#> Lower middle income 1.36641775e+09 6.7 52.4
#> Upper middle income 1.39771500e+09 7.53 61.78
#>
#> Quantiles
#> 1% 5% 10% 25%
#> High income 7467.08 18432.4 30517 84449
#> Low income 594755.89 1'206251.55 1'919035.6 3'842838.75
#> Lower middle income 58452.97 105620.75 224651.9 1'188469
#> Upper middle income 7357.28 47202.15 93885.2 609166.25
#> 50% 75% 90% 95%
#> High income 1'632114 8'336605 37'508393.4 58'933084.2
#> Low income 7'181772 13'579920.8 25'964845.3 36'596246.7
#> Lower middle income 5'914923.5 25'966431.8 81'157844 146'949299
#> Upper middle income 3'763490 16'347212.5 47'556659.8 104'771148
#> 99%
#> High income 209'091400
#> Low income 76'539171.5
#> Lower middle income 893'256928
#> Upper middle income 1.02344515e+09
#> --------------------------------------------------------------------------------
print(descr(wlddev, ~ income), compact = TRUE)
#> Dataset: wlddev, 12 Variables, N = 13176
#> Grouped by: income [4]
#> N
#> High income 4819
#> Low income 1830
#> Lower middle income 2867
#> Upper middle income 3660
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 79
#> Low income 1830 30
#> Lower middle income 2867 47
#> Upper middle income 3660 60
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> Afghanistan 0 0.00 61 3.33 0 0.00
#> Albania 0 0.00 0 0.00 0 0.00
#> Algeria 0 0.00 0 0.00 0 0.00
#> American Samoa 0 0.00 0 0.00 0 0.00
#> Andorra 61 1.27 0 0.00 0 0.00
#> Angola 0 0.00 0 0.00 61 2.13
#> Antigua and Barbuda 61 1.27 0 0.00 0 0.00
#> Argentina 0 0.00 0 0.00 0 0.00
#> Armenia 0 0.00 0 0.00 0 0.00
#> Aruba 61 1.27 0 0.00 0 0.00
#> Australia 61 1.27 0 0.00 0 0.00
#> Austria 61 1.27 0 0.00 0 0.00
#> Azerbaijan 0 0.00 0 0.00 0 0.00
#> Bahamas, The 61 1.27 0 0.00 0 0.00
#> Upper middle income Total
#> Afghanistan 0 0.00 61 0.46
#> Albania 61 1.67 61 0.46
#> Algeria 61 1.67 61 0.46
#> American Samoa 61 1.67 61 0.46
#> Andorra 0 0.00 61 0.46
#> Angola 0 0.00 61 0.46
#> Antigua and Barbuda 0 0.00 61 0.46
#> Argentina 61 1.67 61 0.46
#> Armenia 61 1.67 61 0.46
#> Aruba 0 0.00 61 0.46
#> Australia 0 0.00 61 0.46
#> Austria 0 0.00 61 0.46
#> Azerbaijan 61 1.67 61 0.46
#> Bahamas, The 0 0.00 61 0.46
#> [ reached getOption("max.print") -- omitted 1 row ]
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 79
#> Low income 1830 30
#> Lower middle income 2867 47
#> Upper middle income 3660 60
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> ABW 61 1.27 0 0.00 0 0.00
#> AFG 0 0.00 61 3.33 0 0.00
#> AGO 0 0.00 0 0.00 61 2.13
#> ALB 0 0.00 0 0.00 0 0.00
#> AND 61 1.27 0 0.00 0 0.00
#> ARE 61 1.27 0 0.00 0 0.00
#> ARG 0 0.00 0 0.00 0 0.00
#> ARM 0 0.00 0 0.00 0 0.00
#> ASM 0 0.00 0 0.00 0 0.00
#> ATG 61 1.27 0 0.00 0 0.00
#> AUS 61 1.27 0 0.00 0 0.00
#> AUT 61 1.27 0 0.00 0 0.00
#> AZE 0 0.00 0 0.00 0 0.00
#> BDI 0 0.00 61 3.33 0 0.00
#> Upper middle income Total
#> ABW 0 0.00 61 0.46
#> AFG 0 0.00 61 0.46
#> AGO 0 0.00 61 0.46
#> ALB 61 1.67 61 0.46
#> AND 0 0.00 61 0.46
#> ARE 0 0.00 61 0.46
#> ARG 61 1.67 61 0.46
#> ARM 61 1.67 61 0.46
#> ASM 61 1.67 61 0.46
#> ATG 0 0.00 61 0.46
#> AUS 0 0.00 61 0.46
#> AUT 0 0.00 61 0.46
#> AZE 61 1.67 61 0.46
#> BDI 0 0.00 61 0.46
#> [ reached getOption("max.print") -- omitted 1 row ]
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics (N = 13176)
#> N Ndist Min Max
#> High income 4819 61 1961-01-01 2021-01-01
#> Low income 1830 61 1961-01-01 2021-01-01
#> Lower middle income 2867 61 1961-01-01 2021-01-01
#> Upper middle income 3660 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics (N = 13176)
#> N Ndist Mean SD Min Max Skew Kurt 1%
#> High income 4819 61 1990 17.61 1960 2020 0 1.8 1960
#> Low income 1830 61 1990 17.61 1960 2020 -0 1.8 1960
#> Lower middle income 2867 61 1990 17.61 1960 2020 -0 1.8 1960
#> Upper middle income 3660 61 1990 17.61 1960 2020 0 1.8 1960
#> 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1963 1966 1975 1990 2005 2014 2017 2020
#> Low income 1963 1966 1975 1990 2005 2014 2017 2020
#> Lower middle income 1963 1966 1975 1990 2005 2014 2017 2020
#> Upper middle income 1963 1966 1975 1990 2005 2014 2017 2020
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics (N = 13176)
#> N Ndist Mean SD Min Max Skew Kurt 1%
#> High income 4819 7 1985.57 17.51 1960 2020 0.03 1.79 1960
#> Low income 1830 7 1985.57 17.52 1960 2020 0.03 1.79 1960
#> Lower middle income 2867 7 1985.57 17.51 1960 2020 0.03 1.79 1960
#> Upper middle income 3660 7 1985.57 17.51 1960 2020 0.03 1.79 1960
#> 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1960 1960 1970 1990 2000 2010 2010 2020
#> Low income 1960 1960 1970 1990 2000 2010 2010 2020
#> Lower middle income 1960 1960 1970 1990 2000 2010 2010 2020
#> Upper middle income 1960 1960 1970 1990 2000 2010 2010 2020
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 6
#> Low income 1830 5
#> Lower middle income 2867 6
#> Upper middle income 3660 6
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income
#> Europe & Central Asia 2257 46.8 61 3.3 244 8.5
#> Sub-Saharan Africa 61 1.3 1464 80.0 1037 36.2
#> Latin America & Caribbean 1037 21.5 61 3.3 244 8.5
#> East Asia & Pacific 793 16.5 0 0.0 793 27.7
#> Middle East & North Africa 488 10.1 122 6.7 305 10.6
#> South Asia 0 0.0 122 6.7 244 8.5
#> North America 183 3.8 0 0.0 0 0.0
#> Upper middle income Total
#> Europe & Central Asia 976 26.7 3538 26.9
#> Sub-Saharan Africa 366 10.0 2928 22.2
#> Latin America & Caribbean 1220 33.3 2562 19.4
#> East Asia & Pacific 610 16.7 2196 16.7
#> Middle East & North Africa 366 10.0 1281 9.7
#> South Asia 122 3.3 488 3.7
#> North America 0 0.0 183 1.4
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics (N = 13176)
#> N Ndist
#> High income 4819 2
#> Low income 1830 1
#> Lower middle income 2867 1
#> Upper middle income 3660 2
#>
#> Table (Freq Perc)
#> High income Low income Lower middle income Upper middle income
#> FALSE 2745 57.0 1830 100.0 2867 100.0 3538 96.7
#> TRUE 2074 43.0 0 0.0 0 0.0 122 3.3
#> Total
#> FALSE 10980 83.3
#> TRUE 2196 16.7
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (N = 9470, 28.13% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 3179 3179 30280.73 23847.05 932.04 196061.42 2.17
#> Low income 1311 1311 597.41 288.44 164.34 1864.79 1.24
#> Lower middle income 2246 2246 1574.25 858.72 144.99 4818.19 0.91
#> Upper middle income 2734 2734 4945.33 2979.56 132.08 20532.95 1.23
#> Kurt 1% 5% 10% 25% 50%
#> High income 10.34 3053.83 5395.18 7768.74 14369.61 24745.65
#> Low income 4.71 191.73 234.77 289.48 396.52 535.96
#> Lower middle income 3.72 194.43 398.88 585.24 961.12 1437.78
#> Upper middle income 4.94 466.58 1248.19 1835.98 2864.47 4219.97
#> 75% 90% 95% 99%
#> High income 38936.22 57259 75529.1 116493.28
#> Low income 745.29 985.45 1180.37 1513.83
#> Lower middle income 1987.89 2829.09 3192.75 4191.8
#> Upper middle income 6452.07 8966.02 10867.95 14416.71
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (N = 11670, 11.43% NAs)
#> N Ndist Mean SD Min Max Skew Kurt 1%
#> High income 3831 3566 73.62 5.67 42.67 85.42 -1.01 5.56 55.62
#> Low income 1800 1751 49.73 9.09 26.17 74.43 0.27 2.67 31.5
#> Lower middle income 2790 2694 58.15 9.31 18.91 76.7 -0.34 2.68 36.62
#> Upper middle income 3249 3083 66.65 7.54 36.53 80.28 -1.1 4.23 42.66
#> 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 63.95 67.12 70.5 73.93 77.61 80.67 81.79 83.22
#> Low income 35.78 38.2 43.52 49.04 56.06 61.98 65.87 71.71
#> Lower middle income 42.66 45.73 51.5 58.53 65.79 70 71.72 74.91
#> Upper middle income 51.22 55.93 62.8 68.36 71.95 74.66 75.94 78.42
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (N = 1744, 86.76% NAs)
#> N Ndist Mean SD Min Max Skew Kurt 1%
#> High income 680 213 33.3 6.79 20.7 58.9 1.49 5.68 23.42
#> Low income 107 88 41.13 6.58 29.5 65.8 0.75 4.24 29.81
#> Lower middle income 369 219 40.05 9.3 24 63.2 0.44 2.22 24.77
#> Upper middle income 588 280 43.16 8.95 25.2 64.8 0.08 2.35 26.21
#> 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 25.2 26.39 28.48 32.35 35.5 41.01 48.72 56.62
#> Low income 32.35 33.26 35.65 41.1 44.9 48.26 51.61 60.99
#> Lower middle income 26.84 28.88 32.7 38.7 46.6 54.52 56.94 59.82
#> Upper middle income 27.87 30.6 36.77 42.45 49.5 54.83 58.56 63
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (N = 8608, 34.67% NAs)
#> N Ndist Mean SD Min
#> High income 1575 1407 153'663194 425'918409 -464'709991
#> Low income 1692 1678 631'660165 941'498380 -500000
#> Lower middle income 2544 2503 692'072692 1.02452490e+09 -605'969971
#> Upper middle income 2797 2700 301'326218 765'116131 -997'679993
#> Max Skew Kurt 1% 5%
#> High income 4.34612988e+09 5.25 36.27 -54'802401.1 -755999.99
#> Low income 1.04032100e+10 4.46 32.13 1'100000.02 33'997999.8
#> Lower middle income 1.18790801e+10 3.79 25.24 209999.99 14'721500.3
#> Upper middle income 2.56715605e+10 16.31 464.86 -73'793201.9 4'558000.18
#> 10% 25% 50% 75%
#> High income 264000 4'400000.1 21'209999.1 104'934998
#> Low income 71'296000.7 151'814999 332'904999 692'777496
#> Lower middle income 41'358000.2 100'485003 336'494995 810'707520
#> Upper middle income 12'666000 38'000000 105'139999 311'519989
#> 90% 95% 99%
#> High income 375'347992 661'426996 2.31632209e+09
#> Low income 1.47914895e+09 2.14049348e+09 4.82899863e+09
#> Lower middle income 1.84614302e+09 2.59226945e+09 4.69573516e+09
#> Upper middle income 714'823975 1.18504797e+09 2.98750435e+09
#> --------------------------------------------------------------------------------
#> POP (numeric): Population, total
#> Statistics (N = 12919, 1.95% NAs)
#> N Ndist Mean SD Min
#> High income 4737 4712 12'421540.4 34'160829.5 2833
#> Low income 1792 1791 11'690380.2 13'942313.8 365047
#> Lower middle income 2790 2790 40'802037.5 137'302296 41202
#> Upper middle income 3600 3596 33'223895.5 143'647992 4375
#> Max Skew Kurt 1% 5%
#> High income 328'239523 5.5 39.75 7467.08 18432.4
#> Low income 112'078730 3.22 16.57 594755.89 1'206251.55
#> Lower middle income 1.36641775e+09 6.7 52.4 58452.97 105620.75
#> Upper middle income 1.39771500e+09 7.53 61.78 7357.28 47202.15
#> 10% 25% 50% 75%
#> High income 30517 84449 1'632114 8'336605
#> Low income 1'919035.6 3'842838.75 7'181772 13'579920.8
#> Lower middle income 224651.9 1'188469 5'914923.5 25'966431.8
#> Upper middle income 93885.2 609166.25 3'763490 16'347212.5
#> 90% 95% 99%
#> High income 37'508393.4 58'933084.2 209'091400
#> Low income 25'964845.3 36'596246.7 76'539171.5
#> Lower middle income 81'157844 146'949299 893'256928
#> Upper middle income 47'556659.8 104'771148 1.02344515e+09
#> --------------------------------------------------------------------------------
## Grouped & Weighted Desciptions
descr(wlddev, ~ income, w = ~ replace_NA(POP))
#> Dataset: wlddev, 11 Variables, N = 13176, WeightSum = 313233706778
#> Grouped by: income [4]
#> N WeightSum
#> High income 4819 58840837058
#> Low income 1830 20949161394
#> Lower middle income 2867 113837684528
#> Upper middle income 3660 119606023798
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics (WeightSum = 313233706778)
#> WeightSum Ndist
#> High income 5.88408371e+10 79
#> Low income 2.09491614e+10 30
#> Lower middle income 1.13837685e+11 47
#> Upper middle income 1.19606024e+11 60
#>
#> Table (WeightSum Perc)
#> High income Low income Lower middle income
#> China 0 0.0 0 0.0 0 0.0
#> India 0 0.0 0 0.0 52835203044 46.4
#> United States 15226426293 25.9 0 0.0 0 0.0
#> Indonesia 0 0.0 0 0.0 10681870259 9.4
#> Brazil 0 0.0 0 0.0 0 0.0
#> Russian Federation 0 0.0 0 0.0 0 0.0
#> Japan 7088669911 12.0 0 0.0 0 0.0
#> Pakistan 0 0.0 0 0.0 6865420747 6.0
#> Bangladesh 0 0.0 0 0.0 6217567789 5.5
#> Nigeria 0 0.0 0 0.0 6191168112 5.4
#> Mexico 0 0.0 0 0.0 0 0.0
#> Germany 4773054666 8.1 0 0.0 0 0.0
#> Vietnam 0 0.0 0 0.0 3955178878 3.5
#> Philippines 0 0.0 0 0.0 3805345278 3.3
#> Upper middle income Total
#> China 65272180000 54.6 65272180000 20.8
#> India 0 0.0 52835203044 16.9
#> United States 0 0.0 15226426293 4.9
#> Indonesia 0 0.0 10681870259 3.4
#> Brazil 8711884458 7.3 8711884458 2.8
#> Russian Federation 8388319293 7.0 8388319293 2.7
#> Japan 0 0.0 7088669911 2.3
#> Pakistan 0 0.0 6865420747 2.2
#> Bangladesh 0 0.0 6217567789 2.0
#> Nigeria 0 0.0 6191168112 2.0
#> Mexico 4948012523 4.1 4948012523 1.6
#> Germany 0 0.0 4773054666 1.5
#> Vietnam 0 0.0 3955178878 1.3
#> Philippines 0 0.0 3805345278 1.2
#> [ reached getOption("max.print") -- omitted 1 row ]
#>
#> Summary of Table WeightSums
#> High income Low income Lower middle income
#> Min. :0.000e+00 Min. :0.000e+00 Min. :0.000e+00
#> 1st Qu.:0.000e+00 1st Qu.:0.000e+00 1st Qu.:0.000e+00
#> Median :0.000e+00 Median :0.000e+00 Median :0.000e+00
#> Mean :2.724e+08 Mean :9.699e+07 Mean :5.270e+08
#> 3rd Qu.:1.083e+07 3rd Qu.:0.000e+00 3rd Qu.:0.000e+00
#> Max. :1.523e+10 Max. :3.280e+09 Max. :5.284e+10
#> Upper middle income Total
#> Min. :0.000e+00 Min. :5.006e+05
#> 1st Qu.:0.000e+00 1st Qu.:3.067e+07
#> Median :0.000e+00 Median :2.553e+08
#> Mean :5.537e+08 Mean :1.450e+09
#> 3rd Qu.:5.643e+06 3rd Qu.:8.257e+08
#> Max. :6.527e+10 Max. :6.527e+10
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics (WeightSum = 313233706778)
#> WeightSum Ndist
#> High income 5.88408371e+10 79
#> Low income 2.09491614e+10 30
#> Lower middle income 1.13837685e+11 47
#> Upper middle income 1.19606024e+11 60
#>
#> Table (WeightSum Perc)
#> High income Low income Lower middle income
#> CHN 0 0.0 0 0.0 0 0.0
#> IND 0 0.0 0 0.0 52835203044 46.4
#> USA 15226426293 25.9 0 0.0 0 0.0
#> IDN 0 0.0 0 0.0 10681870259 9.4
#> BRA 0 0.0 0 0.0 0 0.0
#> RUS 0 0.0 0 0.0 0 0.0
#> JPN 7088669911 12.0 0 0.0 0 0.0
#> PAK 0 0.0 0 0.0 6865420747 6.0
#> BGD 0 0.0 0 0.0 6217567789 5.5
#> NGA 0 0.0 0 0.0 6191168112 5.4
#> MEX 0 0.0 0 0.0 0 0.0
#> DEU 4773054666 8.1 0 0.0 0 0.0
#> VNM 0 0.0 0 0.0 3955178878 3.5
#> PHL 0 0.0 0 0.0 3805345278 3.3
#> Upper middle income Total
#> CHN 65272180000 54.6 65272180000 20.8
#> IND 0 0.0 52835203044 16.9
#> USA 0 0.0 15226426293 4.9
#> IDN 0 0.0 10681870259 3.4
#> BRA 8711884458 7.3 8711884458 2.8
#> RUS 8388319293 7.0 8388319293 2.7
#> JPN 0 0.0 7088669911 2.3
#> PAK 0 0.0 6865420747 2.2
#> BGD 0 0.0 6217567789 2.0
#> NGA 0 0.0 6191168112 2.0
#> MEX 4948012523 4.1 4948012523 1.6
#> DEU 0 0.0 4773054666 1.5
#> VNM 0 0.0 3955178878 1.3
#> PHL 0 0.0 3805345278 1.2
#> [ reached getOption("max.print") -- omitted 1 row ]
#>
#> Summary of Table WeightSums
#> High income Low income Lower middle income
#> Min. :0.000e+00 Min. :0.000e+00 Min. :0.000e+00
#> 1st Qu.:0.000e+00 1st Qu.:0.000e+00 1st Qu.:0.000e+00
#> Median :0.000e+00 Median :0.000e+00 Median :0.000e+00
#> Mean :2.724e+08 Mean :9.699e+07 Mean :5.270e+08
#> 3rd Qu.:1.083e+07 3rd Qu.:0.000e+00 3rd Qu.:0.000e+00
#> Max. :1.523e+10 Max. :3.280e+09 Max. :5.284e+10
#> Upper middle income Total
#> Min. :0.000e+00 Min. :5.006e+05
#> 1st Qu.:0.000e+00 1st Qu.:3.067e+07
#> Median :0.000e+00 Median :2.553e+08
#> Mean :5.537e+08 Mean :1.450e+09
#> 3rd Qu.:5.643e+06 3rd Qu.:8.257e+08
#> Max. :6.527e+10 Max. :6.527e+10
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics (N = 13176)
#> N Ndist Min Max
#> High income 4819 61 1961-01-01 2021-01-01
#> Low income 1830 61 1961-01-01 2021-01-01
#> Lower middle income 2867 61 1961-01-01 2021-01-01
#> Upper middle income 3660 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics (N = 12919, 1.95% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 4737 61 1991.75 166301.18 1960 2019 -16325.13
#> Low income 1792 61 1997.27 78395.39 1960 2019 8191.05
#> Lower middle income 2790 61 1995.41 335963.28 1960 2019 10925.07
#> Upper middle income 3600 61 1993.44 397459.08 1960 2019 -4274.8
#> Kurt
#> High income 634'846395
#> Low income 232'488037
#> Lower middle income 3.15129968e+09
#> Upper middle income 3.10022335e+09
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1960 1963 1967 1977 1993 2007 2015 2017 2019
#> Low income 1961 1966 1972 1985 2001 2011 2016 2018 2019
#> Lower middle income 1961 1965 1970 1983 1998 2010 2016 2018 2019
#> Upper middle income 1961 1964 1969 1980 1995 2008 2015 2017 2019
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics (N = 12919, 1.95% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 4737 7 1987.19 164278.72 1960 2010 -17271.45
#> Low income 1792 7 1992.55 76436.79 1960 2010 7010.38
#> Lower middle income 2790 7 1990.76 331059.97 1960 2010 7127.04
#> Upper middle income 3600 7 1988.84 393125.08 1960 2010 -7285.96
#> Kurt
#> High income 634'974205
#> Low income 190'925692
#> Lower middle income 2.75926384e+09
#> Upper middle income 2.87721719e+09
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> High income 1960 1960 1960 1970 1990 2000 2010 2010 2010
#> Low income 1960 1960 1970 1980 2000 2010 2010 2010 2010
#> Lower middle income 1960 1960 1970 1980 1990 2010 2010 2010 2010
#> Upper middle income 1960 1960 1960 1980 1990 2000 2010 2010 2010
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics (WeightSum = 313233706778)
#> WeightSum Ndist
#> High income 5.88408371e+10 6
#> Low income 2.09491614e+10 5
#> Lower middle income 1.13837685e+11 6
#> Upper middle income 1.19606024e+11 6
#>
#> Table (WeightSum Perc)
#> High income Low income
#> East Asia & Pacific 11407808149 19.3876 0 0.0000
#> South Asia 0 0.0000 2252259680 10.7511
#> Europe & Central Asia 27285316560 46.3714 311485944 1.4869
#> Sub-Saharan Africa 4222055 0.0072 16384603068 78.2113
#> Latin America & Caribbean 1466292826 2.4920 429756890 2.0514
#> North America 16881058226 28.6894 0 0.0000
#> Middle East & North Africa 1796139242 3.0525 1571055812 7.4994
#> Lower middle income Upper middle income
#> East Asia & Pacific 22174820629 19.4793 69639871478 58.2244
#> South Asia 65947845945 57.9315 1006497506 0.8415
#> Europe & Central Asia 4511786205 3.9634 16972478305 14.1903
#> Sub-Saharan Africa 14399976836 12.6496 2519611135 2.1066
#> Latin America & Caribbean 1290800630 1.1339 22949003780 19.1872
#> North America 0 0.0000 0 0.0000
#> Middle East & North Africa 5512454283 4.8424 6518561594 5.4500
#> Total
#> East Asia & Pacific 103222500256 32.9538
#> South Asia 69206603131 22.0942
#> Europe & Central Asia 49081067014 15.6692
#> Sub-Saharan Africa 33308413094 10.6337
#> Latin America & Caribbean 26135854126 8.3439
#> North America 16881058226 5.3893
#> Middle East & North Africa 15398210931 4.9159
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics (WeightSum = 313233706778)
#> WeightSum Ndist
#> High income 5.88408371e+10 2
#> Low income 2.09491614e+10 1
#> Lower middle income 1.13837685e+11 1
#> Upper middle income 1.19606024e+11 2
#>
#> Table (WeightSum Perc)
#> High income Low income Lower middle income
#> FALSE 3113623360 5.3 20949161394 100.0 113837684528 100.0
#> TRUE 55727213698 94.7 0 0.0 0 0.0
#> Upper middle income Total
#> FALSE 111444004553 93.2 249344473835 79.6
#> TRUE 8162019245 6.8 63889232943 20.4
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (N = 9470, 28.13% NAs)
#> N Ndist Mean SD Min Max
#> High income 3179 3179 31284.74 121'817314 932.04 196061.42
#> Low income 1311 1311 557.14 1'425180.31 164.34 1864.79
#> Lower middle income 2246 2246 1238.83 16'016050.6 144.99 4818.19
#> Upper middle income 2734 2734 4145.68 88'766735.7 132.08 20532.95
#> Skew Kurt
#> High income 1733.12 2.10067153e+09
#> Low income -8828.84 156'366288
#> Lower middle income -23724.98 1.63059448e+09
#> Upper middle income -42752.44 2.18669143e+09
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75%
#> High income -8695.31 8805.41 13329.43 20952.27 31070.93 41647.93
#> Low income 168.86 196.56 234.28 356 488.53 710.43
#> Lower middle income 237.49 363.23 389.89 577.7 578.07 1636.15
#> Upper middle income 141.82 196.63 261.7 722.82 3543.75 6733.98
#> 90% 95% 99%
#> High income 48767.87 12028.54 59351.94
#> Low income 941.25 1128.47 1384.65
#> Lower middle income 2191.33 2857.99 3543.66
#> Upper middle income 8963.17 10741.17 12904.3
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (N = 11659, 11.51% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 3828 3566 75.69 37481.75 42.67 85.42 -385.83
#> Low income 1792 1751 53.51 41652.63 26.17 74.43 8500.35
#> Lower middle income 2790 2694 60.59 151991.94 18.91 76.7 -13033.11
#> Upper middle income 3249 3083 68.27 170387.07 36.53 80.28 -37108.33
#> Kurt
#> High income 450'824814
#> Low income 261'739013
#> Lower middle income 2.22374550e+09
#> Upper middle income 5.22842825e+09
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> High income 61.92 69.37 68.27 72.43 76.02 78.61 81.44 82.57
#> Low income 33.81 39.38 42.66 46.93 53 60.3 65.24 67.17
#> Lower middle income 40.49 45.38 43.94 54.68 62.12 62.76 69.66 66.67
#> Upper middle income -0.37 50.18 58.2 65.71 69.49 73.47 69.65 75.9
#> 99%
#> High income 83.61
#> Low income 72.69
#> Lower middle income 74.94
#> Upper middle income 76.76
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (N = 1744, 86.76% NAs)
#> N Ndist Mean SD Min Max Skew
#> High income 680 213 36.03 32920.93 20.7 58.9 -15285.12
#> Low income 107 88 39.76 36200.8 29.5 65.8 -10616.65
#> Lower middle income 369 219 35.16 56653.22 24 63.2 -14247.72
#> Upper middle income 588 280 43.88 122076.53 25.2 64.8 -31885.19
#> Kurt
#> High income 350'397576
#> Low income 239'178632
#> Lower middle income 965'071428
#> Upper middle income 3.02952158e+09
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> High income 25.38 28.15 29.89 32.3 35.29 40.5 41.16 41.4
#> Low income 29.81 25.32 32.71 35 40.36 43.37 45.9 48.02
#> Lower middle income 24.95 25.86 29.8 31.76 34.4 26 41.36 45.69
#> Upper middle income 28.4 34.38 36.52 38.7 42 48.02 55.6 59
#> 99%
#> High income 47.01
#> Low income 46.35
#> Lower middle income 54.25
#> Upper middle income 59.98
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (N = 8597, 34.75% NAs)
#> N Ndist Mean SD Min
#> High income 1572 1407 469'519277 4.55636685e+12 -464'709991
#> Low income 1684 1678 1.27976069e+09 9.36922518e+12 -500000
#> Lower middle income 2544 2503 2.23495473e+09 3.81816979e+13 -605'969971
#> Upper middle income 2797 2700 1.02122309e+09 3.90305188e+13 -997'679993
#> Max Skew Kurt
#> High income 4.34612988e+09 16070.86 429'406454
#> Low income 1.04032100e+10 24436.27 835'382836
#> Lower middle income 1.18790801e+10 54842.83 3.55642977e+09
#> Upper middle income 2.56715605e+10 48920.39 4.21936101e+09
#>
#> Quantiles
#> 1% 5% 10% 25%
#> High income -260'783040 -274'638452 -51'215742.9 12'609999.7
#> Low income 18'666554.1 101'936185 169'161774 340'636531
#> Lower middle income -4'317115.57 169'069425 351'599996 947'923769
#> Upper middle income -950'997744 -670'908559 -573'850110 127'574972
#> 50% 75% 90%
#> High income 73'615853.3 624'704563 1.68131885e+09
#> Low income 792'730514 1.73612809e+09 3.03588511e+09
#> Lower middle income 1.94860092e+09 2.91274032e+09 4.44617532e+09
#> Upper middle income 639'310908 1.90017583e+09 1.85394344e+09
#> 95% 99%
#> High income 1.89299032e+09 4.17603716e+09
#> Low income 4.29180270e+09 6.49328440e+09
#> Lower middle income 5.33746843e+09 8.44354790e+09
#> Upper middle income 3.52855425e+09 3.27336463e+09
#> --------------------------------------------------------------------------------
## Passing Arguments down to qsu.default: for Panel Data Statistics
descr(iris, pid = iris$Species)
#> Dataset: iris, 5 Variables, N = 150
#> --------------------------------------------------------------------------------
#> Sepal.Length (numeric):
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 150 5.84 0.83 4.3 7.9 0.31 2.43
#> Between 3 5.84 0.8 5.01 6.59 -0.21 1.5
#> Within 50 5.84 0.51 4.16 7.16 0.12 3.26
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 4.4 4.6 4.8 5.1 5.8 6.4 6.9 7.25 7.7
#> --------------------------------------------------------------------------------
#> Sepal.Width (numeric):
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 150 3.06 0.44 2 4.4 0.32 3.18
#> Between 3 3.06 0.34 2.77 3.43 0.43 1.5
#> Within 50 3.06 0.34 1.93 4.03 0.03 3.51
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 2.2 2.34 2.5 2.8 3 3.3 3.61 3.8 4.15
#> --------------------------------------------------------------------------------
#> Petal.Length (numeric):
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 150 3.76 1.77 1 6.9 -0.27 1.6
#> Between 3 3.76 2.09 1.46 5.55 -0.42 1.5
#> Within 50 3.76 0.43 2.5 5.11 0.12 3.89
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1.15 1.3 1.4 1.6 4.35 5.1 5.8 6.1 6.7
#> --------------------------------------------------------------------------------
#> Petal.Width (numeric):
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 150 1.2 0.76 0.1 2.5 -0.1 1.66
#> Between 3 1.2 0.9 0.25 2.03 -0.25 1.5
#> Within 50 1.2 0.2 0.57 1.67 -0.05 3.36
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 0.1 0.2 0.2 0.3 1.3 1.8 2.2 2.3 2.5
#> --------------------------------------------------------------------------------
#> Species (factor):
#> Statistics
#> N Ndist
#> 150 3
#>
#> Table
#> Freq Perc
#> setosa 50 33.33
#> versicolor 50 33.33
#> virginica 50 33.33
#> --------------------------------------------------------------------------------
descr(wlddev, pid = wlddev$iso3c)
#> Dataset: wlddev, 13 Variables, N = 13176
#> --------------------------------------------------------------------------------
#> country (character): Country Name
#> Statistics
#> N Ndist
#> 13176 216
#>
#> Table
#> Freq Perc
#> Afghanistan 61 0.46
#> Albania 61 0.46
#> Algeria 61 0.46
#> American Samoa 61 0.46
#> Andorra 61 0.46
#> Angola 61 0.46
#> Antigua and Barbuda 61 0.46
#> Argentina 61 0.46
#> Armenia 61 0.46
#> Aruba 61 0.46
#> Australia 61 0.46
#> Austria 61 0.46
#> Azerbaijan 61 0.46
#> Bahamas, The 61 0.46
#> ... 202 Others 12322 93.52
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 61 61 61 61 61 61
#> --------------------------------------------------------------------------------
#> iso3c (factor): Country Code
#> Statistics
#> N Ndist
#> 13176 216
#>
#> Table
#> Freq Perc
#> ABW 61 0.46
#> AFG 61 0.46
#> AGO 61 0.46
#> ALB 61 0.46
#> AND 61 0.46
#> ARE 61 0.46
#> ARG 61 0.46
#> ARM 61 0.46
#> ASM 61 0.46
#> ATG 61 0.46
#> AUS 61 0.46
#> AUT 61 0.46
#> AZE 61 0.46
#> BDI 61 0.46
#> ... 202 Others 12322 93.52
#>
#> Summary of Table Frequencies
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 61 61 61 61 61 61
#> --------------------------------------------------------------------------------
#> date (Date): Date Recorded (Fictitious)
#> Statistics
#> N Ndist Min Max
#> 13176 61 1961-01-01 2021-01-01
#> --------------------------------------------------------------------------------
#> year (integer): Year
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 13176 1990 17.61 1960 2020 -0 1.8
#> Between 216 1990 0 1990 1990 - -
#> Within 61 1990 17.61 1960 2020 -0 1.8
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1960 1963 1966 1975 1990 2005 2014 2017 2020
#> --------------------------------------------------------------------------------
#> decade (integer): Decade
#> Statistics
#> N/T Mean SD Min Max Skew Kurt
#> Overall 13176 1985.57 17.51 1960 2020 0.03 1.79
#> Between 216 1985.57 0 1985.57 1985.57 - -
#> Within 61 1985.57 17.51 1960 2020 0.03 1.79
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 1960 1960 1960 1970 1990 2000 2010 2010 2020
#> --------------------------------------------------------------------------------
#> region (factor): Region
#> Statistics
#> N Ndist
#> 13176 7
#>
#> Table
#> Freq Perc
#> Europe & Central Asia 3538 26.85
#> Sub-Saharan Africa 2928 22.22
#> Latin America & Caribbean 2562 19.44
#> East Asia & Pacific 2196 16.67
#> Middle East & North Africa 1281 9.72
#> South Asia 488 3.70
#> North America 183 1.39
#> --------------------------------------------------------------------------------
#> income (factor): Income Level
#> Statistics
#> N Ndist
#> 13176 4
#>
#> Table
#> Freq Perc
#> High income 4819 36.57
#> Upper middle income 3660 27.78
#> Lower middle income 2867 21.76
#> Low income 1830 13.89
#> --------------------------------------------------------------------------------
#> OECD (logical): Is OECD Member Country?
#> Statistics
#> N Ndist
#> 13176 2
#>
#> Table
#> Freq Perc
#> FALSE 10980 83.33
#> TRUE 2196 16.67
#> --------------------------------------------------------------------------------
#> PCGDP (numeric): GDP per capita (constant 2010 US$)
#> Statistics (28.13% NAs)
#> N/T Mean SD Min Max Skew Kurt
#> Overall 9470 12048.78 19077.64 132.08 196061.42 3.13 17.12
#> Between 206 12962.61 20189.9 253.19 141200.38 3.13 16.23
#> Within 45.97 12048.78 6723.68 -33504.87 76767.53 0.66 17.2
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95%
#> 227.71 399.62 555.55 1303.19 3767.16 14787.03 35646.02 48507.84
#> 99%
#> 92340.28
#> --------------------------------------------------------------------------------
#> LIFEEX (numeric): Life expectancy at birth, total (years)
#> Statistics (11.43% NAs)
#> N/T Mean SD Min Max Skew Kurt
#> Overall 11670 64.3 11.48 18.91 85.42 -0.67 2.67
#> Between 207 64.95 9.89 40.97 85.42 -0.5 2.17
#> Within 56.38 64.3 6.08 32.91 84.42 -0.26 3.7
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 35.83 42.77 46.83 56.36 67.44 72.95 77.08 79.34 82.36
#> --------------------------------------------------------------------------------
#> GINI (numeric): Gini index (World Bank estimate)
#> Statistics (86.76% NAs)
#> N/T Mean SD Min Max Skew Kurt
#> Overall 1744 38.53 9.2 20.7 65.8 0.6 2.53
#> Between 167 39.42 8.14 24.87 61.71 0.58 2.83
#> Within 10.44 38.53 2.93 25.39 55.36 0.33 5.34
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90% 95% 99%
#> 24.6 26.3 27.6 31.5 36.4 45 52.6 55.98 60.5
#> --------------------------------------------------------------------------------
#> ODA (numeric): Net official development assistance and official aid received (constant 2018 US$)
#> Statistics (34.67% NAs)
#> N/T Mean SD Min Max Skew
#> Overall 8608 454'720131 868'712654 -997'679993 2.56715605e+10 6.98
#> Between 178 439'168412 569'049959 468717.92 3.62337432e+09 2.36
#> Within 48.36 454'720131 650'709624 -2.44379420e+09 2.45610972e+10 9.6
#> Kurt
#> Overall 114.89
#> Between 9.95
#> Within 263.37
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75%
#> -12'593999.7 1'363500.01 8'347000.31 44'887499.8 165'970001 495'042503
#> 90% 95% 99%
#> 1.18400697e+09 1.93281696e+09 3.73380782e+09
#> --------------------------------------------------------------------------------
#> POP (numeric): Population, total
#> Statistics (1.95% NAs)
#> N/T Mean SD Min Max Skew
#> Overall 12919 24'245971.6 102'120674 2833 1.39771500e+09 9.75
#> Between 216 24'178573 98'616506.7 8343.33 1.08786967e+09 9
#> Within 59.81 24'245971.6 26'803077.4 -405'793067 510'077008 -0.41
#> Kurt
#> Overall 108.91
#> Between 90.02
#> Within 149.24
#>
#> Quantiles
#> 1% 5% 10% 25% 50% 75% 90%
#> 8698.84 31083.3 62268.4 443791 4'072517 12'816178 46'637331.4
#> 95% 99%
#> 81'177252.5 308'862641
#> --------------------------------------------------------------------------------