Creating Variables from Output

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

Creating Variables from Output

Krinsky, Alan-2
Creating Variables from Output

Is it possible to run Descriptive Statistics, e.g. Mean and Standard Deviation, on a variable and create new variables for these computed statistics, so that they are inserted into the dataset used to compute them, rather than appearing only in an Output table?

For example, let's say we have 50 students with their scores on a test; each row of data contains the Student ID and the Test Score. I can use the Analyze/Descriptive Statistics utility to calculate the Mean and SD from the Test Score variable. Can I now create a new variable, say Class Mean, that would appear in my dataset, with the same value for each student? I could then, for example, create additional variables by calculating distance of each student's score from the class mean.

Or, is it possible to write syntax to accomplish the same goal without necessarily creating a new variable for Class Mean?

Thank you for any assistance with this!

Alan


Alan D. Krinsky  PhD, MPH
Medical Management Interventions Manager
UMass Memorial Health Care
Hahnemann Campus
281 Lincoln St.
Room 212
Worcester, MA 01605
Phone: 508-334-5854
Fax: 508-793-6086
E-mail: [hidden email]

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Reply | Threaded
Open this post in threaded view
|

Automatic reply: Creating Variables from Output

Marson, Wendy
 I am out of the office and not responding to email until 11/01

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Creating Variables from Output

Kylie
In reply to this post by Krinsky, Alan-2
Creating Variables from Output

Hi Alan,

 

Take a look at the Aggregate procedure, which has an option for adding the aggregated variable(s) (which can include mean, median, sum, st.dev) to the active file.

 

Hope this helps.

 

Cheers,

Kylie.

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Krinsky, Alan
Sent: Wednesday, 27 October 2010 1:39 PM
To: [hidden email]
Subject: Creating Variables from Output

 

Is it possible to run Descriptive Statistics, e.g. Mean and Standard Deviation, on a variable and create new variables for these computed statistics, so that they are inserted into the dataset used to compute them, rather than appearing only in an Output table?

For example, let's say we have 50 students with their scores on a test; each row of data contains the Student ID and the Test Score. I can use the Analyze/Descriptive Statistics utility to calculate the Mean and SD from the Test Score variable. Can I now create a new variable, say Class Mean, that would appear in my dataset, with the same value for each student? I could then, for example, create additional variables by calculating distance of each student's score from the class mean.

Or, is it possible to write syntax to accomplish the same goal without necessarily creating a new variable for Class Mean?

Thank you for any assistance with this!

Alan

 

Alan D. Krinsky  PhD, MPH
Medical Management Interventions Manager
UMass Memorial Health Care
Hahnemann Campus
281 Lincoln St.
Room 212
Worcester, MA 01605
Phone: 508-334-5854
Fax: 508-793-6086
E-mail: [hidden email]

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.