converting outputs into dataset: any syntax suggestions?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

converting outputs into dataset: any syntax suggestions?

Osatuke, Katerine, VHACIN
Dear experts,
 
I have a dataset with multiple measures from individuals who are labeled
by Hospitals they are at, and Regions these hospitals are part of.
I would like to get basic descriptives (=means, DtDev, and Number or
individuals) from each Hospital and Region, and then merge them to the
initial file, to have on each of my rows: individual ID, individual
scores for all measures, hospital ID, hospital mean StD and N for each
measure, region ID, region mean StD and N for each measure; and then the
entire sample's region mean StD and N for each measure.
 
So far, I know how to get this by aggregating a temporary file by a
dummy, computing all the descriptives while aggregating, and then
merging the temporary file to my initial file. But, this way of doing it
takes aggregating and merging as many times as I have subsets that I
want descriptives for. Is there an easier way? E.g. is there a syntax to
run descriptives and then save these outputs as datasets, which I then
could merge with my data?
 
Thank you for the input,
Katerine
 
Katerine Osatuke, Ph.D.
Research Fellow
VHA National Center for Organization Development
Suite 230, 11500 Northlake Drive, Cincinnati OH 45249
Phone: (513) 247-2255
Fax: (513) 247-4699
Email: [hidden email]
 
Reply | Threaded
Open this post in threaded view
|

Re: converting outputs into dataset: any syntax suggestions?

Melissa Ives
If you are using a recent enough version of SPSS,
Use AGGREGATE with OUTFILE=* MODE=ADDVARIABLES.
The functions you want are varmn=MEAN(var)/varn=N(var)/varsd=SD(var).

Melissa
The bubbling brook would lose its song if you removed the rocks.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Osatuke, Katerine, VHACIN
Sent: Tuesday, April 03, 2007 2:33 PM
To: [hidden email]
Subject: [SPSSX-L] converting outputs into dataset: any syntax
suggestions?

Dear experts,

I have a dataset with multiple measures from individuals who are labeled
by Hospitals they are at, and Regions these hospitals are part of.
I would like to get basic descriptives (=means, DtDev, and Number or
individuals) from each Hospital and Region, and then merge them to the
initial file, to have on each of my rows: individual ID, individual
scores for all measures, hospital ID, hospital mean StD and N for each
measure, region ID, region mean StD and N for each measure; and then the
entire sample's region mean StD and N for each measure.

So far, I know how to get this by aggregating a temporary file by a
dummy, computing all the descriptives while aggregating, and then
merging the temporary file to my initial file. But, this way of doing it
takes aggregating and merging as many times as I have subsets that I
want descriptives for. Is there an easier way? E.g. is there a syntax to
run descriptives and then save these outputs as datasets, which I then
could merge with my data?

Thank you for the input,
Katerine

Katerine Osatuke, Ph.D.
Research Fellow
VHA National Center for Organization Development Suite 230, 11500
Northlake Drive, Cincinnati OH 45249
Phone: (513) 247-2255
Fax: (513) 247-4699
Email: [hidden email]



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: converting outputs into dataset: any syntax suggestions?

Edward Boadi
You may take a look how OMS is used.
Regards.
Edward.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of
Melissa Ives
Sent: Tuesday, April 03, 2007 4:01 PM
To: [hidden email]
Subject: Re: converting outputs into dataset: any syntax suggestions?


If you are using a recent enough version of SPSS,
Use AGGREGATE with OUTFILE=* MODE=ADDVARIABLES.
The functions you want are varmn=MEAN(var)/varn=N(var)/varsd=SD(var).

Melissa
The bubbling brook would lose its song if you removed the rocks.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Osatuke, Katerine, VHACIN
Sent: Tuesday, April 03, 2007 2:33 PM
To: [hidden email]
Subject: [SPSSX-L] converting outputs into dataset: any syntax
suggestions?

Dear experts,

I have a dataset with multiple measures from individuals who are labeled
by Hospitals they are at, and Regions these hospitals are part of.
I would like to get basic descriptives (=means, DtDev, and Number or
individuals) from each Hospital and Region, and then merge them to the
initial file, to have on each of my rows: individual ID, individual
scores for all measures, hospital ID, hospital mean StD and N for each
measure, region ID, region mean StD and N for each measure; and then the
entire sample's region mean StD and N for each measure.

So far, I know how to get this by aggregating a temporary file by a
dummy, computing all the descriptives while aggregating, and then
merging the temporary file to my initial file. But, this way of doing it
takes aggregating and merging as many times as I have subsets that I
want descriptives for. Is there an easier way? E.g. is there a syntax to
run descriptives and then save these outputs as datasets, which I then
could merge with my data?

Thank you for the input,
Katerine

Katerine Osatuke, Ph.D.
Research Fellow
VHA National Center for Organization Development Suite 230, 11500
Northlake Drive, Cincinnati OH 45249
Phone: (513) 247-2255
Fax: (513) 247-4699
Email: [hidden email]



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.