作者bugle (低点)
看板Statistics
标题Re: [问题] 请问SAS合并重复测量资料的方法
时间Sat May 24 20:25:00 2008
data temp;
input no x y z test @@;
cards;
1 2 3 5 1 1 3 4 5 2 2 2 3 3 1 2 3 2 4 2 3 1 5 3 1 3 2 4 2 2
;
run;
proc sql;
create table temp2 as
select *
from
(select no,x,y,z from temp where test=1) as a,
(select no,x as x2,y as y2,z as z2 from temp where test=2) as b
where a.no = b.no
;
quit;
※ 引述《clj26 (clj26)》之铭言:
: 想请问如果有重复测量的资料如下:
: No X Y Z test
: 1 2 3 5 1
: 1 3 4 5 2
: 2 2 3 3 1
: 2 3 2 4 2
: 3 1 5 3 1
: 3 2 4 2 2
: .
: .
: .
: (No是每个人的编号,X Y Z是测量值,test是测量的次数编号)
: 请问要怎麽用SAS把两次测量的资料合并成一笔?
: 就是要将资料重整成下面的样子
: No X Y Z X2 Y2 Z2
: 1 2 3 5 3 4 5
: 2 2 3 3 3 2 4
: 3 1 5 3 2 4 2
: .
: .
: .
: (X2 Y2 Z2是第二次测量的值)
: 感激不尽!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.167.167.110
1F:推 clj26:谢谢您^^ 05/26 00:03