Skip to contents

Methods that summarize models and their estimates.

market_model: Prints basic information about the passed model object. In addition to the output of the show method, summary prints

  • the number of observations,

  • the number of observations in each equation for models with sample separation, and

  • various categories of variables.

market_fit: Prints basic information about the passed model fit. In addition to the output of the model's summary method, the function prints basic estimation results. For a maximum likelihood estimation, the function prints

  • the used optimization method,

  • the maximum number of allowed iterations,

  • the relative convergence tolerance (see optim),

  • the convergence status,

  • the initializing parameter values,

  • the estimated coefficients, their standard errors, Z values, and P values, and

  • \(-2 \log L\) evaluated at the maximum.

For a linear estimation of the equilibrium system, the function prints

  • the used method,

  • the summary of the first stage regression,

  • the summary of the demand (second stage) regression, and

  • the summary of the supply (second stage) regression.

Usage

# S4 method for market_model
summary(object)

# S4 method for market_fit
summary(object)

Arguments

object

An object to be summarized.

Value

No return value, called for for side effects (print summary).

Methods (by class)

  • market_model: Summarizes the model.

  • market_fit: Summarizes the model's fit.

Examples

# \donttest{
model <- simulate_model(
  "diseq_stochastic_adjustment", list(
    # observed entities, observed time points
    nobs = 500, tobs = 3,
    # demand coefficients
    alpha_d = -0.1, beta_d0 = 9.8, beta_d = c(0.3, -0.2), eta_d = c(0.6, -0.1),
    # supply coefficients
    alpha_s = 0.1, beta_s0 = 5.1, beta_s = c(0.9), eta_s = c(-0.5, 0.2),
    # price equation coefficients
    gamma = 1.2, beta_p0 = 3.1, beta_p = c(0.8)
  ),
  seed = 556
)

# print model summary
summary(model)
#> Stochastic Adjustment Model for Markets in Disequilibrium:
#>   Demand RHS        :   D_P + D_Xd1 + D_Xd2 + D_X1 + D_X2
#>   Supply RHS        :   S_P + S_Xs1 + S_X1 + S_X2
#>   Price Dynamics RHS:   I(D_Q - S_Q) + Xp1
#>   Short Side Rule   : Q = min(D_Q, S_Q)
#>   Shocks            : Correlated
#>   Nobs              : 1000
#>   Sample Separation : Not Separated
#>   Quantity Var      : Q
#>   Price Var         : P
#>   Key Var(s)        : id, date
#>   Time Var          : date

# estimate
fit <- estimate(model)

# print estimation summary
summary(fit)
#> Stochastic Adjustment Model for Markets in Disequilibrium:
#>   Demand RHS        :   D_P + D_Xd1 + D_Xd2 + D_X1 + D_X2
#>   Supply RHS        :   S_P + S_Xs1 + S_X1 + S_X2
#>   Price Dynamics RHS:   I(D_Q - S_Q) + Xp1
#>   Short Side Rule   : Q = min(D_Q, S_Q)
#>   Shocks            : Correlated
#>   Nobs              : 1000
#>   Sample Separation : Not Separated
#>   Quantity Var      : Q
#>   Price Var         : P
#>   Key Var(s)        : id, date
#>   Time Var          : date
#> 
#> Maximum likelihood estimation:
#>   Method              : BFGS
#>   Convergence Status  : success
#>   Starting Values     :
#>        D_P    D_CONST      D_Xd1      D_Xd2       D_X1       D_X2        S_P 
#>   -0.01745    6.59786    0.16735   -0.05024   -0.25363    0.12207    0.02057 
#>    S_CONST      S_Xs1       S_X1       S_X2     P_DIFF    P_CONST      P_Xp1 
#>    6.06990    0.69456   -0.27171    0.14194    0.87629    4.67594    0.73716 
#> D_VARIANCE S_VARIANCE P_VARIANCE     RHO_DS     RHO_DP     RHO_SP 
#>    1.38932    0.93584    2.56019    0.00000    0.00000    0.00000 
#> 
#> Coefficients:
#>                Estimate Std. Error      z value      Pr(>|z|) 
#>  D_P        -0.110854633 0.01710495  -6.48084968  9.120750e-11 ***
#>  D_CONST     9.779675882 0.36748757  26.61226335 4.896025e-156 ***
#>  D_Xd1       0.244251424 0.04740997   5.15190035  2.578600e-07 ***
#>  D_Xd2      -0.213337147 0.04796551  -4.44771970  8.678668e-06 ***
#>  D_X1        0.584519744 0.07234513   8.07960050  6.497929e-16 ***
#>  D_X2       -0.153091884 0.04972329  -3.07887668  2.077827e-03 **
#>  S_P         0.112680126 0.01361042   8.27895761  1.242582e-16 ***
#>  S_CONST     5.036000088 0.16770213  30.02943349 4.052506e-198 ***
#>  S_Xs1       0.894801782 0.04410817  20.28653140  1.691138e-91 ***
#>  S_X1       -0.511272158 0.04861817 -10.51607092  7.284843e-26 ***
#>  S_X2        0.244117179 0.03774415   6.46768254  9.951729e-11 ***
#>  P_DIFF      1.256243829 0.07596018  16.53818963  1.947888e-61 ***
#>  P_CONST     3.299871363 0.15448579  21.36035519 3.124267e-101 ***
#>  P_Xp1       0.787665383 0.04393121  17.92951824  6.937821e-72 ***
#>  D_VARIANCE  1.001054402 0.19609329   5.10499053  3.308111e-07 ***
#>  S_VARIANCE  1.091571074 0.08121349  13.44075977  3.488365e-41 ***
#>  P_VARIANCE  0.967186558 0.29540610   3.27409135  1.060023e-03 **
#>  RHO_DS      0.013800047 0.23059522   0.05984533  9.522788e-01  
#>  RHO_DP      0.030972617 0.22718846   0.13633006  8.915604e-01  
#>  RHO_SP     -0.008679536 0.17172449  -0.05054338  9.596894e-01  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> -2 log L: 5866.412
# }