Generating a Continuous Variable

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Thu Mar 10, 2016 5:12 pm

Generating a Continuous Variable

Postby jcrichardson10 » Thu Mar 10, 2016 5:18 pm

Hello all!

I am having a little trouble generating the variable I need to do some statistical analysis. What I am trying to do is generate a continuous variable of time duration. What I theoretically want to be able to do is to put all my data in a line of time duration, shortest to longest. Most likely in days, just because that will be easiest for everyone involved.

I have two variables from which to generate this new variable. The first existing variable tells me the number of time units, and has values 1 to 94, 95+, Since birth, Refused, Not ascertained, Don't Know. The second existing variable tells me the time unit, and has values Days, Weeks, Months, Years, Since Birth, Refused, Not Ascertained, and Don't Know. What seems to have occurred during this survey was that when asked about the duration of a particular illness, the duration was coded into two variables for ease of data entry. That's my working theory anyway.

I want to generate a third variable that puts all my duration time in one unit type (days is fine, weeks would also be acceptable) so that I can have a continuous variable. Anyone know how to accomplish this? If I knew how at one point, I've completely forgotten.

Thanks y'all!

Who is online

Users browsing this forum: No registered users and 2 guests