need disaggregate data to case level from form level

Discussion in 'SPSS' started by Christian, Oct 12, 2011.

  1. Christian

    Christian Guest

    working with national health data set:

    40 hospitals submit monthly form. each form includes:

    hospital name, date or report, # cases, # deaths (for each of ~20
    common diseases).

    hosp A, January, disease 1, 20, 5
    hosp A, January, disease 2, 35, 2
    hosp A, January, disease 3, 15, 1
    hosp B, January, disease 1, 15, 4
    hosp B, January, disease 2, 10, 1


    what i need is this info disaggregated by the cases and deaths. to
    illustrate with the example above what i want is:

    hosp A, January, disease 1, case (20 records that look like this)
    hos A, January, disease 1, death (5 records that look like this)
    hosp A, January, disease 2, case (35 records that look like this)
    hosp A, January, disease 2, death (2 records that look like this)

    essentially "case" and "death" should be values of a common variable
    called "outcome" and the number of records needs to correspond to the
    number of "deaths" or "cases".

    because i need things like incidence, nationally per month, and case-
    fatality rate. what i can currently get is stats on cases per report
    (12 reports per hospital). and i can get sums (so therefore national
    sum per month or year, but not standard deviations per month (all
    hospitals).

    how can i do this with spss??

    best,

    christian
     
    Christian, Oct 12, 2011
    #1
    1. Advertisements

  2. Christian

    David Guest

    See WEIGHT command.
    Search Archives for XSAVE and LOOP.
    ---
    LOOP CASE=1 TO NCASES.
    XSAVE OUTFILE "CASES.SAV".
    END LOOP.
    LOOP DEATH=1 TO NDEATHS.
    XSAVE OUTFILE "DEATHS.SAV".
    END LOOP.
    EXE.
    ADD FILES / FILE "CASES.SAV" / IN=CASES /FILE "DEATHS.SAV"/IN=DEATHS.
    .....
    HTH, David
    -
     
    David, Oct 12, 2011
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.