|
|
Hi Marta
Thank you so much for helping me decipher the problem with my syntax in
calculating the % margin error. Also your advise to use 100- percent
satisfy instead of 1- percentsatisfy.
However when I ran this syntax:
COMPUTE
Marginsam=(1.25*1.96*SQRT(percentsatisfy*(100-percentsatisfy)))/freqlac.
execute.
I got margin error result as 1.44 where as the excel file calculation
shows 13.14 (the excel is a sample reference file for me).
I tested the syntax again by calculating the margin error in 3 simple
steps rather than all in one go. I got the same result as 13.14.
My colleague and I looked at my syntax again and found that we had to add
2 more brackets for it to calculate the error margin to 13.14. Here is my
final syntax. This is because it is the sqrt of the whole thing including
diviison by sample size.
COMPUTE
Marginsam2=1.25*1.96*SQRT((percentsatisfy*(100-percentsatisfy))/freqlac).
execute.
based on the above I then calculated the upper and lower limts as
COMPUTE lower = percentsatisfy-Marginsam2.
EXECUTE.
COMPUTE upper = percentsatisfy+ Marginsam2.
EXECUTE.
But then the range of those satisfied with our services for one local area
is showing between 48% (lower) to 74% (higher), too wide and is
refelective of the small sample size at the local area level.
Thanks once again for your prompt help.
regards
thara
Hi
I see a very simple error in your formula (a missing pair of parenthesis)
>> I tried to do the same in SPSS by using the two variables
percentsatisfy
>> and freqlac in my SPSS file with syntax as:
>>
>> COMPUTE Margine=(100*1.25*1.96*
>> SQRT(percentsatisfy*1-percentsatisfy))/freqlac.
>> EXECUTE.
Try this one:
COMPUTE
Margine=(100*1.25*1.96*SQRT(percentsatisfy*(1-percentsatisfy)))/freqlac.
Notice the extra parentheses wrapping "1-percentsstisfy". Another
question: are percentsatisfy values really percentages (ranging from 0
to 100%? If so, then your formula should be
...SQRT(percentsatisfy*(100-percentsatisfy)....
>> The syntax as such, seems to be working but I get 0 values in the
>> variable
>> column.
It is quite logical that it happened so, since your formula computes the
square root of a quantity, multiplied by 1, and then minus itself!
HTH,
Marta Garcia-Granero
Thara Vardhan
Senior Statistician
Planning & Results
Organisation Review and Support
NSW Police
Tel: (02) 8835-8526
This message and any attachment is confidential and may
be privileged or otherwise protected from disclosure. If you
have received it by mistake, please let us know by reply
and then delete it from your system; you should not copy
the message or disclose its contents to anyone.
|