Pakes/McGuire Algorithm --- Matlab Version Modify and execute the main script "run.m" Notes from the Gauss version are below. NOTES FOR THE PAKES-MCGUIRE GAUSS SHELL PROGRAM **************************************************************************** May 14, 1999 INSTALLATION NOTES ------------------ 1. Put all files that come with this archive into a separate directory, 2. Modify file PMG.H as follows: If you are using DOS/Windows, lines 20-21 of PMG.H should read: _ostype=_DOS; _editor="edit"; If you are using UNIX, lines 20-21 of PMG.H should read: _ostype=_UNIX; _editor="pico"; _editor variable can be set to any text editor available on the installation system, i.e. you can set _editor="emacs" for UNIX or _editor="notepad" for Windows. 3. Start Gauss and switch to the directory that contains source files. 4. From the Gauss prompt, type run pmgshell.g 5. Follow on-screen menus. TYPICAL PROGRAM SESSION ----------------------- 1. Set the model primitives (maximum number of firms, investment effect, etc.). 2. Set static parameters (i.e., parameters that only affect the shape of the one-period profit function; these parameters are model-specific). 3. After static parameters have been set, the static profit function can be computed. You can see it by choosing Descriptive Statistics/Static Profit Function. 4. Set dynamic parameters (parameters that affect the shape of the value function - discount factor, entry costs, etc.). 5. Compute value function (Compute Dynamic Equilibrium menu option). 6. After value function have been computed, you can use Descriptive Statistics submenu to view the value function and perform various experiments. 7. At any point, you can choose Save Parameters/Load Parameters to save/load current parameter settings. Notice, however, that the program only keeps track of the computations for the most recently used set of parameters; if you load a different set of parameters, you have to recompute the model. 8. If you only change dynamic parameters, there is no need to recompute static profit function. If you only change the maximum number of firms in the industry, you can make use of the previous computations by setting Starting Number of Firms in the Set Dynamic Parameters submenu at the maximum previously computed level. 9. First time you run the program, it starts with the default set of parameters. After that, it starts with the most recently used set of parameters. PROGRAM NOTES ------------- Most of the screen menus and output files are self-explanatory, although they assume familiarity with the Pakes-McGuire algorithm. You can (nearly) always hit "Enter" to accept default values used in the article. Descriptive Statistics menu is organized as follows: STATIC PROFIT FUNCTION generates a printout of the single-period profit function for all participating firms. Headers are: State - Vector of efficiency levels for participating firms. Profit - Vector of profit values. Share - Vector of market shares. P/MC - Average markup (price to marginal cost ratio). CtrRatio - Concentration ratio for the industry. VALUE FUNCTION produces a printout of the value function for the n-firms problem. Headers are: State - Vector of efficiency levels for participating firms. Value - Value function for each firm. Invest - Investment levels. P{rising}- Probability that investment leads to the increase in the firm's efficiency level. IsEntry - One if there is an entry at this industry structure; zero o/w. ENTRY AND EXIT STATISTICS runs a single simulation of the industry evolution with initial conditions specified by the user and computes some descriptive statistics, most of it self-explanatory. Notice, however, that the lifespan distribution is computed using firm's COMPLETE lifespan, defined as the number of periods until the firm exits the industry. For some parameter values or for short simulations it is conceivable that the incumbent firm(s) will stay active throughout the simulation period. Such firm(s) will NOT be included in the lifespan computation since it never "died" during the simulations. This approach prevents data censoring problem but may result in the insufficient number of observations for computing lifespan statistics. WELFARE STATISTICS bootstraps fixed horizon simulations to compute mean consumer, producer, and total surplus across different realizations of the underlying stochastic process. You can choose the number of bootsraps and the length of the simulation period in a single bootstrap. SIMULATE PANEL DATA produces a detailed snapshot of the industry evolution for a single fixed horizon simulation and prints results to a plain ASCII file for further analysis. Output format is as follows: Column 1 - Time period, t 2 - Firm's ID (every firm that was ever active in the simulated sample will receive the unique identifier), j 3 - Firm's efficiency level, w(j,t) 4 - Firm's market share (including outside good), s(j,t) 5 - Firm's profit, pi(j,t) 6 - Firm's investment, x(j,t) 7 - Firm's value, V(j,t) 8 - Firm's realization of its own efficiency increment (0/1), v(j) 9 - Realization of the common shock (0/1), tau Hence, unless firm j exits the industry, its efficiency level next period is given by w(j,t+1)=w(j,t)+v(j)-tau. LIMITATIONS AND KNOWN PROBLEMS ----------------------------- Deterministic entry cost option is not implemented. MAKE PANEL DATA option is not implemented for a monopolist/social planner problems. Headers for the value/static profit function printouts are incorrectly formatted for the case of the single firm. In all instances when user is required to supply a name of the output file, typing a file name that does not comply with the OS file naming conventions will cause an abnormal program termination. Failure to supply correct OS-specific parameters in PMG.H will cause mailfunctioning of all program dialogs. FEEDBACK -------- Please send your comments and report bugs to: Oleg Melnikov oleg.melnikov@yale.edu