.- help for ^fpgen^ (STB-21: sg26, STB-22: sg26.1, STB-25: sg26.3) .- Generate fractional powers -------------------------- ^fpgen^ xvar [^if^ exp] [^in^ range]^, po^wers^(^plist^)^ [^na^me^(^pname^) i^ndex^(^#^)^ ^ex^px^(^#|^sd)^ ^ori^gin^(^#^)^ ^replace^] Description ----------- ^fpgen^ creates powers of xvar according to the values in plist. The numbers in plist should be separated by spaces or commas. The results are placed in new variables called xvar_1, xvar_2, xvar_3, .... The new variables are labelled according to their associated powers. Positive or negative integer powers of xvar are defined in the usual way. A power of zero is interpreted as log, so "xvar^^0 = ln(xvar)". If xvar has any negative or zero values, ^fpgen^ subtracts the minimum of xvar from xvar and then adds the rounding (or counting) interval. This interval is determined as the minimum difference between the ordered values of xvar. After transformation, xvar has a positive minimum value, so fractional polynomial models can be used. The amount by which xvar has been shifted is displayed. Options ------- ^name()^ labels the new variables pname_1, pname_2, ... , pname10, etc. If pname is longer than 6 characters, it is truncated to 6 characters. ^index(^#^)^ changes the suffices for the new variable names. Example: # = 20 results in new variables called xvar20, xvar21, etc. ^expx(^#|^sd)^ transforms xvar to exp(# * xvar) or to exp(-xvar / sd(xvar)), where sd(xvar) is the standard deviation of xvar. This option is useful for fractional polynomial modelling when yvar is expected to level off at high or at low values of xvar. Also, if xvar has negative values, the transformation ensures positive xvar. Use of ^expx(sd)^ has proved quite successful when no clear value of # suggests itself (i.e. usually). ^expx()^ is applied before origin transformation (see ^origin()^). ^origin(^#^)^ causes ^fpgen^ to transform xvar so that its maximum is 1 and its minimum is #. Specifically, the transformation is defined as follows: zeta = (xmin - # * xmax) / (1 - #) replace xvar with (xvar - zeta) / (xmax - zeta), where xmin and xmax are the minimum and maximum respectively of xvar. This transformation is useful if xvar contains negative and/or zero values, or if its range is too narrow for effective fractional polynomial modeling. # must be between 0 and 1 exclusive. ^replace^ replaces xvar_1, xvar_2, ... if they already exist. Examples -------- . ^fpgen x, powers(0,0)^ . ^fpgen x, powers(0 1 2), name(newx) index(10) replace^ Also see -------- STB: STB-21: sg26, STB-22: sg26.1, STB-25: sg26.3 On-line: help for @fp@.