Fractional polynomial modelling (extended) [STB-21: sg26] ------------------------------------------ ^fpx^ yvar [nvar] xvar [^in^ range] [^if^ exp] [^weight^] [^,^ ^cm^d^(^regression_cmd^)^ ^cont^inuous^(^contvars^)^ ^ba^se^(^basevars^)^ ^po^wers^(^powlist^)^ ^add^powers^(^addlist^)^ ^fix^powers^(^fixlist^)^ ^df(^#^)^ ^ex^px^(^#|^sd)^ ^ori^gin^(^#^)^ ^na^me^(^newxvar^)^ ^dev^thr^(^#^)^ ^log^ ^zer^o regression_cmd_options ] Description ----------- ^fpx^ fits fractional polynomial (FP) models in xvar to yvar. The functionality of ^fpx^ considerably overlaps that of ^fp^, so you should see ^help fp^ before consulting this help file. As ^fpx^ runs, it displays line(s) of dots to indicate progress in searching the different FP models for the best fit. Description, continued ---------------------- ^fpx^ extends ^fp^ in two ways: 1. With ^fpx^, you can fit an FP model with an arbitrarily large number of degrees of freedom (^df()^), whereas ^fp^ is limited to ^df(4)^. This permits a much wider family of models to be explored. 2. ^fpx^ outputs the value of the Akaike Information Criterion (AIC) for each model it fits. Some statisticians recommend selecting as `best' the model which has the minimum AIC. The AIC is defined as -2 times the log likelihood plus 2 times the number of parameters estimated; thus, overfitting tends to be penalized. Each additional degree (m) of FP model fitted increases the df by 2 and therefore adds 4 to the AIC. The main omissions from ^fpx^ concern model comparisons: ^fpx^ does not fit quadratic, cubic or Box-Tidwell models, nor does it calculate P-values for comparing selected models. ^fpgraph^ (see ^help fpgraph^) is available after using ^fpx^ to plot the best-fitting model. Options ------- The following options of ^fp^ are unavailable in ^fpx^: ^fast^, ^gplot()^, ^saving()^, ^repeat^, ^powers(none)^. All the other options are identical to those of ^fp^ except for ^df()^: ^df(^#^)^ specifies the degrees of freedom of the highest-degree FP model to be fitted. The default is # = 4, which gives all models with degree m = 2. Odd values of # give models in which one power is always 1. Examples -------- . ^fpx mpg weight, base(length displ) df(5)^ . ^fpx mpg weight, log fixpowers(0)^ Saved Results ------------- ^fpx^ saves in the ^$S_^# macros as follows. ^S_1^ number of observations ^S_2^ deviance of base model ^S_23^ zeta (see ^origin()^ option and Examples in ^help fp^) ^$S_3^, ^$S_4^, etc. contain the deviances of the models with df=1, 2, ... . These are followed by the best powers for models with df=1, 2, ... . Also see -------- STB: sg26 (STB-21) On-line: ^help^ for ^fp^, ^fpgraph^, ^fpgen^, ^swfp^.