本文介绍了如何在 SAS VA 7.4 Designer 中创建累积中值字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑 VA 7.4 Designer 中的列表.它只有两个字段(月、患者中位数).希望是计算几个月的累积中位数.该累积中位数被标记为中位数患者".附上具有更多描述性步骤的示例数据.

Consider a List Table in VA 7.4 Designer. It has only two fields (Month, Median Patients). The desire is to calculate the cumulative median over the months. This cumulative median is labelled as "Median Patients". An example data with more descriptive steps is attached.

请看一下.注意:只需使用 VA 7.4 Designer 中的中值函数(不​​是期望),就可以轻松计算每月的患者中位数.需要累积中位数.

Please, take look. Note: It's easy to calculate the monthly Median Patients by just using the median function in VA 7.4 Designer (not the desire). The cumulative median is desired.

谢谢你,玩得开心.`

Sample Data
-------------
Account ID  Month       #patients
----------  -------     ----------
1       Jan2017     5
2       Jan2017     3
3       Feb2017     7
4       Feb2017     6
5       Feb2017     2
6       Mar2017     4
7       Apr2017     1
8       Apr2017     10
9       Apr2017     9
10      Apr2017     3



Typical calculation in SAS VA 7.4
-----------------------------------
Monthly Median (Easy using median function)
-------------------------------------------
Month       Median Patients
---------   ---------------
Jan2017     4       ( 5+3 ) /2
Feb2017     6       middle of ( 2,6,7 )
Mar2017     4
Apr2017     6       middle of ( 1,3,9,10 )  = (3+9)/2 = 6



Cumulative Monthly Median (Desired in SAS VA 7.4) Any idea how to calculate this assuming this is in a List Table with only two fields (Month and Median Patients)?
------------------------------------------------------------------------------------------------------------------------------------------------------------
Month       Median Patients
--------    -----------------
Jan2017     4       ( 5+3 ) /2
Feb2017     5       middle of ( 2,3,5,6,7 )     = 5
Mar2017     5       middle of (2,3,4,5,6,7 )    = (4+5) /2 = 4.5(approx. 5 when rounded)
Apr2017     5       middle of(1,2,3,3,4,5,6,7,9,10) = (4+5) /2 = 4.5(approx. 5 when rounded)

推荐答案

在 VA Designer 中:

In VA Designer:

  1. 创建一个名为 monthyear 的日期参数,并为其分配与 Month 字段相同的格式,
  2. 在您的报告正文中创建一个下拉菜单 &List-Table 对象,
  3. Month 字段分配给 drop-down,然后转到角色选项卡并在参数框中选择 monthyear ;您刚刚创建的,
  4. 选择 List-Table,分配 Month、Patient(确保聚合为中位数)然后转到过滤器选项卡并使用指向并单击创建高级过滤器:Month <= monthyear
  5. 现在交互已设置完毕,请确保当您从下拉列表中选择日期时,您会看到要计算的正确数据,每月中位数将被计算
  1. Create a date parameter called monthyear and assign it same format as you Month field,
  2. In the body of your report Create a drop-down & List-Table objects,
  3. Assign the Month field to the drop-down, then go to roles tab and in the parameter box select monthyear ; which you just created,
  4. Select the List-Table, assign Month, Patient (make sure the aggregation is median) then go to the filters tab and create advances filter using the point and click: Month <= monthyear
  5. Now the interaction is setup, make sure when you select a date from drop down you see the correct data to calculate, monthly median will be calcualted
  1. 从表格中删除月份/日期字段,然后将计算累积中位数

这篇关于如何在 SAS VA 7.4 Designer 中创建累积中值字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 03:14