{smcl} {* *! version 1.0.1 08aug2019}{...} {hline} {title:Title} {p2colset 5 30 30 2} {p2col:{hi:qmodel postestimation} {hline 1}}Postestimation tools for {cmd:qmodel}{p_end} {p2colreset}{...} {marker description}{...} {title:Postestimation commands} {pstd} The following postestimation commands can be used after {helpb qmodel}. {synoptset 16}{...} {p2coldent :Command}Description{p_end} {synoptline} {synopt :{helpb qmodel postestimation##predict:predict}}predicts specified functions of the parameters{p_end} {synopt :{helpb qmodel postestimation##qmodel_plot:qmodel_plot}}plots specified functions of the paramters{p_end} {synopt :{helpb qmodel postestimation##qmodel_quantile:qmodel_quantile}}estimates specific quantiles and their standard errors{p_end} {synoptline} {p2colreset}{...} {marker predict} {title:Syntax for predict} {p 8 17 2} {cmd:predict} {help newvarlist} , {cmd:proportion(}{it:varname}{cmd:)} [ {cmd:se} ] {p_end} {synoptset 20}{...} {marker predict_options}{...} {synopthdr:predict_options} {synoptline} {synopt:{opt proportion(varname)}}name of an existing variable containing proportions; this must be specified{p_end} {synopt:{opt se}}standard error of the prediction{p_end} {synoptline} {title:Description for predict} {pstd} The {cmd:predict} command predicts specified functions of parameters at the proportions stored in the existing variable specified in {cmd:proportion(}{it:varname}{cmd:)}. The functions of parameters to be predicted are specified in {it:quantile_function} of {cmd:qmodel} using the special symbols {cmd:_(} and {cmd:)_} or, equivalently, {cmd:_[} and {cmd:]_}. Standard errors of the predicted quantiles can be obtained with the {opt se} option.{p_end} {marker qmodel_plot} {title:Syntax for qmodel_plot} {p 8 17 2} {cmd:qmodel_plot} [{cmd:,} {it:{help qmodel_postestimation##plot_options:plot_options}}] {p_end} {synoptset 25}{...} {marker plot_options}{...} {synopthdr:plot_options} {synoptline} {synopt:{opt ci}}shows confidence intervals of the quantiles{p_end} {synopt:{opt replace}}replaces previous graph{p_end} {synopt:{opt addplot(string)}}add other plots to the generated graph{p_end} {synopt:{it:{help twoway_options}}}specifies standard options of twoway graphs{p_end} {synoptline} {title:Description for qmodel_plot} {pstd} The {cmd:qmodel_plot} command plots specified functions of the parameters against the proportion. The functions of parameters to be predicted are specified in {it:quantile_function} of {cmd:qmodel} using the special symbols {cmd:_(} and {cmd:)_} or, equivalently, {cmd:_[} and {cmd:]_}.{p_end} {marker qmodel_quantile} {title:Syntax for qmodel_quantile} {p 8 17 2} {cmd:qmodel_quantile} {it:{help numlist}} [{cmd:,} {it:{help qmodel_postestimation##quantile_options:quantile_options}}] {p_end} {p2colreset}{...} {synoptset 25}{...} {marker quantile_options}{...} {synopthdr:quantile_options} {synoptline} {synopt:{cmd:at(}{it:varname} {cmd:=} {it:#} [...]{cmd:)}}specifies the values of the covariates at which the quantiles are to be estimated{p_end} {synopt:{it:{help nlcom:nlcom_options}}}specifies standard {cmd:nlcom} options{p_end} {synoptline} {p2colreset}{...} {title:Description for qmodel_quantile} {pstd} The {cmd:qmodel_quantile} command computes point estimates, standard errors, test statistics, significance levels, and confidence intervals for the quantile of {it:exp_varname} in {cmd:qmodel} at the proportions specified in {it:{help numlist}}. The default is the median. {title:Examples} {phang2}{stata "clear"}{p_end} {phang2}{stata "set obs 1000"}{p_end} {phang2}{stata "gen y = rnormal()"}{p_end} {phang2}{stata "qmodel y = _normal"}{p_end} {phang2}{stata "qmodel_plot"}{p_end} {phang2}{stata "range proportion .01 .99 99"}{p_end} {phang2}{stata "predict quantile, p(proportion)"}{p_end} {phang2}{stata "hist y, fc(gs10) lc(gs16) freq name(a, replace)"}{p_end} {phang2}{stata `"twoway function invnormal(x) || line quantile p, lc(red) xtitle("p") name(b, replace)"'}{p_end} {phang2}{stata "gr combine a b"}{p_end} {phang2}{stata "qmodel_quantile .5(.1).7"}{p_end} {pstd}Predict quantiles{p_end} {phang2}{stata "clear all"}{p_end} {phang2}{stata "set obs 1000"}{p_end} {phang2}{stata "generate x1 = rbinomial(1,.5)"}{p_end} {phang2}{stata "generate x2 = rnormal()"}{p_end} {phang2}{stata "generate p = runiform()"}{p_end} {phang2}{stata "generate y = 10 + exp(.5)*invnormal(p) + log(p)*x1 + (1-p)*x2"}{p_end} {phang2}{stata "qmodel y = _(_normal)_ + _(_log)_*x1 + _(_linear)_*x2"}{p_end} {phang2}{stata "qmodel_plot, ci"}{p_end} {phang2}{stata "range proportion .01 .99 99"}{p_end} {phang2}{stata "predict base beta_x1 beta_x2, p(proportion)"}{p_end} {phang2}{stata "qmodel_quantile .9, at(x1=0 x2=1.5) noheader"}{p_end} {title:Authors} {pstd}Matteo Bottai{p_end} {pstd}Unit of Biostatistics{p_end} {pstd}Institute of Environmental Medicine, Karolinska Institutet{p_end} {pstd}Stockholm, Sweden{p_end} {pstd}matteo.bottai@ki.se{p_end} {pstd}Nicola Orsini{p_end} {pstd}Biostatistics Team{p_end} {pstd}Department of Public Health Sciences, Karolinska Institutet{p_end} {pstd}Stockholm, Sweden{p_end} {pstd}nicola.orsini@ki.se{p_end}