Stata 15 help for fracplot

[R] mfp postestimation -- Postestimation tools for mfp

Postestimation commands

The following postestimation commands are of special interest after mfp:

Command Description ------------------------------------------------------------------------- fracplot plot data and fit from most recently fit fractional polynomial model fracpred create variable containing prediction, deviance residuals, or SEs of fitted values -------------------------------------------------------------------------

The following standard postestimation commands are also available if available after regression_cmd:

Command Description ------------------------------------------------------------------------- estat ic Akaike's and Schwarz's Bayesian information criteria (AIC and BIC) estat summarize summary statistics for the estimation sample estat vce variance-covariance matrix of the estimators (VCE) estimates cataloging estimation results lincom point estimates, standard errors, testing, and inference for linear combinations of coefficients linktest link test for model specification lrtest likelihood-ratio test nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of coefficients test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses -------------------------------------------------------------------------

Syntax for fracplot and fracpred

Plot data and fit from most recently fit fractional polynomial model

fracplot [varname] [if] [in] [, fracplot_options]

Create variable containing the prediction, deviance residuals, or SEs of fitted values

fracpred newvar [, fracpred_options]

fracplot_options Description ------------------------------------------------------------------------- Plot marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Fitted line lineopts(cline_options) affect rendition of the fitted line

CI plot ciopts(area_options) affect rendition of the confidence bands

Add plots addplot(plot) add other plots to the generated graph

Y axis, X axis, Titles, Legend, Overall twoway_options any options other than by() documented in [G-3] twoway_options -------------------------------------------------------------------------

fracpred_options Description ------------------------------------------------------------------------- for(varname) compute prediction for varname dresid compute deviance residuals stdp compute standard errors of the fitted values varname -------------------------------------------------------------------------

fracplot is not allowed after mfp with clogit, mlogit, or stcrreg. fracpred, dresid is not allowed after mfp with clogit, mlogit, or stcrreg.

Menu for fracplot and fracpred

fracplot

Statistics > Linear models and related > Fractional polynomials > Multivariable fractional polynomial plot

fracpred

Statistics > Linear models and related > Fractional polynomials > Multivariable fractional polynomial prediction

Description for fracplot and fracpred

fracplot plots the data and fit, with 95% confidence limits, from the most recently fit fractional polynomial model. The data and fit are plotted against varname, which may be xvar1 or another of the covariates (xvar2, ..., or a variable from xvarlist). If varname is not specified, xvar1 is assumed.

fracpred creates newvar containing the fitted index or deviance residuals for the whole model, or the fitted index or its standard error for varname, which may be xvar1 or another covariate.

Options for fracplot

+------+ ----+ Plot +-------------------------------------------------------------

marker_options affect the rendition of markers drawn at the plotted points, including their shape, size, color, and outline; see [G-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+-------------+ ----+ Fitted line +------------------------------------------------------

lineopts(cline_options) affect the rendition of the fitted line; see [G-3] cline_options.

+---------+ ----+ CI plot +----------------------------------------------------------

ciopts(area_options) affect the rendition of the confidence bands; see [G-3] area_options.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add other plots to the generated graph. See [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

Options for fracpred

for(varname) specifies (partial) prediction for variable varname. The fitted values are adjusted to the value specified by the center() option in mfp.

dresid specifies that deviance residuals be calculated.

stdp specifies calculation of the standard errors of the fitted values varname, adjusted for all the other predictors at the values specified by center().

Examples

Setup . sysuse auto . mfp: regress mpg weight displacement foreign

Plot data and fit against displacement . fracplot displacement

Create new variable dfit containing partial prediction for displacement . fracpred dfit, for(displacement)


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index