I am attempting to analyse the incidence rates of diseases for different ethnicities. Currently ethnicity is coded as a double digit.
I want to analyses the rates of disease for different groups of Pacific Peoples. In the data itself there are multiple ethnic groups that fit under this. I am only interested in five pacific groups for analysis which are coded as follows:
samoan = 31
tongan = 32
cook island maori = 33
aggregated other pacific = 30, 34, 35, 36, 37
total pacific = 30, 31, 32, 33, 34, 35, 36, 37
I want to assign a value to each of the analysis groups (so samoan ends up as 1, tongan as 2, cookisland maori as 3, aggregated other pacific = 4 and lastly the total pacific group = 5). Is this possible? And if so what sort of expression would I use to do that.
The dataset looks as follow:
clientid dob ethnicgp gender domicilecode
63287 05/04/1987 34 M 0441
87234 18/11/1963 30 F 8823
09834 27/01/2000 37 F 3015
23432 03/07/1991 31 M 2125
Thanks in Advance
A format or IF/THEN statement would work here.
Formats are better and easier to manage in my opinion.
@acelini wrote:
I am attempting to analyse the incidence rates of diseases for different ethnicities. Currently ethnicity is coded as a double digit.
I want to analyses the rates of disease for different groups of Pacific Peoples. In the data itself there are multiple ethnic groups that fit under this. I am only interested in five pacific groups for analysis which are coded as follows:
samoan = 31
tongan = 32
cook island maori = 33
aggregated other pacific = 30, 34, 35, 36, 37
total pacific = 30, 31, 32, 33, 34, 35, 36, 37
I want to assign a value to each of the analysis groups (so samoan ends up as 1, tongan as 2, cookisland maori as 3, aggregated other pacific = 4 and lastly the total pacific group = 5). Is this possible? And if so what sort of expression would I use to do that.
The dataset looks as follow:
clientid dob ethnicgp gender domicilecode
63287 05/04/1987 34 M 0441
87234 18/11/1963 30 F 8823
09834 27/01/2000 37 F 3015
23432 03/07/1991 31 M 2125
Thanks in Advance
A format or IF/THEN statement would work here.
Formats are better and easier to manage in my opinion.
@acelini wrote:
I am attempting to analyse the incidence rates of diseases for different ethnicities. Currently ethnicity is coded as a double digit.
I want to analyses the rates of disease for different groups of Pacific Peoples. In the data itself there are multiple ethnic groups that fit under this. I am only interested in five pacific groups for analysis which are coded as follows:
samoan = 31
tongan = 32
cook island maori = 33
aggregated other pacific = 30, 34, 35, 36, 37
total pacific = 30, 31, 32, 33, 34, 35, 36, 37
I want to assign a value to each of the analysis groups (so samoan ends up as 1, tongan as 2, cookisland maori as 3, aggregated other pacific = 4 and lastly the total pacific group = 5). Is this possible? And if so what sort of expression would I use to do that.
The dataset looks as follow:
clientid dob ethnicgp gender domicilecode
63287 05/04/1987 34 M 0441
87234 18/11/1963 30 F 8823
09834 27/01/2000 37 F 3015
23432 03/07/1991 31 M 2125
Thanks in Advance
In attempting to create to do so I keep coming across an error.
Hi,
I believe you need to refer to the documentation for how to specify your values on the left side of the = sign. Here's the page: http://go.documentation.sas.com/?docsetId=proc&docsetTarget=n03qskwoints2an1ispy57plwrn9.htm&docsetV...
For example, it appears to me that code 76 and code 32 are 2 separate codes based on your previous posting -- and if they are, indeed 2 separate values, then they would need to be spectified as
76, 32 = 'Tongan' (note the 2 values are separated by commas)
cynthia
You don't need a semi colon after the VALUES statement, it's all one statement.
@acelini wrote:
In attempting to create to do so I keep coming across an error.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 proc format;74 value ethnicgpfmt (notsorted); <- this is too early.NOTE: Format ETHNICGPFMT has been output.75 31='Samoan'__180ERROR 180-322: Statement is not valid or it is used out of proper order.76 32='Tongan'77 33='Cook Island Maori'78 30 ='Aggregated Other Pacific'79 34-37='Aggregated Other Pacific'80 21='NZ Maori'81 10-12='Non Maori Pacific'82 40-high='Non Maori Pacific';NOTE: The previous statement has been deleted.83 run;What exactly is this error referring to?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.