由买买提看人间百态

topics

全部话题 - 话题: agegroup
(共0页)
w*****r
发帖数: 92
1
来自主题: Statistics版 - 请教一个SAS code
这次对了,谢谢!
还发现一个问题, A和B表里都有agegroup (unique value都一样), 可是引用不同表结
果也不同,也就是说把B.agegroup全改成A.agegroup就得到另外一个结果。为什么会这
样?哪个对呢?
proc sql;
create table C as
select B.agegroup, level, mean(rate*year)
from A, B
where rate in
(select rate from B
where time<=100
group by agegroup
having time=max(time))
group by B.agegroup, level;
quit;
l****u
发帖数: 529
2
来自主题: Statistics版 - 请教一个SAS code
如果你想把B.agagroup换成A.agegroup,你就应在where statement 中在加上A.
agegroup=B.agegroup 就象where rate in (select rate
from b
where time<=100
group by B.agegroup
having time=max(time))
and a.agegroup=b.agegroup
因为如果不加这个条件,proc sql inner join 就会变成 Cartesian product join。
自然会影响你的结果。
w*****r
发帖数: 92
3
来自主题: Statistics版 - 请教一个SAS code
想从表格B中引用rate值到表格A里算个统计函数。Agegroup两个表格里都有,其他的变
量(除了rate)都在A里。
这是我的code,总说ERROR: Subquery evaluated to more than one row.可是有的时候
code就work.难道group by不能叠用?
proc sql;
create table CALC as
select B.agegroup, level, mean(rate*year)
from A, B
where rate=
(select rate from B
where time<=100
group by B.agegroup
having time=max(time))
group by B.agegroup, level;
quit;
谢谢!!
c****y
发帖数: 94
4
来自主题: Statistics版 - 请教大家个问题
proc glm data=upsit;
class agegroup;
model smell = agegroup;
means agegroup / hovtest=LEVENE;
run;
mean 不太关心underline distribution. 比较的时候只用考虑unequal variance.用
proc glm 的Levene's test 可以比较variance, 这个test 也算比较robust to
different from normal distribution 了。
l****u
发帖数: 529
5
来自主题: Statistics版 - 请教一个SAS code
where rate=(select rate
from b
where time<=100
group by B.agegroup
having time=max(time))
and b.agegroup=a.agegroup
d*******o
发帖数: 493
6
来自主题: Statistics版 - 请教SAS高手一个具体的问题
proc sgplot data=one;
reg x=Year_dx y=cancer /group=agegroup;
series x=Year_dx y=cancer /group=agegroup;
run;
z*********i
发帖数: 146
7
来自主题: Statistics版 - 请教关于SAS表格输出的问题
data sample:
RCPT_ULI final_pcn our_doc1 GENDER_USE AGE_10 zone level agegroup
111111110 . . . .
111112090 . M 50.41 1 6
111112151 . . . .
111112231 13 F685640 M 52.34 Ed 1 6
111112330 24 F035580 F 39.62 ... 阅读全帖
n***l
发帖数: 27
8
来自主题: Statistics版 - R问题请教
Patient_ID RAF Gender AgeGroup
1 0.5 F 7079
2 0.4 F 6069
3 0.3 M 7079
4 0.6 M 8090
5 0.7 M 7079
我可以用R的出总体的linear model的值,
summary(lm(raf~gender))
summary(lm(raf~p_age_group))
可现在的问题是: 我要如何给每个病人分配一个regression值来做预测呢,像下面的
样子
Patient_ID RAF Gender AgeGroup Regression
1 0.5 F 7079 0.2
2 0.4 F 6069 0.15
3 0.3 M 7079 0.3
4 0.6 M 8090 0.25
5 ... 阅读全帖

