Syntax help

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

Syntax help

Jack Noone
Dear colleagues,

I would like to create a list of variables from my data (N=1,200) which comprises a socioeconomic value attached to each paid job held across the life course. The list of variables should correspond to each of the years from 1954 (when my participants started working) to 2012. For each variable/year the data will be the socioeconomic index attached to the job held in that year. For example, if a participant was an accountant from 1980 to 1990, then the associated socioeconomic index will be repeated for each of the 11 variables: "a1980", "a1981",……."a1989", "a1990".

I have the following data at hand:
  • The year each job began (startyear_job1, startyear_job2, etc)
  • The year each job finished (stopyear_job1, stopyear_job2, etc)
  • The number of years spent in each job (time_job1, time_ job2, etc). This was simply calculated as stopyear_job1 – start year_job1
  • A socioeconomic index for each job held (AUSE106_Job1, AUSE106_Job2).
Could anyone help me with the syntax needed to complete this task? I've not used macros before, but I suspect they may be helpful.

The data is complicated by the fact that people hold jobs simultaneously. That is, some people start a new job before finishing the last one (e.g. holding two part-time jobs). In these instances, I would like to use the higher of the socioeconomic indexes.

Thanks in advance

Jack Noone

Dr. Jack Noone

Research Fellow & LHH/ABBA Project Manager

Ageing, Work and Health Research Unit

Faculty of Health Sciences

University of Sydney

 

Ph: 02 9351 9411

Reply | Threaded
Open this post in threaded view
|

Re: Syntax help

David Marso
Administrator
Advice?
Go long rather than wide.
Write basic syntax first before attempting a macro.
You haven't really defined the task.
--
Jack Noone wrote
Dear colleagues,

I would like to create a list of variables from my data (N=1,200) which comprises a socioeconomic value attached to each paid job held across the life course. The list of variables should correspond to each of the years from 1954 (when my participants started working) to 2012. For each variable/year the data will be the socioeconomic index attached to the job held in that year. For example, if a participant was an accountant from 1980 to 1990, then the associated socioeconomic index will be repeated for each of the 11 variables: "a1980", "a1981",……."a1989", "a1990".

I have the following data at hand:

  *   The year each job began (startyear_job1, startyear_job2, etc)
  *   The year each job finished (stopyear_job1, stopyear_job2, etc)
  *   The number of years spent in each job (time_job1, time_ job2, etc). This was simply calculated as stopyear_job1 – start year_job1
  *   A socioeconomic index for each job held (AUSE106_Job1, AUSE106_Job2).

Could anyone help me with the syntax needed to complete this task? I've not used macros before, but I suspect they may be helpful.

The data is complicated by the fact that people hold jobs simultaneously. That is, some people start a new job before finishing the last one (e.g. holding two part-time jobs). In these instances, I would like to use the higher of the socioeconomic indexes.

Thanks in advance

Jack Noone

Dr. Jack Noone
Research Fellow & LHH/ABBA Project Manager
Ageing, Work and Health Research Unit
Faculty of Health Sciences
University of Sydney

Ph: 02 9351 9411
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"