help fracpoly postestimation dialogs: fracplot fracpred
also see: fracpoly
-------------------------------------------------------------------------------
Title
[R] fracpoly postestimation -- Postestimation tools for fracpoly
Description
The following postestimation commands are of special interest after
fracpoly:
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 AIC, BIC, VCE, and estimation sample summary
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
margins marginal means, predictive margins, marginal effects, and
average marginal effects
nlcom point estimates, standard errors, testing, and inference for
nonlinear combinations of coefficients
predict predictions, residuals, influence statistics, and other
diagnostic measures
predictnl point estimates, standard errors, testing, and inference for
generalized predictions
test Wald tests of simple and composite linear hypotheses
testnl Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------
Special-interest postestimation commands
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.
Syntax for predict
The behavior of predict following fracpoly is determined by
regression_cmd. See the corresponding regression_cmd postestimation
entry for available predict options.
Also see information on fracpred below.
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] 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 fracpoly with clogit and mlogit. fracpred,
dresid is not allowed after fracpoly with clogit or mlogit.
Menu
fracplot
Statistics > Linear models and related > Fractional polynomials >
Fractional polynomial regression plot
fracpred
Statistics > Linear models and related > Fractional polynomials >
Fractional polynomial prediction
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]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+-------------+
----+ Fitted line +------------------------------------------------------
lineopts(cline_options) affect the rendition of the fitted line; see [G]
cline_options.
+---------+
----+ CI plot +----------------------------------------------------------
ciopts(area_options) affect the rendition of the confidence bands; see
[G] area_options.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add other plots to the generated graph.
See [G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Options for fracpred
for(varname) specifies (partial) prediction for variable varname. The
fitted values are adjusted to the value specified by the adjust()
option in fracpoly.
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 adjust().
Examples
Setup
. sysuse auto
. fracpoly: logit foreign mpg displ weight, compare degree(1)
Plot fitted values against mpg
. fracplot
Setup
. fracpoly: regress mpg weight -2 displ -1
Predict fitted index for weight
. fracpred wfit, for(weight)
Predict fitted index for displ
. fracpred dfit, for(displ)
Predict deviance residuals
. fracpred dr, dresid
Also see
Manual: [R] fracpoly postestimation
Help: [R] fracpoly