DOI: 10.5281/zenodo.7882079
title: Data and Code for "A Ray-Based Input Distance Function to Model Zero-Valued Output Quantities: Derivation and an Empirical Application"

description: This data and code archive provides all the data and code for replicating the empirical analysis that is presented in the journal article "A Ray-Based Input Distance Function to Model Zero-Valued Output Quantities: Derivation and an Empirical Application" authored by Juan José Price and Arne Henningsen and published in the Journal of Productivity Analysis (DOI: 10.1007/s11123-023-00684-1). We conducted the empirical analysis with the "R" statistical software (version 4.3.0) using the add-on packages "combinat" (version 0.0.8), "miscTools" (version 0.6.28), "quadprog" (version 1.5.8), sfaR (version 1.0.0), stargazer (version 5.2.3), and "xtable" (version 1.8.4) that are available at CRAN. We created the R package "micEconDistRay" that provides the functions for empirical analyses with ray-based input distance functions that we developed for the above-mentioned paper. Also this R package is available at CRAN (https://cran.r-project.org/package=micEconDistRay). This replication package contains the following files and folders: <strong>README</strong><br> This file <strong>MuseumsDk.csv</strong><br> The original data obtained from the Danish Ministry of Culture and from Statistics Denmark. It includes the following variables: <em>museum</em>: Name of the museum. <em>type</em>: Type of museum (Kulturhistorisk museum = cultural history museum; Kunstmuseer = arts museum; Naturhistorisk museum = natural history museum; Blandet museum = mixed museum). <em>munic</em>: Municipality, in which the museum is located. <em>yr</em>: Year of the observation. <em>units</em>: Number of visit sites. <em>resp</em>: Whether or not the museum has special responsibilities (0 = no special responsibilities; 1 = at least one special responsibility). <em>vis</em>: Number of (physical) visitors. <em>aarc</em>: Number of articles published (archeology). <em>ach</em>: Number of articles published (cultural history). <em>aah</em>: Number of articles published (art history). <em>anh</em>: Number of articles published (natural history). <em>exh</em>: Number of temporary exhibitions. <em>edu</em>: Number of primary school classes on educational visits to the museum. <em>ev</em>: Number of events other than exhibitions. <em>ftesc</em>: Scientific labor (full-time equivalents). <em>ftensc</em>: Non-scientific labor (full-time equivalents). <em>expProperty</em>: Running and maintenance costs [1,000 DKK]. <em>expCons</em>: Conservation expenditure [1,000 DKK]. <em>ipc</em>: Consumer Price Index in Denmark (the value for year 2014 is set to 1). <strong>prepare_data.R</strong><br> This R script imports the data set MuseumsDk.csv, prepares it for the empirical analysis (e.g., removing unsuitable observations, preparing variables), and saves the resulting data set as DataPrepared.csv. <strong>DataPrepared.csv</strong><br> This data set is prepared and saved by the R script prepare_data.R. It is used for the empirical analysis. <strong>make_table_descriptive.R</strong><br> This R script imports the data set DataPrepared.csv and creates the LaTeX table /tables/table_descriptive.tex, which provides summary statistics of the variables that are used in the empirical analysis. <strong>IO_Ray.R</strong><br> This R script imports the data set DataPrepared.csv, estimates a ray-based Translog input distance functions with the 'optimal' ordering of outputs, imposes monotonicity on this distance function, creates the LaTeX table /tables/idfRes.tex that presents the estimated parameters of this function, and creates several figures in the folder /figures/ that illustrate the results. <strong>IO_Ray_ordering_outputs.R</strong><br> This R script imports the data set DataPrepared.csv, estimates a ray-based Translog input distance functions, imposes monotonicity for each of the 720 possible orderings of the outputs, and saves all the estimation results as (a huge) R object allOrderings.rds. <strong>allOrderings.rds</strong> (not included in the ZIP file, uploaded separately)<br> This is a saved R object created by the R script IO_Ray_ordering_outputs.R that contains the estimated ray-based Translog input distance functions (with and without monotonicity imposed) for each of the 720 possible orderings. <strong>IO_Ray_model_averaging.R</strong><br> This R script loads the R object allOrderings.rds that contains the estimated ray-based Translog input distance functions for each of the 720 possible orderings, does model averaging, and creates several figures in the folder /figures/ that illustrate the results. <strong>/tables/</strong><br> This folder contains the two LaTeX tables table_descriptive.tex and idfRes.tex (created by R scripts make_table_descriptive.R and IO_Ray.R, respectively) that provide summary statistics of the data set and the estimated parameters (without and with monotonicity imposed) for the 'optimal' ordering of outputs. <strong>/figures/</strong><br> This folder contains 48 figures (created by the R scripts IO_Ray.R and IO_Ray_model_averaging.R) that illustrate the results obtained with the 'optimal' ordering of outputs and the model-averaged results and that compare these two sets of results.