Thanks to Prof Baum, a new program is available from SSC. "lbsvmat".
This program works like the official svmat, its main difference, however, is that the newly created variables can be renamed or labeled using the matrix colname and coleq information.
You may find it useful for making graphs like plots across quantile (all its many flavors) regressions.
Example:
Code:
** requires mmqreg and rif from SSC clear all webuse dui, clear forvalues i=2.5(2.5)97.5 { qui:qreg citations i.taxes fines i.csize i.college , q(`i') matrix bq=nullmat(bq)\e(b) qui:mmqreg citations i.taxes fines i.csize i.college , q(`i') matrix bmq=nullmat(bmq)\e(b) qui:uqreg citations i.taxes fines i.csize i.college , q(`i') method(regress) matrix buq=nullmat(buq)\e(b) } matrix bmq=bmq[....,"qtile:"] lbsvmat bq, matname name(bq) lbsvmat bmq, matname name(bmq) lbsvmat buq, matname name(buq) gen qt=2.5+(_n-1)*2.5 if 2.5+(_n-1)*2.5<=98 scatter bq_1_taxes bmq_qtile_1_taxes buq_1_taxes qt, connect(l l l ) legend(order(1 "qreg" 2 "mmqreg" 3 "uqreg"))
0 Response to new to SSC lbsvmat
Post a Comment