bug-gnu-pspp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: CTABLES weighted counts slightly off?


From: Frans Houweling
Subject: PSPP-BUG: CTABLES weighted counts slightly off?
Date: Sat, 4 May 2024 22:22:48 +0200
User-agent: Mozilla Thunderbird

GET FILE='issue.sav'.

VARIABLE LEVEL year (NOMINAL).

WEIGHT OFF.

CTABLES
  /TABLE=weightFactor [COUNT COMMA12.0, VALIDN COMMA12.0, SUM COMMA12.0] BY
year
  /TITLES TITLE='Number of cases and sum of weights'.

                       Number of cases and sum of weights
+-------------------------+---------------------------------------------------+
|                         | Year                       |
| +-------------------------+-------------------------+
|                         |           2021          | 2022          |
| +------+-------+----------+------+-------+----------+
|                         | Count|Valid N|    Sum   | Count|Valid N|    Sum   |
+-------------------------+------+-------+----------+------+-------+----------+
|Weighting factor to      |28,608| 28,608|26,007,949|28,416| 28,416|26,320,368|
|population               |      |       |          | |       |          |
+-------------------------+------+-------+----------+------+-------+----------+


WEIGHT BY weightFactor.


FREQUENCIES year /STATISTICS=NONE.

                                Year
+----------+--------------+-------+-------------+------------------+
|          |   Frequency  |Percent|Valid Percent|Cumulative Percent|
+----------+--------------+-------+-------------+------------------+
|Valid 2021|26007948.99918|  49.7%|        49.7%| 49.7%|
|      2022|26320367.99956|  50.3%|        50.3%| 100.0%|
+----------+--------------+-------+-------------+------------------+
|Total     |52328316.99874| 100.0%| |                  |
+----------+--------------+-------+-------------+------------------+

CTABLES
  /TABLE=year [COUNT COMMA12.0]
  /TITLES TITLE='Number of households (weighted)'.

Number of households (weighted)
+---------+----------+
|         |   Count  |
+---------+----------+
|Year 2021|26,007,951|
|     2022|26,320,352|
+---------+----------+

SHOW SYSTEM.

                   System Information
+----------------+-------------------------------------+
|Version         |GNU pspp 2.0.1-g1b8d98               |
|Host System     |x86_64-pc-linux-gnu                  |
|Build System    |x86_64-pc-linux-gnu                  |
|Locale Directory|/usr/local/share/locale              |
|Journal File    |/home/fhou/.local/state/pspp/pspp.jnl|
|Compiler Version|11.2.0                               |
+----------------+-------------------------------------+

Attachment: issue.sav
Description: application/spss-sav


reply via email to

[Prev in Thread] Current Thread [Next in Thread]