{smcl}
{* *! version 0.1 26apr2019}{...}
{findalias asfradohelp}{...}
{vieweralsosee "" "--"}{...}
{vieweralsosee "[R] help" "help help"}{...}
{viewerjumpto "Syntax" "help_mono##syntax"}{...}
{viewerjumpto "Description" "help_mono##description"}{...}
{viewerjumpto "Options" "help_mono##options"}{...}
{viewerjumpto "Remarks" "help_mono##remarks"}{...}
{viewerjumpto "Results" "help_mono##results"}{...}
{title:Title}
{phang}
{bf:testpolymono} {hline 2} Norris test of polynomial monotonicity
{marker syntax}{...}
{title:Syntax}
{p 8 17 2}
{cmdab:testpolymono}
endog p
[if]
{cmd:,} [{it:Options}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt n(real)}}degree of polynomial. Default value of 3. {p_end}
{synopt:{opt group(varname)}}categorical variable defining demographic groups. This will almost always be used, unless the user wants to make a graph including only some demographic groups.{p_end}
{syntab:Regression specification}
{synopt:{opt cluster(varlist)}}cluster variables. Implemented using {cmdab:reghdfe}, and can accommodate two-way clustering. {p_end}
{synopt:{opt robust}}robust standard errors. {p_end}
{syntab:Output}
{synopt:{opt figname(string)}}Name for first stage graph of the endogenous variable over p. If this option is not triggered, no graph is created. {p_end}
{syntab:Misc}
{synopt:{opt resid(name)}}Save residuals from polynomial first stage. Rarely used. {p_end}
{synoptline}
{p2colreset}{...}
{marker description}{...}
{title:Description}
{pstd}
{cmd:testpolymono} conducts the test of polynomial monotonicity from {help testpolymono##N2018:Norris (2019)}.
{pstd}
The test asks whether the polynomial first stage is monotonically increasing for each
subgroup over the support of {opt p}, the generated examiner probability of treatment assignment.
In keeping with usual practise in estimating MTEs, the first stage is taken to be polynomial
of degree {opt n}. {cmd:testpolymono} renormalizes {opt p} within each demographic group
to have a range from 0 to 1. Users should ensure there is support over the entire distribution
of {opt p} within each demographic group.
{pstd}
When {opt n}=1, {cmd:testpolymono} tests the average monotonicity condition required for
linear IV to deliver a convex combination of treatment effects. When {opt n} is larger than
1, it tests increasingly more stringent monotonicity conditions needed for estimating the MTE.{p_end}
{marker examples}{...}
{title:Examples}
{phang}{cmd:. net from https://sites.google.com/site/samnorrisecon/testpolymono}{p_end}
{phang}{cmd:. net install testpolymono}{p_end}
{phang}{cmd:. net get testpolymono}{p_end}
{phang}{cmd:. set matsize 10000}{p_end}
{phang}{cmd:. use sample_judges, clear}{p_end}
{phang}{cmd:. egen demo = group(male black)}{p_end}
{phang}{cmd:. bys j_num: egen p = mean(incar_dum)}{p_end}
{phang}{cmd:. testpolymono incar_dum p, group(demo) n(4) }{p_end}
{phang}{cmd:. label def demo 1 "White females" 2 "Black females" 3 "White males" 4 "Black males" }{p_end}
{phang}{cmd:. label val demo demo }{p_end}
{phang}{cmd:. testpolymono incar_dum p, group(demo) n(4) figname("~/Desktop/Junk/figpoly.eps")}{p_end}
{marker results}{...}
{title:Stored results}
{pstd}
{cmd:testpolymono} stores the output from the regression of the endogenous variable on the
{opt p}-demographic group interactions in {cmd:e()}. It also returns the p-value for the
joint test of monotonicity in {cmd:r(p)}.{p_end}
{marker references}{...}
{title:References}
{marker N2018}{...}
{phang}
Norris, Samuel. 2019. {it:Examiner Errors: Evidence from Refugee Appeals}.{p_end}