Learn R Programming

entrymodels (version 0.2.1)

em_basic: Basic Entry Model

Description

Estimate basic entry model with only one variable for the market size.

Usage

em_basic(data, Sm, y, N_max = 5, alpha0 = rep(0.1, N_max),
  gamma0 = rep(1, N_max))

Arguments

data

A data.frame object containing your data

Sm

A string indicating the market size variable, present in data

y

A string indicating the outcome variable, present in data

N_max

An integer indicating the maximum number of competitors. Defaults to 5.

alpha0

A vector of type numeric and length N_max indicating the initial condition for alpha. Defaults to a vector of 0.1's.

gamma0

A vector of type numeric and length N_max indicating the initial condition for gamma. Defaults to a vector of 1's.

Value

A tibble with critical market sizes and estimated parameters, as explained in Bresnahan and Reiss (1991)

References

Bresnahan, T. F., & Reiss, P. C. (1991). Entry and competition in concentrated markets. Journal of political economy, 99(5), 977-1009.

Examples

Run this code
# NOT RUN {
tb <- data.frame(Sm = 1:5, y = 1:5)

# estimate default model
em_n5 <- em_basic(tb, "Sm", "y")

# estimate model with 3 competitors only
em_n3 <- em_basic(tb, "Sm", "y", N_max = 3)


# }
# NOT RUN {
# estimate model with different initial conditions
em_difc <- em_basic(tb, "Sm", "y", alpha0 = rep(0.2, 5), gamma0 = rep(1.1, 5))

# estimate model with example data
tb <- load_example_data()
em <- em_basic(tb, "Populacao", "n_agencias")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab