*!version 2.0 31/1/2024
help rctable

Title

rctable -- tables for Randomized Controlled Trials

Syntax

rctable
depvar
[if]
[weight]
, options

Main
treatment(treatvar) specify the treatment variable to be used. Multiple branches are possible. In that case, a dummy variable for each treatment branch should be included i.e. each dummy should take value 1 if treatment and 0 otherwise. Do not include a dummy for the control group. Factor variables cannot be used. Hterogeneous analysis is possible if you include the interaction terms in the treatment options (as if they were additional treatment branches)

estimator(esttype) either ITT or LATE (default is ITT)

treated(varname) for LATE estimate, specify the "treated" variable

{ opth clust:er(varname)} specify the clustering variable if any

{ opt pval} display pvalues in square parenthesis under the standard error

{ opth control(varlist)} specify the variables used for baseline covariate adjustment. These variables are used for every single outcome variables. You may use factor variable (fixed effects) but only if in numeric format. For control variables specific to each outcome see basecontrol option.

{ opth basecontrol(varlist)} specify a specific variable use for each outcome variable. The number of outcome variables should be equal to the number of basecontrol variables.

{ opt keep } instead of dropping the columns after running, the program keeps them in the dataset.

{ opt sd } display the standard deviations of the average and of the control group below in square parenthesis.

{ opt quiet } do not show the regression outcomes.

{ opt sheet(string asis[, replace|modify])} replace a worksheet in an already existing excel document. Sub-options replace or modify are necessary if the worksheet already exists (see export excel command)

{ opt qval(name)} display the qvalues in square parenthesis underneath the standard error. You cannot specifify pvalue and qvalue. The qvalues are computed using the qqvalue command and the fdr sharpened qvalue strategy by Anderson(2008).
Varname specifies the multiple-test procedure method to be used for calculating the q-values from the input P-values. The method is one of bonferroni | sidak | holm | holland | hochberg | simes | yekutieli | bky. These method names specify that the q-values will be calculated from the input P-values by inverting the multiple-test procedure specified by the method() option of the same name for the multproc option of the smileplot package.
bky method does not rely on qqvalue command but corresponds to the sharpened qvalue developped by Benjamini etal. (2006) and described in Anderson(2008). Command qqvalue is automatically installed from SSC when option qvalue is specified.

if is allowed.

fweight, aweight, pweights are allowed; see weight.

Description

rctable creates regressions and tables (with the subcommand using) for experimental studies. rctable is particularly well adadpted to Randomized Controlled Trial or any analysis comparing different (experimental) groups. rctable creates several variables: VAR (the variable name) LAB (its label) A (the average in both groups) C (the average in the control group), and COEF1 [COEF2...], which record the differences between a treatment branch and the control group. With the using option, rctable exports the table in an excel, csv or text format. The variables created are then
dropped, unless the keep option is specify. rctable can also be used without using. The command accepts multiple treatment branches and can also be used to create tables with interaction terms. For multiple treatment branches, include one dummy per treatment branch but do not include a control dummy.

The csv, excel or text document created with the using subcommand can be used either directly or be linked to another master excel document. This way, the master document can be formatted and edited
independantly while the excel documents generated by the command are updated. rctable table can also be used with listtex to create Latex tables.

rctable now accept a qvalue option to account for multi-hypothesis testing. The pvalue used for the multi-hypothesis testing originates from the varlist regressions. qvalue accepts many different methods (see qvalue option).

Examples

Perform a simple ITT regression on several dependant varibles :

. rctable unemployment_rate health_score cognitive_score noncognitive_score, treat(treat_variable)

Save the results in a xlsx document :

. rctable unemployment_rate health_score cognitive_score noncognitive_score using "myxlsx.xlsx" , treat(treat_variable) control(i.country)

Perform a simple LATE regression on several dependant varibles :

. rctable unemployment_rate health_score cognitive_score noncognitive_score, treat(treat_variable) estimator(LATE) treated(treated_variable)

Edit a simple Latex table using listtex and the keep option :

. rctable unemployment_rate health_score cognitive_score noncognitive_score, treat(treat_variable) estimator(ITT) treated(treated_variable) keep save(C:\mytable.txt)

#delimit ;
listtex LAB N_ind N_clust A C COEF if COEF!="" | LAB!="" using "C:\mytable.txt", replace rstyle(tabular)
head(" \begin[htbp] \centering \begin[b] \medskip
\begin{10cm},
Journal of the American Statistical Association, volume 103, number 484, pages 1481-1495.

Author

Adrien Bouguen, Santa Clara University