Stores results from a locally weighted regression (loess) with groups model fitted to data with groups (D.B. Baird).
||Type of residuals to form if parameter
||Save structure from the analysis of a loess with groups model by
||Residuals, as specified by the
||Leverages of the units|
||Estimates of parameters|
||Standard errors of the estimates|
||Variance-covariance matrix of the estimates|
||Correlation matrix of the estimates|
||Residual ss or deviance|
||Residual degrees of freedom|
||Saves the accumulated analysis-of-variance (or deviance) table as a pointer with a variate or text for each column (source, d.f. etc)|
RKLOESSGROUPS allows you save information from an analysis
RLOESSGROUPS, which fits a locally weighted regression (loess) analysis with groups. You do not need to declare the data structures to save the information in advance; Genstat will declare them automatically to be of the correct type and length.
LEVERAGES parameters save the standardized residuals, fitted values and leverages. The
RMETHOD option controls the type of residuals that are formed.
SE parameters save the parameter estimates and their standard errors.
RKLOESSGROUPS puts them into variates, in the same order as in the display produced by the
VCOVARIANCE parameter saves the variance-covariance matrix of the estimates. These are formed by multiplying the inverse matrix by the relevant variance estimate based on the estimated dispersion, or on the dispersion that you have supplied in the original
MODEL statement. The
CORRELATIONS parameter saves the correlations matrix of the estimates.
DEVIANCE parameter lets you save the residual sum of squares, or the deviancefor distributions other than Normal. The
DF parameter saves the residual degrees of freedom.
ACCUMULATED parameter saves the accumulated analysis-of-variance (or deviance) table. The accumulated table is saved as a pointer with a variate or text for each of its columns (source, d.f. etc). Note that the suffixes of
ACCUMULATED for the last 4 columns in the pointer depend on whether it is an analysis of variance (
'F pr.') or an analysis of deviance (
'approx F pr.').
CAPTION 'RKLOESSGROUPS example',\ 'Yield of sugar beet vs soil phosphate in 4 years'; STYLE=major,plain FACTOR [LEVELS=4; VALUES=16(1...4)] Year OPEN '%EXAMPLES%/GuidePart2/beet.dat'; CHANNEL=2 READ [PRINT=*; CHANNEL=2] Beetwt,%sugar,SoilP CLOSE 2 CALCULATE Sugar = Beetwt * %sugar / 100 MODEL Sugar RLOESSGROUPS SoilP; GROUP=Year; SMOOTH=2 RKLOESSGROUPS RESIDUALS=res; FITTEDVALUES=fit; LEVERAGE=lev; ESTIMATES=est; SE=se PRINT Year,Sugar,SoilP,res,fit,lev; DEC=0,5(*) PRINT est,se