Market side descriptive statistics

demand_descriptives(object)

supply_descriptives(object)

# S4 method for market_model
demand_descriptives(object)

# S4 method for market_model
supply_descriptives(object)

Arguments

object

A model object.

Value

A data tibble containing descriptive statistics.

Details

Calculates and returns basic descriptive statistics for the model's demand or supply side data. Factor variables are excluded from the calculations. The function calculates and returns:

  • nobs Number of observations.

  • nmval Number of missing values.

  • min Minimum observation.

  • max Maximum observation.

  • range Observations' range.

  • sum Sum of observations.

  • median Median observation.

  • mean Mean observation.

  • mean_se Mean squared error.

  • mean_ce Confidence interval bound.

  • var Variance.

  • sd Standard deviation.

  • coef_var Coefficient of variation.

Functions

  • demand_descriptives: Demand descriptive statistics.

  • supply_descriptives: Supply descriptive statistics.

Examples

# initialize the basic model using the houses dataset
model <- new(
  "diseq_basic", # model type
  subject = ID, time = TREND, quantity = HS, price = RM,
  demand = RM + TREND + W + CSHS + L1RM + L2RM + MONTH,
  supply = RM + TREND + W + L1RM + MA6DSF + MA3DHF + MONTH,
  fair_houses(), # data
  correlated_shocks = FALSE # allow shocks to be correlated
)

# get descriptive statistics of demand side variables
demand_descriptives(model)
#> # A tibble: 13 × 7
#>    col             RM     TREND         W         CSHS       L1RM       L2RM
#>    <chr>        <dbl>     <dbl>     <dbl>        <dbl>      <dbl>      <dbl>
#>  1 nobs       130       130      130           130       130        130     
#>  2 nmval        0         0        0             0         0          0     
#>  3 min        578        15       18          1335.      577        577     
#>  4 max        835       144       23         16438.      830        825     
#>  5 range      257       129        5         15103.      253        248     
#>  6 sum      82094     10335     2757       1154007     81836      81583     
#>  7 median     600        79.5     21          9018.      600        600     
#>  8 mean       631.       79.5     21.2        8877.      630.       628.    
#>  9 mean_se      5.69      3.30     0.0944      386.        5.48       5.27  
#> 10 mean_ce     11.2       6.48     0.185       757.       10.7       10.3   
#> 11 var       4210.     1419.       1.16   19383358.     3908.      3614.    
#> 12 sd          64.9      37.7      1.08       4403.       62.5       60.1   
#> 13 coef_var     0.103     0.474    0.0507        0.496     0.0993     0.0958

# get descriptive statistics of supply side variables
supply_descriptives(model)
#> # A tibble: 13 × 7
#>    col             RM     TREND         W       L1RM     MA6DSF   MA3DHF
#>    <chr>        <dbl>     <dbl>     <dbl>      <dbl>      <dbl>    <dbl>
#>  1 nobs       130       130      130        130         130       130   
#>  2 nmval        0         0        0          0           0         0   
#>  3 min        578        15       18        577         141      -587.  
#>  4 max        835       144       23        830        1476       524.  
#>  5 range      257       129        5        253        1335      1111   
#>  6 sum      82094     10335     2757      81836      120133.     7205.  
#>  7 median     600        79.5     21        600         938.       61.2 
#>  8 mean       631.       79.5     21.2      630.        924.       55.4 
#>  9 mean_se      5.69      3.30     0.0944     5.48       24.8      15.8 
#> 10 mean_ce     11.2       6.48     0.185     10.7        48.5      31.1 
#> 11 var       4210.     1419.       1.16    3908.      79717.    32659.  
#> 12 sd          64.9      37.7      1.08      62.5       282.      181.  
#> 13 coef_var     0.103     0.474    0.0507     0.0993      0.306     3.26