Performs multivariate linear regression with accumulated tests; synonym
FITMULTIVARIATE (H. van der Voet).
|Controls printed output (
||Controls printed output from the univariate regression analyses (
||Limit for expansion of model terms; default 3|
||Which warning messages to suppress when fitting the complete model – messages are always suppressed when fitting models for individual tests (
||To save results from accumulated and summary tests in a pointer containing terms, degrees of freedom of terms, Wilks’ Lambda, Rao’s F-statistic, degrees of freedom for numerator and denominator of Rao’s F and P-value of Rao’s F|
||List of explanatory variates and factors, or model formula|
RMULTIVARIATE calculates hierarchical tests for all terms in a multivariate linear regression model. These tests are based on Wilks’ Lambda. The use of
RMULTIVARIATE must be preceded by a
MODEL statement to define the response variables and, if required, a vector of weights and an offset. Generalized linear models are not allowed. Note that the
FIT directive performs a regression analysis for each of the response variables in turn, whereas
RMULTIVARIATE performs multivariate modelling and testing.
TERMS parameter specifies the model terms to be assessed. The
FACTORIAL option sets a limit on the number of factors and variates in each term, similarly to the
FACTORIAL option of
FIT; by default this is 3. Printed output from the multivariate analysis is controlled by the
model gives a description of the model,
summary prints test results for the full model, while
accumulated gives accumulated test results for each term in the model formula. The
RPRINT option controls output from univariate regressions of the individual variates, which are performed (by
FIT) in order to calculate the multivariate analysis. The
NOMESSAGE option can be used to suppress aliasing and marginality warning messages when fitting the full model.
RESULTS option can be used to save both accumulated and summary test results in a pointer. This pointer contains a text structure saving the individual model terms and six variates saving the number of degrees of freedom associated with each term, Wilks’ Lambda, Rao’s F-statistic, degrees of freedom for numerator and denominator of Rao’s F-statistic and the calculated P-value. Directives
RKEEP can be used subsequent to
RMULTIVARIATE, to display further output and store results from the univariate regressions of each response variate.
Units with one or more missing values in any term are excluded from the analysis. This implies that successive calls of
RMULTIVARIATE may give different test results if terms with missing values are dropped or added.
The implementation is straightforward using Genstat regression and the
FSSPM directive. Terms in the multivariate linear model are tested by Rao’s F-approximation for Wilks’ Lambda (Rao 1973).
Any restriction applied to vectors used in the regression model will apply also to the results from
Rao, C.R. (1973). Linear Statistical Inference and its Applications. Wiley, New York.
CAPTION 'RMULTIVARIATE example',\ !t('Tumour growth data from C. Chatfield & A.J. Collins (1986),',\ 'Introduction to Multivariate Analysis (revised edition),',\ 'pages 143 and 176.'); STYLE=meta,plain FACTOR [NVALUES=18; LEVELS=!(4,20,34)] temp FACTOR [NVALUES=18; LABELS=!T(Male,Female)] sex GENERATE temp,sex,3 VARIATE [NVALUES=18] initweight,finalweight,tumourweight READ initweight,finalweight,tumourweight 18.15 16.51 0.24 18.68 19.5 0.32 19.54 19.84 0.20 19.15 19.49 0.16 18.35 19.81 0.17 20.68 19.44 0.22 21.27 23.30 0.33 19.57 22.30 0.45 20.15 18.95 0.35 18.87 22.00 0.25 20.66 21.08 0.20 21.56 20.34 0.20 20.74 16.69 0.31 20.02 19.26 0.41 17.20 15.90 0.28 20.22 19.00 0.18 18.38 17.92 0.30 20.85 19.90 0.17 : MODEL finalweight,tumourweight RMULTIVARIATE [RPRINT=accumulated] initweight + temp * sex