联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Database作业Database作业

日期:2024-06-24 12:21

SAS 5: Computing Population Attributable Risk

This assignment uses PROC STDRATE to compute the population attributable risk. We are interested in the relationship between hypertension and stroke. We follow people with and without hypertension for five years and record the number who have a stroke during that period. We have data that looks like this:

  Stroke

  Yes

  No

  Hypertension

  18

  234

  No Hypertension

  46

  952

Note that the second number for each group entered in the data below is the TOTAL for each group and not the number in that group who did not have a stroke.

Use the following program to find the population attributable risk.

DATA stroke ;

INPUT   hyper count_h not_hyper count_not;

DATALINES ;

18  252  46  998

;

PROC STDRATE DATA=stroke

REFDATA =stroke

METHOD=INDIRECT(AF)

STAT=RISK

;

POPULATION EVENT=hyper  TOTAL =count_h;

REFERENCE EVENT = not_hyper TOTAL = count_not ;

RUN ;

Your assignment:

1. Run the code above.

2. Label the Cumulative Incidence of stroke in patients with hypertension, cumulative incidence of stroke in patients without hypertension and the population attributable risk of stroke due to hypertension

Each statement is explained below.

DATA stroke ;

INPUT   hyper count_h not_hyper count_not;

DATALINES ;

18  252  46  998

;

As you know by now, the DATA statement names a dataset being created. I called this stroke since it’s pretty obvious.  The INPUT statement has four variables, the number with stroke who had hypertension, the total number with hypertension, the number not hypertensive who had a stroke, and the total population not hypertensive. DATALINES precedes the data, then we have the data itself and a semi-colon to mark the end of the data. Now let’s look at the STDRATE procedure.

PROC STDRATE DATA=stroke

REFDATA =stroke

METHOD=INDIRECT(AF)

STAT=RISK

;

PROC STDRATE DATA = stroke begins the procedure and specifies stroke as the dataset for our study group, in this case, the people with hypertension. REFDATA = stroke specifies stroke as the dataset for our reference population, people without hypertension. The data for both groups happens to be in the same dataset but that is not always the case. From the SAS documentation:

“The AF suboption requests the attributable fraction that measures the excess event rate or risk fraction in the exposed population that is attributable to the exposure. This suboption also requests the population attributable fraction that measures the excess event rate or risk fraction in the total population that is attributable to the exposure.”

STAT = risk specifies that we want risk and not rate.  Notice that all of this is one statement.

POPULATION EVENT=hyper  TOTAL =count_h;

The POPULATION statement requires two values, the variable giving the number in the exposed group who had the event and the variable giving the total number in the exposed group.

REFERENCE EVENT = not_hyper TOTAL = count_not ;

The REFERENCE statement gives the reference group, usually, the people who were not exposed to the risk factor. This also requires two variables, the number who had the event and the total number in the non-exposed group.

RUN ;

1. You will screen shot your results and put them in a word document for return.

2. You will look for your own 2x2 table for this type of information. Create your own code and explain what it means.





版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp