[CLASSO] classocoef —— Plot the coefficients after classifylasso.

Syntax

classocoef [indepvars] [, options]

indepvars must be independent variables used by classifylasso; if omitted, then all indepvars are input. One graph is generated for each input variable.

global_twoway_options control the overall style; applies to all graphs

groupcoef_line_options control the Lasso estimation coefficient line

groupci_line_options control the confidence interval line

tscoef_scatter_options control the scatters of time series estimates

zero_line_options control the horizontal zero line

global_twoway_options Description

colors(string) color list of each group; the default is "maroon dkorange sand forest_green navy"

title(tinfo) overall title; the default is "Coefficient Plot of varname"

subtitle(tinfo) subtitle of title; the default is "Number of Individuals: N; Number of Groups: group"

legend([contents] [location]) standard legend, contents and location; the default is off, and should not be modified

ytitle(axis_title) specify y-axis title; the defalut is "Coefficient of varname"

xtitle(axis_title) specify x-axis title; the defalut is "Individual ID"

ylabel(rule_or_values) major ticks plus labels; the default is ",nogrid"

xlabel(rule_or_values) major ticks plus labels; the default is "1(step)N", where step = ceil(N/20)

name(name_option) specify name; applies to all graphs; the default is "coefficient_varname"

saving(saving_option) save graph to disk; applies to all graphs; the default is not to save if not specified

export(name [, options]) export graph to disk; applies to all graphs; the default is not to export if not specified

scheme(schemename) specify the overall look of the graph; the default is controled by set scheme

twoptions(twoway_options) additional option for the graph

nowindow suppress the graph window

groupcoef_line_options Description

nocoefplot suppress the group estimation coefficients line

coeflwidth(linewidthstyle) width of group estimation coefficient line; the default is 1

coeflpattern(linepatternstyle) pattern of group estimation coefficient line; the default is solid

coefoptions(line_options) additional option for the group estimation coefficient line

groupci_line_options Description

nociplot suppress the confidence interval line

level(#) specify the confidence level, as a percentage, for confidence intervals;
the default is controled by set level

cilwidth(linewidthstyle) width of the confidence interval lines; the default is 0.5

cilpattern(linepatternstyle) pattern of the confidence interval lines; the default is dash

cioptions(line_options) additional option for the confidence interval lines

tscoef_scatter_options Description

notsscatter suppress the scatters of time series estimates

tsmsize(markersize) size of time series estimation coefficients scatters; default is 0.5

tsoptions(scatter_options) additional option for the time series estimaion scatters

zero_line_options Description

nozeroline suppress the zero line

zerolwidth(linewidthstyle) width of the horizontal zero line; default is 0.5

zerolpattern(linepatternstyle) pattern of the horizontal zero line; the default is solid

zerolcolor(colorstyle) color of the horizontal zero line; the default is solid

zerooptions(line_options) additional option for the horizontal zero line

Description

classocoef utilizes graph twoway to visualize the estimated coefficients.
Each independent variables corresponds to one graph.
For each graph, the y-axis and x-axis respectively indicates the value of coefficient and the individual id.
In the graph, there are four major elements:

1. Lasso group coefficient line: The C-Lasso or post-Lasso estimates of each individual. Note that the individuals on the x-axis are clusterd by groups, so within each group, the coefficient forms a line.

2. Confidence interval line: The confidence interval of the C-Lasso or post-Lasso estimates of each individual.

3. Scatters of time series estimates: for each individual, the time series estimation results are obtained. The coefficients are visualized as scatters.

4. Horizontal zero line: for direct visualization of significance.

Options

global_twoway_options specify how the overall style looks like, such as titles, axis labels, colors of each group, etc.
See [G-3] twoway_options for detailed description.
Note that the options apply to all graphs.

title(), subtitle(), legend(), ytitle(), xtitle(), ylabel(), and xlabel() are the same two-way options
as in [G-3] title_options, [G-3] legend_options and [G-3] axis_options.

name() saving(), export(), and scheme() specify the graph name, the save path, the export name, or overall look,
as [G-3] name_option, [G-3] saving_option, [G-2] graph export, [G-4] Schemes intro.
Note that if there are more than one graph to be generated, modifying these options may cause error.

twoptions() specifies additional [G-3] twoway_options other than above if needed. To modify the above nine options, please do not use twoptions(). Use it only when the above is not enough.

colors() specifies the color list of each group.
The color of all elements except the zero line is controled by this option.
Each color should follow [G-4] colorstyle, and different colors are separated by space.
Suppose you input M colors,
let Color(M,k) = k(mod)M if k(mod)M > 0 and = M otherwise,
then the k^th group is visualized by the Color(M,k)^th color.

nowindow suppresses the graph window.

groupcoef_line_options specify the style of the Lasso group estimation coefficient line.
See [G-2] graph twoway line for detailed description.

nocoefplot suppresses the group estimation coefficient line.

coeflwidth() and coeflpattern() specify the line style as in [G-3] connect_options.

coefoptions() specifies additional options in [G-2] graph twoway line for the group coefficient line other than above if needed. Note that to modify the above two options or the line color, please do not use coefoptions().

groupci_line_options specify the style of the confidence interval line.
See [G-2] graph twoway line for detailed description.

nociplot suppresses the confidence interval line.

level() specifies the confidence level, as a percentage, for confidence intervals.
The default is controled by set level; see [R] Estimation options.

cilwidth() and cilpattern specify the line style as in [G-3] connect_options.

cioptions() specifies additional options in [G-2] graph twoway line for the confidence interval line other than above if needed. Note that to modify the above two options or the line color, please do not use cioptions().

tscoef_scatter_options specify the style of the scatters of time series estimates.
See [G-2] graph twoway scatter for detailed description.

notsscatter suppresses the scatters of time series estimates.

tsmsize() specifies the scatter size as in [G-3] marker_options.

tsoptions() specifies additional options in [G-2] graph twoway scatter for the scatters of time series estimates other than above if needed. Note that to modify the above option, please do not use tsoptions().

zero_line_options specify the style of the horizontal zero line.
See [G-2] graph twoway line for detailed description.

nozeroline suppresses the horizontal zero line.

zerolwidth(), zerolpattern(), and zerolcolor() specify the line style as in [G-3] connect_options.

zerooptions() specifies additional options in [G-2] graph twoway line for the horizontal zero line other than above if needed. Note that to modify the above three options, please do not use zerooptions().