由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - help for sas code
相关主题
help:data manipulationSAS问题求教
请教一个PROC MIXED做REPEATED MEASUREMENT问题请教一个proc transpose的问题
弱问一个data clean的问题,求各位指点。关于SAS里面 PROC MODEL 的output,急!!
help for SAS codey = a + b * (c ^ x)
mixed model questionSAS问题求助
sas help, how to manipulating on the format value[SAS] number of missing values for character vars
Help! proc sql;cout not null value.请教一道sas 题
请教一sas codeHow to use Proc format
相关话题的讨论汇总
话题: visit话题: value话题: following话题: two
进入Statistics版参与讨论
1 (共1页)
a********a
发帖数: 346
1
I have a dataset - one like the following, I already sorted by id visit value,
one:
id visit value
1 0 8.4
1 0 3
1 0 2
2 0 5
2 0 2
2 1 3
2 2 4
2 2 2
2 3 5

I want to get a data set -two like the following,i.e. I only selected the
obersavation for the visit with the largest value. The other duplicate
visits are deleted.
two
id visit value
1 0 8.4
2 0 5
2 1 3
2 2 4
2 3 5
I did not figure out
p********a
发帖数: 5352
2
这个用PROC SQL就行了
select id, visit,max(value) as value from xxx
group by id,visit
或者用DATA STEP的FIRST.VAR,复杂些
l***a
发帖数: 12410
3
data b;
set a;
by id visit;
if first.visit;
run;

value,

【在 a********a 的大作中提到】
: I have a dataset - one like the following, I already sorted by id visit value,
: one:
: id visit value
: 1 0 8.4
: 1 0 3
: 1 0 2
: 2 0 5
: 2 0 2
: 2 1 3
: 2 2 4

a********a
发帖数: 346
4
You guys are the best. Thanks.
1 (共1页)
进入Statistics版参与讨论
相关主题
How to use Proc formatmixed model question
问个sas问题sas help, how to manipulating on the format value
请教一个SAS问题Help! proc sql;cout not null value.
大牛请进,问个sas问题请教一sas code
help:data manipulationSAS问题求教
请教一个PROC MIXED做REPEATED MEASUREMENT问题请教一个proc transpose的问题
弱问一个data clean的问题,求各位指点。关于SAS里面 PROC MODEL 的output,急!!
help for SAS codey = a + b * (c ^ x)
相关话题的讨论汇总
话题: visit话题: value话题: following话题: two