RandomAccess;
NoDataFileVariableNames;
{Make sure the users are ready to compute G-G epsilon.}
startmsg :=DisplayMessageBox (MB_OKCANCEL, 'Greenhouse-Geisser Adjustment',
'This program will first compute the Greenhouse-Geisser epsilon from the SSCP: Error
matrix for a repeated measure effect with two or more degrees of freedom. The SSCP: Error matrix
needs to be active on the screen. If you are ready, click "OK".');
If startmsg = IDCANCEL then stop;
{Compute Greenhouse-Geisser epsilon}
errorhdl := GetScrollsheet(0);
{Verify if the active scrollsheet is the SSCP: Error matrix.}
ScrollsheetGetTitle (errorhdl, 1, title$);
title$ := Mid(title$, 1, 11);
If title$ = "SSCP: Error" then
begin
k :=ScrollsheetGetNbCols (errorhdl);
redim SSE(k,k), result(4,1), input(2);
ScrollsheetGetMatrix (errorhdl, 1, 1, SSE);
MatrixTrace (SSE, trSSE);
tr1:=trSSE^2;
MatrixMultiply(SSE,SSE,SSE);
MatrixTrace(SSE,tr2);
result(1,1) := tr1/(k*tr2);
{Arrange the first output}
rsltscr := NewScrollsheet (1, 1, result,'G-G Adjustment Epsilon ', 'Epsilon ',
'Greenhouse-Geisser');
cntnmag := DisplayMessageBox(MB_YESNO,'Greenhouse-Geisser Adjustment',
'Do you want to compute adjusted degrees of freedom and an adjusted p-level? If so, you
will be prompted to input the F-value and the unadjusted denominator degrees of freedom for the
effect. Click "Yes" to continue or "No" to exit the program.');
If cntnmag = IDYES then
begin
DisplayNumericInputBox ('Input the F-value and the unadjusted denominator degrees of
freedom', 'F-value|Unadjusted denominator degrees of freedom (df 2)', input);
result(2,1) := k*result(1,1);
result(3,1) := input(2)*result(1,1);
result(4,1) := 1-IFDistr (input(1), result(2,1), result(3,1));
{Arrange the second output.}
title2$ := 'G-G Adjustment'+'|'+ 'F = ' + Str(input(1), 9,7);
rsltscr2 := NewScrollsheet (4, 1, result, title2$, 'Epsilon|df 1|df
2|p-level','Greenhouse-Geisser');
DeleteScrollsheet(rsltscr);
end
else stop;
end
else
DisplayMessageBox (MB_OK, 'Greenhouse-Geisser Adjustment Epsilon', 'The matrix
scrollsheet active on the screen is not the SSCP: Error matrix. Please verify that the active scrollsheet
is the SSCP: Error matrix.');
| Back to List of Programs |
![[StatSoft]](../../../images/sssmall.gif)
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217
e-mail: info@statsoft.com
©Copyright StatSoft, Inc., 1984-2004.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.