Adds extra terms to a linear, generalized linear, generalized additive or nonlinear model.
|What to print (
||How to treat nonlinear parameters between groups (
||How to treat the constant (
||Limit for expansion of model terms; default
||Whether to pool ss in accumulated summary between all terms fitted in a linear model (
||Whether to base ratios in accumulated summary on rms from model with smallest residual ss or smallest residual ms (
||Which warning messages to suppress (
||Printing of probabilities for variance and deviance ratios (
||Printing of probabilities for t-statistics (
||Statistics to be displayed in the summary of analysis produced by
||Probability level for confidence intervals for parameter estimates; default 0.95|
||Description for line in accumulated analysis of variance (or deviance) table when
|formula||List of explanatory variates and factors, or model formula|
ADD adds terms to the current regression model, which may be linear, generalized linear, generalized additive, standard curve or nonlinear. It is best to give a
TERMS statement before investigating sequences of models using
ADD, in order to define a common set of units for the models that are to be explored. If no model has been fitted since the
TERMS statement, the current model is taken to be the null model.
The model fitted by
ADD will include a constant term if the previous model included one, and will not include one if the previous model did not. You can, however, change this using the
The options of
ADD are almost all the same as those of the
FIT directive, and are described there. There is also an extra option
NONLINEAR. This is relevant when fitting curves. For example, if we have a variate
Dilution and a factor
Solution, the program below will fit parallel curves for the different solutions.
TERMS Dilution * Solution
FITCURVE [PRINT=model,estimates; CURVE=logistic]\
Dilution + Solution
If we then put
the curves are still constrained to have common nonlinear parameters, but all linear parameters are estimated separately for each group. Alternatively, if we put
ADD [NONLINEAR=separate] Dilution.Solution
different nonlinear parameters will be estimated for each solution too; so only the information about variability is pooled.
TERMS statement was given before fitting the model, any restrictions on the variates or factors in the model will have been implemented then. So any restrictions on vectors involved in the model specified by
ADD will be ignored. If no
TERMS statement has been given and
ADD introduces new terms into the model, restrictions on the variates or factors in these terms will be taken into account and may cause the units involved in the regression to be redefined.
Commands for: Regression analysis.
" Example FIT-2: Multiple linear regression Relate the monthly water usage (thousand gallons) of a production plant to four variables: 1. Average monthly temperature (degrees F) 2. Amount of production (billion pounds) 3. Number of plant operating days in the month 4. Number of people employed (Data from Draper and Smith, Regression Analysis (1981) p353.)" " The data from 17 months are in a file called 'FIT-2.DAT' and names for the data columns are on the first line" FILEREAD [NAME='%gendir%/examples/FIT-2.DAT'; IMETHOD=read] FGROUP=no " Specify that the amount of water used is to be the response variable, and print the correlation matrix of all the variables. The TERMS directive also allows use of the directives ADD, DROP and so on, to compare alternative sets of explanatory variables." MODEL Water TERMS [PRINT=correlations] Temp,Product,Opdays,Employ " Fit a linear regression of water usage on amount of production, since this variable is most highly correlated with water usage (0.631)." FIT Product " Water use increases by 80 gallons (s.e. 25) for each extra billion pounds of production - ignoring the effect of other variables." " Regress water usage on all the explanatory variables, to take account of the smaller effects." ADD Temp,Opdays,Employ " All the variables have a significant effect on water usage (all the t statistics are large). The effect of increasing production by a billion pounds while keeping the other variables constant is to increase water usage by 212 gallons (s.e. 46)." " The first month is particularly influential. Display all the fitted values, residuals and leverages (influence). " RDISPLAY [PRINT=fitted] " Display the relationship between water usage and production, adjusting for the other effects" RGRAPH [GRAPHICS=high] Product " Plot the residuals against the fitted values to see if there is any indication of non-constant variance" RCHECK [GRAPHICS=high] residual; fitted