[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weights -> estimate with relative standard error
From: |
John Darrington |
Subject: |
Re: Weights -> estimate with relative standard error |
Date: |
Thu, 19 May 2011 07:57:40 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
If I've understood your requirements correctly, then the script is a simple as
weight by PVW.
select if ((DIAG1 = '38200') or (DIAG1 = '38201') or (DIAG1 = '3824-') or
(DIAG1 = '3829_')) .
descriptives /VARIABLES= CSTRATM CPSUM /STATISTICS=SEMEAN.
This will do Objective 1 for you. Objective 2 is then a matter of modifying the
"select" line to
get the cases that you need .
However, based on other peoples' responses perhaps I've misunderstood the
question. Does the above
do what you want or dis you mean something else?
J'
On Wed, May 18, 2011 at 04:17:31PM -0700, David Spaugh wrote:
Greetings,
I've used PSPP to extract columnar data from a 2008 public use data file
named NAMCS08.exe
located at http://www.cdc.gov/nchs/ahcd/ahcd_questionnaires.htm.
(Scroll down to Public-use Data Files / Downloadable Data Files, Click the
link for NAMCS, 1993-2008.)
It's a medical care survey.
The extraction script I used is pasted below.
To keep the script small, I've left un-needed data clumped in large
undefined columns.
The DIAG1 and DIAG2 columns contain non-numeric diagnostic codes.
The PVM column is a weight value.
The CSTRATM column is a strata value and the CPSUM column is cluster
value, for use in variance estimation.
My understanding is that if I isolate a class of DIAG codes within the
data and then aggregate their respective PVM weights, I'll have a national
annual estimate of incidence rate for that type of diagnosis. However, the
estimate needs to be accompanied by a relative standard error. The CSTRATM &
CPSUM variables are for use in calculating the RSE.
Apparently SPSS will do this with a script partly provided on page 89 of
the NAMCS file documentation. They mention "SPSS Complex Samples 12.0 Module".
I've read the PSPP manual and attempted a script myself, but I'm not even
close, and I'm in over my head.
Before I completely abandon this exploration into NAMCS "public use data
files", I thought I'd put this in front of the community.
My objectives:
1 - aggregate the weights of all records that have a DIAG1 value of 38200,
38201, 3824-, or 3829-, to provide a national estimate of incidence for those
codes, with RSE calculated based on the strata and cluster values.
2 - if possible, expand objective-1 to also include all records that have
a DIAG2 value of 38200, 38201, 3824-, or 3829- that is accompanied by DIAG1
codes of 49390, 4659-, or V202.
Is PSPP capable of this?
FWIW - I have a respectable skill set in various arena, but statistical
assessment is not part of it. I'm simply over my head.
If my objectives are difficult to achieve with PSPP, then I'm done and
will move on to something else.
However, if this little project requires only moderate effort from a
person with expertise, then I would be immensely grateful if someone could
provide a script or show me how to do it. I'm not sure about the protocols of
this mailing list, but if I'm allowed to say so, compensation for the work is
available.
Thanks!
DS
Extraction script:
set workspace=100000000.
GET DATA /TYPE=TXT /FILE='C:\Documents and Settings\Owner\My Documents\WPI
New\Papers\Research Data\NAMCS\2008 raw data\NAMCS08' /ARRANGEMENT=FIXED
/FIRSTCASE=2 /IMPORTCASE=ALL
/VARIABLES=VMONTH 0-1 F
VYEAR 2-5 F
VDAYR 6-6 F
AGE 7-9 F
SEX 10-10 F
ETHNIC 11-12 F
RACE 13-14 F
DN1 15-51 A
Reason 52-53 F
DIAG1 54-58 A
DIAG2 59-63 A
DIAG3 64-68 A
DN2 69-222 A
MED 223-223 F
MED1 224-228 F
MED2 229-233 F
MED3 234-238 F
MED4to8 239-263 A
NCMED1 264-265 F
NCMED2 266-267 F
NCMED3 268-269 F
DN3 270-301 A
PVW 302-307 F
DN35 308-327 A
DRUGID1 328-333 A
DN4 334-384 A
DRUGID2 385-390 A
DN5 391-441 A
DRUGID3 442-447 A
DN6 448-968 A
CSTRATM 969-976 F
CPSUM 977-982 F
DN7 983-996 A.
_______________________________________________
Pspp-users mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/pspp-users
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature
- Re: Noob needs help with simple script, (continued)
- Re: Noob needs help with simple script, David Spaugh, 2011/05/11
- Re: Noob needs help with simple script, Ben Pfaff, 2011/05/12
- Re: Noob needs help with simple script, David Spaugh, 2011/05/12
- SUCCESS (Re: Noob needs help with simple script), David Spaugh, 2011/05/12
- Save Translate CSV, David Spaugh, 2011/05/12
- Re: Save Translate CSV, Ben Pfaff, 2011/05/12
- Weights -> estimate with relative standard error, David Spaugh, 2011/05/18
- RE: Weights -> estimate with relative standard error, Marshall DeBerry, 2011/05/18
- Re: Weights -> estimate with relative standard error, Ben Pfaff, 2011/05/19
- Message not available
- Re: Weights -> estimate with relative standard error, Ben Pfaff, 2011/05/19
- Re: Weights -> estimate with relative standard error,
John Darrington <=
Message not available