Can anyone help?
I am doing a complex data modelling exercise which is ostensibly using
crosstabulations. I have a spreadsheet model for doing all the tests, and
the answers I get for chi squared, expected freqencies, residuals etc all
match exactly that which is output by SPSS. However, my calculation of the
adjusted standardised residual is not the same.
The adjusted standardised residual (as it says in hte manual) is the
residual divided by and estimate of the standard error.
I believe that it is the formula used for the standard error estimate which
is different.
Does anyone know what formula SPSS uses?
My statistics book gives two versions of the estimate of standard error
(dependign on whether it is one or two samples being looked at)
either = square root of p(1-p)/n where p is the population proportion and n
is the sample size (basically a z score)
where p = E/n where E is expected value for cell and n is the sample size
or for two samples = p(1-p)(1/n1 + 1/n2)
where p = total successes in two samples/total observations in two samples =
O+E/n1+n2
neither gives the same answer as SPSS, althoug version one is very close.
ANy ideas?
Gareth Nutt
Bemused MBA student, Kingston University UK
The residual for ijth cell, r_ij, is
r_ij = (f_o - f_e)/sqrt[ f_e * (1-p_rowi) * (1-p_colj)],
where f_o and f_e are the observed and expected frequencies for ijth cell under
the model of independence, p_rowi is the marginal proportion for the i_th row,
and p_colj is the marginal proportion for the j_th column.
Recheck this against an example table from SPSS, but as far as I recall, this is
correct.
Regards,
--
=-=-=-=-=-=-=-=-=-==-=-=-=
Mike Lacy, Ft Collins CO 80523
voice (970) 491-6721 fax (970) 491-2191