data new;
set old;
time2=0;
array t {4} (3 7 10 11);
do i=1 to 4;
if t[i]
time2=t[i];
censor=0;
output;
end;
else if t[i]=time then do;
time2=time;
censor=1;
output;
end;
end;
keep patient_id time2 censor;
run;
You should modify like below (can be optimized to reduce loops to save time):
data obtain;
set have nobs=nobs;
TU24=0;
do i=1 to nobs;
set have (rename=(subject=subject2 time=time2 units=units2)) point=i;
if subject2=subject and abs(time2-time)/(60*60)<=24 then TU24=TU24+
units2;
end;
if TU24>5 then delete;
drop i subject2 time2 units2;
run;
47 subjects
每个subject测量了2次(time1 and time2),想知道这2次的测量值有没有difference
我知道最简单的就是跑个paired t test
问题的关键是这47个subjects的measure是在三个不同的地方采集的(采集的protocol还
不太一样),而且年龄,性别分布都不一样,
所以我能想到的是
Y=Y0+age+sex+site_index来remove掉 age/sex/site_index的影响
但是之后我就不知道怎么来比较time1 vs. time2
我之前想的是拿Y=Y0+age+sex+site_index这个fitting之后的residual值来
做paired t test,但是time1的fitting和time2的fitting不一样啊,能这么比较吗?
思路有点乱,哪位朋友帮忙理一下,谢谢
祝新年快乐!
If time1 and time2 are random effects, treatment*time1 and treatment*time2
should also be random effects. Then both of them should
be put in the random statement.
1. Most of the time you should not use Random and Repeated cards at the same
time.
2. You only need time1 and time2 in the Random card, not treatment*time1 and
treatment*time2.
3. You may want to specify the variance structure as well.
Link: http://bedeals.com/
Product Details
Motorola T325 Advanced In-Car Speakerphone
-Entry On/Exit Off
Automatically turns on when you get into your car and off when you get out.
-Universal Harmony
Connect our car kits to any compatible Bluetooth-enabled phone on the planet
- including Nokia, Samsung, LG, iPhone, Blackberry and more.
-Bing
Bing 411 is the fastest way to stay connected and get the information you
need when you're on the go-for free.
-Who's Calling
Audibly announces the names of ... 阅读全帖
9AT 66 lbs lighter, new SH AWD 19 lbs lighter.
发动机,变速箱,AWD,接近完美的家用车 http://hondanews.com/releases/2016-acura-mdx-specifications-fea http://www.vtec.net/news/news-item?news_item_id=1222143
Feb 3, 2015 - TORRANCE, Calif.
The significantly upgraded 2016 Acura MDX, America’s best-selling three-row
luxury SUV, launches next month with multiple new features and technologies
, a more advanced powertrain and an expanded model range. The enhanced 2016
MDX provides even more advanced technology and exhila... 阅读全帖
这个视频底下很多比较搞笑的评论
ilikethingsfromjapan2 months ago
i think the man who lives next door to me has one of these machines
===
pace Time2 months ago
How come there are no women working there? Is it because of sexism?
jz4156502 months ago
It's cause the blonde one got lost
Joshua m2 months ago
Were Men are men and women are women. Shit if women want to be equal I say
Okay I will stay home cook and clean. you go forge some steel. make sure to
keep them tits tucked in.
===... 阅读全帖
awstats doesn't track clickstream.
For example:
Visitor A:
[time1] page 1 (entry page)
[time2] page 2
...
[timeN] page N (exit page)
awstats only count how many entry pages and exit pages, no break down.
Do you know any of software to track the breakdown?
比如我把一个JSON的stream存在MongoDB
[{time1:value1},{time2:valu2}...]
CREATE TABLE json_test (
id serial primary time,
data jsonb
);
然后做
SELECT * FROM json_test WHERE Value>threhold?
这样的可以
OK,
let me ask the same question the other way around
Why the average interest rate over 2 years is the simple average of
short term rate over(time0, time1, time2)???
If I understand correctly, interest rate at time0 are from now till 1 year.
interest rate at time1 is from 1 year till 2 year.
So if I want to get the average interest rate over 2 years horizon, why
isnot it the
average of (r(time0)+t(time1))?
Hi,
I am using simulation to estimate the swaption value.
I have 500 unique paths of short rate over the next 10 years.
I am trying to use the Black model the valuate the 1 year into 1 year
european option.
In order to use the Black model, I need to figure out the Forward swap rate
volatility.
For each path, The forward swap rate can be backed from FSR(1, 2) = D(0, 1)
- D(0, 2)/Annuity(0, 1, 2).
Since I have short rate for time1, time2, so I can easily get the D(0,1)=EXP
(-AVG(r0, r1)*1). So I c
/*SET UP A RESULT DATASET*/
data result;
do id = 'a', 'b', 'c' ;
output;
end;
run;
/*SPECIFIC INTERVALS ARE ASSIGNED*/
%macro summary2(time1, time2, time3, time4);
%do i=1 %to 4;
proc sql;
create table result as
select a.*, b.first&&time&i
from result as a, (
select id, sum(sale) as first&&time&i
from test
where day le &&time... 阅读全帖
在以下dataset中,每个id在不同的星期可以重复参与不同的treatment(A或B),最后参
与的模式包括A,B, AB,AA,BB,ABB,AAB等等,同时每个id在同一个tr下分别在time1和
time2测量了一次.所以一个id可能有多个repeated measure.
我想建个mixed model比较tr对response的影响
proc mixed;
class id tr time;
model response=tr|time;
repeated /subject=id;
run;
程序无法运行,可能因为同一个id在同一个time有多个observation,这种情况怎么处理
呢?请大家支招,多谢!
dataset:
id week tr time response
01 1 A 1 xx
01 1 A 2 xx
01 2 A 1 xx
01 2 A 2 xx
01 3 B 1 xx
01 3 B 2 xx
02 1 ... 阅读全帖
If using mysql, we can use self-join.
id, time, num
id1 time1 1
id2 time2 1
id3 time3 1
SELECT DISTINCT (a.num) FROM table a JOIN table b ON a.num=b.num JOIN table
c ON a.num=c.num WHERE a.id-b.id = 1 and b.id-c.id=1