bugs in stattables command?
Hello all,
I am trying to adapt a program written for an earlier version of EpiData to version 2.2.1.171.
The command for the old version was
. stab sex /mean="age" /des="age"
which printed the following columns:
sex, N, Nage, MEAage, MINage, MEDage, MAXage
If I understand things correctly, I should be able to get the same table using the following command in the new version:
. stab age /by=sex /stat="n mean des"
However, I get a "Unknown aggregate function: N" when I try to execute the above command, even though the documentation mentions the parameter:
* n Number of observations
Also, interestingly, if I execute
. stab age /by=sex /mean
I get no error but just the table
Sex | N ---------- M | 490 F | 3537
Instead of the mean.
Are these bugs in EpiData or do I misunderstand the documentation?
Kind regards,
Simon
Hi Simon,
I believe the documentation is not up-to-date with the stab/aggregate command on this.
You should remove the 'n' from the /stat option (hence it will look like this /stat="mean des") and instead add 'n' as a seperate option /n.
The whole line will the look like this:
stab age /by=sex /stat="mean des" /n
Kind regards,
Torsten Bonde Christiansen EpiData Association.
I am trying to adapt a program written for an earlier version of EpiData to version 2.2.1.171.
The command for the old version was
. stab sex /mean="age" /des="age"
which printed the following columns:
sex, N, Nage, MEAage, MINage, MEDage, MAXage
If I understand things correctly, I should be able to get the same table using the following command in the new version:
. stab age /by=sex /stat="n mean des"
However, I get a "Unknown aggregate function: N" when I try to execute the above command, even though the documentation mentions the parameter:
- n Number of observations
Also, interestingly, if I execute
. stab age /by=sex /mean
I get no error but just the table
Sex | N
M | 490 F | 3537
Instead of the mean.
Are these bugs in EpiData or do I misunderstand the documentation?
Kind regards,
Simon
Hi Torsten,
Thank you for the super-quick reply. Indeed it just seems to be an inconsistency between the documentation and the implementation.
Thanks a lot!
Simon
participants (1)
-
epidata-list@lists.umanitoba.ca