Saves results from an unbalanced analysis of variance, by AUNBALANCED
, in R data frames (R.W. Payne & Z. Zhang).
Options
TERM = formula |
Treatment term whose means, effects etc. are to be saved; must be set if any of these are to be saved, unless there is only one treatment term |
---|---|
COMBINATIONS = string token |
Factor combinations for which to form predicted means (present , estimable ); default esti |
ADJUSTMENT = string token |
Type of adjustment to be made when predicting means (marginal , equal , observed ); default marg |
LSDLEVEL = scalar |
Significance level (%) for least significant differences and multiple comparisons; default 5 |
RMETHOD = string token |
Type of residuals to form (simple , standardized ); default simp |
MCOMPARISON = string token |
Method to use to make multiple comparisons between the means (flsd , fstudentizedlsd , bonferroni , sidak ); default * i.e. none |
SAVE = identifier |
Save structure (from AUNBALANCED ) containing details of the analysis for which further output is required; if omitted, output is from the most recent use of AUNBALANCED |
Parameters
INFORMATION = string tokens |
What to save (aovtable , effects , means , semeans , esemeans , sedmeans , lsdmeans , replications , fittedvalues ); must be set |
---|---|
OUTFILENAME = texts |
Name of the R (.rda ) file to create for each set of information; must be set |
COLUMNNAMES = texts |
Specifies names for the columns in the file; if this is not set, suitable names are chosen automatically |
EXIT = scalars |
Records the exit status, 0 if the information was saved successfully, 1 otherwise |
Description
AU2RDA
puts results from an analysis by AUNBALANCED
into R data frames. By default the results are from the most recent AUNBALANCED
analysis, but you can use the SAVE
option to specify the save structure from some other analysis.
The INFORMATION
parameter specifies the information to save, with settings:
aovtable |
analysis of variance table; |
---|---|
effects |
table of treatment effects; |
means |
table of predicted means; |
semeans |
table of standard errors of means; |
esemeans |
table of effective standard errors of means; |
sedmeans |
symmetric matrix of standard errors of differences of means; |
lsdmeans |
symmetric matrix of least significant differences of means; |
replications |
replication table; |
fittedvalues |
y-variate, fitted values and residuals. |
The OUTFILENAME
parameter specifies the name of the file to save the information. If this does not have a .rda
extension, one will be appended to the name automatically.
The COLUMNNAMES
parameter allows you to specify a text containing names to use for the columns in the file. Thus may be useful if you want to avoid name clashes when you are saving several sets of output.
The EXIT
parameter can save a scalar to record the exit status for each set of information. This contains zero if the information was saved successfully, and one otherwise. (For example, it will not be possible to save missing-value estimates if no responses were missing.)
The TERM
option specifies the treatment term whose means, effects etc. are to be saved. This must be set if any of these are to be saved, unless there is only one treatment term.
The LSDLEVEL
option specifies the significance level (%) to use in the calculation of least significant differences, or the experiment-wise significance level for multiple comparisons (default 5%).
The MCOMPARISON
option specifies the method to use for multiple comparisons. The settings are FLSD
(Fisher’s Least Significant Difference), FSTUDENTIZEDLSD
(Fisher’s Protected Least Significant Difference, using the Studentized Range statistic rather than Student’s t), Bonferroni
and Sidak
. By default, no multiple comparisons are done. The results are saved in a textual column, with the means. This contains identical letters (a, b etc.) alongside the sets of means that do not differ significantly. For more details see procedure AMCOMPARISON
, which is used to do the calculations.
The RMETHOD
option controls whether the residuals are simple residuals (like those printed by ANOVA
– the default) or whether they are standardized according to their variances.
Options: TERM
, COMBINATIONS
, ADJUSTMENT
, LSDLEVEL
, RMETHOD
, MCOMPARISON
, SAVE
.
Parameters: INFORMATION
, OUTFILENAME
, COLUMNNAMES
, EXIT
.
Action with RESTRICT
If the Y
variate in the analysis is restricted, that restriction will carry over into the fitted-values spreadsheet.
See also
Commands for: Analysis of variance and Input and output.
Example
CAPTION 'AU2RDA example',\ 'Data from Genstat 5 Release 1 Reference Manual, page 340.';\ STYLE=meta,plain FACTOR [NVALUES=36; LEVELS=3; VALUES=12(1...3)] Block FACTOR [NVALUES=36; LABELS=!t(baresoil,emerald,emergo)] Leachate & [LABELS=!t('1','1/4','1/16','1/64')] Dilution VARIATE [NVALUES=36] Nhatch,Nnohatch READ Leachate,Dilution,Nhatch,Nnohatch 1 2 109 318 3 4 54 350 3 1 * 415 2 2 783 212 3 3 652 1375 2 4 490 816 1 3 95 1219 2 1 1012 66 1 4 166 943 3 2 1059 313 1 1 257 1006 2 3 1058 234 2 4 507 1119 1 2 194 840 1 3 175 1707 1 1 326 609 3 4 142 980 2 3 286 230 3 2 546 313 2 2 * 301 2 1 2471 112 3 3 76 489 1 4 208 503 3 1 * 325 1 1 322 913 1 2 255 2246 3 2 1774 1446 2 2 999 193 2 4 388 1836 3 4 221 1800 1 3 220 1902 2 1 2821 187 3 1 1486 463 3 3 717 1473 1 4 143 941 2 3 968 550 : CALCULATE Logit%h = LOG(Nhatch/Nnohatch) BLOCKSTRUCTURE Block TREATMENTSTRUCTURE Leachate*Dilution AUNBALANCED [PSE=differences,alldifferences; FPROBABILITY=yes] Logit%h " save the information " AU2RDA [TERM=Leachate.Dilution] INFORMATION=\ aovtable,means,sedmeans,replication; OUTFILENAME=\ 'aovtable.rda','means.rda','sedmeans.rda','rep.rda' " show the contents of the file " FOR file='aovtable.rda','means.rda','sedmeans.rda','rep.rda' IMPORT file; ISAVE=cols PRINT cols[] DELETE [REDEFINE=yes] cols " tidy up by deleting file (delete the line below if you want to keep it) " FDELETE file ENDFOR