summary data to individual data

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

summary data to individual data

L Barnes
Good morning,

I have summary tables with race, reading, math, not proficient and proficient counts. I want to create individual data from that summary data. My tables have:

100 white students proficient in reading, 50 not proficient in reading, 80 proficient in math, 20 not proficient in math.
60 minority students proficient in reading, 45 not proficient in reading, 50 proficient in math, 75 not proficient in math.

My data file would have 480 rows total.

I need my individual data file to have rows corresponding to the parameters. For example, there would be 100 rows with the same data in three fields and a non-descriptive id number.
Id Race subject     proficiency
 1  White reading    proficient

100 White reading    proficient
101 White reading  not proficient

150 White reading not proficient

And so on.

I can create an id number on my own separately, but I don’t know how to incorporate an id auto number into syntax that is creating my individual data.

I would appreciate any help.

Thanks

laura

=====================
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: summary data to individual data

Jon Peck
You can assign a casenumber as
compute id = $casenum.

As for the rest, look into INPUT PROGRAM if you haven't already done so.

On Thu, Dec 26, 2019 at 6:39 AM Laura <[hidden email]> wrote:
Good morning,

I have summary tables with race, reading, math, not proficient and proficient counts. I want to create individual data from that summary data. My tables have:

100 white students proficient in reading, 50 not proficient in reading, 80 proficient in math, 20 not proficient in math.
60 minority students proficient in reading, 45 not proficient in reading, 50 proficient in math, 75 not proficient in math.

My data file would have 480 rows total.

I need my individual data file to have rows corresponding to the parameters. For example, there would be 100 rows with the same data in three fields and a non-descriptive id number.
Id Race  subject     proficiency
 1  White reading    proficient

100 White reading    proficient
101 White reading  not proficient

150 White reading not proficient

And so on.

I can create an id number on my own separately, but I don’t know how to incorporate an id auto number into syntax that is creating my individual data.

I would appreciate any help.

Thanks

laura

=====================
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


--
Jon K Peck
[hidden email]

===================== 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: summary data to individual data

L Barnes
Jon,

I have been looking into input program, and I'll admit my syntax skills are
at the beginning stage. And I may not have been clear in my question, I'm
sorry if that's the case.

I tried this syntax:

input program.
loop #i= 1 to 100.
compute id = #i.
compute race = 1.
compute subject = 1.
compute proficient = 1.
end case.
end loop.
end file.
end input program.

This works for the first set of parameters the 100 white, reading and
proficient. But if I want to vary anything, like race, subject or
proficiency, it overwrites the previous data; for example, the 50 white
students that are not proficient in reading.

Laura




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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: summary data to individual data

Jon Peck
You just need to let the loop cover all the cases.  For starters...

input program.
loop #i= 1 to 480.
compute id = #i.
do if #i <= 100.
compute race = 1.
compute subject = 1.
compute proficient = 1.
else if #i <= 150.
compute race = 1.
compute subject = 1.
compute proficient = 2.
*** etc.
end if.
end case.
end loop.
end file.
end input program.

On Thu, Dec 26, 2019 at 12:18 PM L Barnes <[hidden email]> wrote:
Jon,

I have been looking into input program, and I'll admit my syntax skills are
at the beginning stage. And I may not have been clear in my question, I'm
sorry if that's the case.

I tried this syntax:

input program.
loop #i= 1 to 100.
compute id = #i.
compute race = 1.
compute subject = 1.
compute proficient = 1.
end case.
end loop.
end file.
end input program.

This works for the first set of parameters the 100 white, reading and
proficient. But if I want to vary anything, like race, subject or
proficiency, it overwrites the previous data; for example, the 50 white
students that are not proficient in reading.

Laura




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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


--
Jon K Peck
[hidden email]

===================== 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: summary data to individual data

L Barnes
That's it. Thank you, I got it to work. I really appreciate your help.

Laura



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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