auction_generate_data {auctionr}R Documentation

Generates sample data for running auction_model

Description

Generates sample data for running auction_model

Usage

auction_generate_data(
  obs = NULL,
  max_n_bids = 10,
  new_x_mean = NULL,
  new_x_sd = NULL,
  mu = NULL,
  alpha = NULL,
  sigma = NULL,
  beta = NULL
)

Arguments

obs

Number of observations (or auctions) to draw.

max_n_bids

Maximum number of bids per auction (must be 3 or greater). The routine generates a vector of length obs of random numbers between 2 and max_n_bids.

new_x_mean

Mean values for observable controls to be generated from a Normal distribution.

new_x_sd

Standard deviations for observable controls to be generated from a Normal distribution.

mu

Value for mu, or mean, of private value distribution (Weibull) to be generated.

alpha

Value for alpha, or shape parameter, of private value distribution (Weibull) to be generated.

sigma

Value for standard deviation of unobserved heterogeneity distribution. Note that the distribution is assumed to have mean 1.

beta

Coefficients for the generated observable controls. Must be of the same length as new_x_mean and new_x_sd.

Details

This function generates example data for feeding into auction_model(). Specifically, the winning bid, number of bids, and observed heterogeneity are sampled for the specified number of observations.

Value

A data frame with obs rows and the following columns:

winning_bid

numeric values of the winning bids for each observation

n_bids

number of bids for each observation

X#

X terms that represent observed heterogeneity

See Also

auction_model

Examples

dat <- auction_generate_data(obs = 100,
                             mu = 10,
                             new_x_mean= c(-1,1),
                             new_x_sd = c(0.5,0.8),
                             alpha = 2,
                             sigma = 0.2,
                             beta = c(-1,1))
dim(dat)
head(dat)


[Package auctionr version 0.1.0 Index]