发帖数: 1
9
2013 年,美国当时的总统奥巴马为了推动控枪法案,下令美国疾病控制中心(Center
for Disease Control—CDC)进行一项有关美国枪支暴力和犯罪的研究(“Priorities
For Research to Reduce the Threat of Firearm-Related Violence”),同时拨款
1千万美元。当时媒体一片欢呼,认为是控枪进程的一个里程碑。研究报告发布以后,
政府和媒体全部沉默,没有人再提,这个耗费巨资写成的报告被束之高阁。为什么?因
为研究的结果和奥巴马以及媒体预料的完全相反。这个报告在拉斯维加斯枪案后被人找
了出来,我把研究总结翻译成中文给大家看看。总结的英文原文附在中文之后。
我认为这个CDC的研究数据是准确的,结论是公正的,尤其是在当时控枪呼声很高,从
民间到总统都支持控枪。 CDC能够给出这个研究结论体现了研究结果的公正。
原文链接:
http://www.cnsnews.com/blog/craig-bannister/obama-study-concluded-firearms-
used-self-defense-im... 阅读全帖
Q*********0
发帖数: 374
n**d
发帖数: 164
11
长期潜水,在这个版上得到无数的tips和motivation, 受益良多
写个汇报, 希望对和我一样第一次半马的菜鸟有所帮助,
也算是回报社会. 文笔不好, 大家凑活着看吧。
先说成绩1:42:08, overall 80名的样子, agegroup 14
再说说训练情况, 大约准备了两个月,
大致是按照Hal Higdon的intermediate的训练plan
(我一懒人, 就省略了很多weekday的tempo)
http://www.halhigdon.com/halfmarathon/inter.htm
一个月前跑了个local 10k算是tune up
http://www.mitbbs.com/article/Running/31236265_4.html
然后接下来的两周就放羊了, 只是周末象征性的跑个8, 9迈的long run
大约两周前觉得不上量不行了,
加上听版上某名id说,比赛前一定要跑一个13long run,
于是两周前试了一下一个半马,大约1:46分的样子
(测试时自己不sure能跑完, 所以前6迈尽量压低速度,大约8分半的pace
后半程sub-8的p
m**k
发帖数: 18660
12
来自主题: Running版 - 也来汇报第一次10K
zan agegroup winner.有那medal没。现在潜水员真多啊。hoho.
m**k
发帖数: 18660
13
来自主题: Running版 - 人生第一次10k破处
啊,他不是和鸵鸟一个agegroup?
s*********1
发帖数: 2
14
建议你新建一个表,加一个AgeGroup的column,insert,select,会比update快一些,
然后用新表replace旧表吧。
d*******o
发帖数: 493
15
来自主题: Statistics版 - 请教SAS高手一个具体的问题
proc sgplot data=one;
reg x=Year_dx y=cancer /group=agegroup;
run;
w**********a
发帖数: 10
16
来自主题: Statistics版 - 请教一个SAS code
error说的挺明白的吧,你先看看
select rate from B
where time<=100
group by B.agegroup
having time=max(time)
的结果是不是不只一行,如果多行就出错了吧
w*****r
发帖数: 92
17
来自主题: Statistics版 - 请教一个SAS code
如果只有一个结果就不用group by了,但后面加了group by agegroup, level等于分类
带入rate还是不行。难道这种情况只能分开写SQL code了?
l****u
发帖数: 529
18
来自主题: Statistics版 - 请教一个SAS code
sorry, this one should work.
where rate in (select rate
from b
where time<=100
group by B.agegroup
having time=max(time))

k*******n
发帖数: 567
19
来自主题: Tri版 - Getting Started in Triathlon
http://www.triathlon.org/agegroup/gettingstarted/
Getting Started in Triathlon
Triathlon is an exciting multi-discipline sport involving a continuous race
over various distances in the three disciplines of swimming, cycling, and
running. A standard triathlon is made up of a swim, followed by a cycle ride
, followed by a run.
Competitors race against the clock, which starts as they enter the swim and
stops as they cross the finish line after the run.
For this reason, triathlon is often reported a... 阅读全帖
(共0页)