*! version: 7 02Oct2024

help gpsmd

Title

gpsmd -- Estimation of the generalized propensity score for multi-dimensional continuous treatment

Syntax

gpsmd varlist(min=1), exogenous(varlist) gpsmd(string) [chosenpoint(string) ln(varlist)]

varlist: the dimensions of the treatment.

Description

gpsmd estimates the generalized propensity score for multidimensional continuous treatment as described in Egger and von Ehrlich (2013).
The multidimensional continuous treatment is conceived as a vector whose dimensions are specified in varlist.
The command should be used together with gpsmdcomsup, gpsmdbal, and gpsmdpolest to estimate the dose-response function.

Options

exogenous(varlist): the list of the exogenous variable and their possible interactions and powers, depending on the model the user has in mind.

gpsmd(string): the name for the variable where the generated propensity score will be stored.

chosenpoint(string): the name of the Stata column vector with the point at which the propensity score must be computed (mostly for programs).
It is an option that enables the user to generate the propensity score calculated at a given point. It generates g(t, Z_i) instead of g(T_i, Z_i).

ln(varlist): the treatment dimensions that have to be log-transformed.

Examples

Setup

Setting the dataset:

. clear all

. set obs 1200

Generating independent variables for the propensity score estimation:

. seed 13131

. gen X1 = 1* rnormal(0,1)

. gen X2 = 2* rnormal(0,1)

. gen X3 = 3* rnormal(0,1)

. gen X4 = 4* rnormal(0,1)

. gen X5 = 5* rnormal(0,1)

. gen X6 = 6* rnormal(0,1)

. gen X7 = 7* rnormal(0,1)

Generating the treatment dimensions:

. matrix R = (25, 2 \2, 25)

. drawnorm V1 V2, cov(R)

. gen T1= 1*X1 + .5*X2 + 1*X3 + .5*X4 + 1*X5 + .5*X6 + 1*X7 + V1

. gen T2= .5*X1 + 1*X2 + .5*X3 + 1*X4 + .5*X5 + 1*X6 + .5*X7 + V2

The estimation:

. gpsmd T1 T2, exogenous(X1 X2 X3 X4 X5 X6 X7) gpsmd(GPS)

Stored results

Variables

gpsmd generates a variable named as specified in gpsmd(string) with the estimated propensity score.

gpsmd stores the following in r():

Macros

r(gpsmdvar) macro with the string in the option gpsmdvar(string)

r(Exogenous) macro with the varlist in the option exogenous(varlist).

r(Dimensions) macro with the varlist of the dimensions of the treatment.

r(cmdline#) macro with the cdmline of the reduced equation for dimension #. The user may want to run again only one of the regressions and focus on those results. This macro enables to do it easily.

r(cmd) macro with the name of the command just invoked (gpsmd)

r(cmdline) macro with the cdmline. This macro reports the command just invoked, including options and specifications

r(chosenpoint) macro with the name of the column vector with the chosen point

r(LNVarCreated) if the ln(varlist) option is specified, the program generates variables named LN_var consisting of the logarithmic transformation of the variables in the varlist. r(LNVarCreated) contains the list of the variable generated

r(DimensionsFS) macro with the name of the dimension used in calculating the propensity score. It differs from r(Dimensions) only if the ln(varlist) option is used

Matrices

r(VarCov) the estimated variance-covariance matrix

Bibliography and Sources

Egger, Peter H., and Maximilian von Ehrlich. 2013. ‘Generalized Propensity Scores for Multiple Continuous Treatment Variables’. Economics Letters 119 (1): 32–34.