由买买提看人间百态

topics

全部话题 - 话题: dt1
(共0页)
j******o
发帖数: 127
1
来自主题: Statistics版 - SAS 编程问题 (有包子)
Try this.
data one;
input id dt1 : mmddyy10.;
format dt1 mmddyy10.;
datalines;
1 4/4/2000
1 4/7/2005
1 9/2/2002
2 3/1/2003
2 2/3/2006
3 5/5/2009
;
run;
data two;
input id dt2 : mmddyy10.;
format dt2 mmddyy10.;
datalines;
1 5/1/1999
1 1/1/2007
2 9/8/2002
2 10/1/2002
2 1/2/2006
;
run;
proc sql;
create table obtain as
select a.id, coalesce(a.dt1, b.dt1) as dt1 format mmddyy10., b.dt2
from one a left join
(
select one.*, ... 阅读全帖
h*********1
发帖数: 102
2
来自主题: Statistics版 - SAS 编程问题 (有包子)
data A;
input id dt1: mmddyy10.;
format dt1 mmddyy10.;
datalines;
1 4/4/2000
1 4/7/2005
1 9/2/2002
2 3/1/2003
2 2/3/2006
3 5/5/2009;
run;
data B;
input id dt2: mmddyy10.;
format dt2 mmddyy10.;
datalines;
1 5/1/1999
1 1/1/2007
2 9/8/2002
2 10/1/2002
2 1/2/2006;
run;
proc sql;
create table C as
select A.*, B.dt2
from A
left join B
on A.id=B.id and
(A.dt1 ge B.dt2 ge mdy(month(A.dt1),day(A.dt1),year(A.dt1)-1));
quit;
f*****9
发帖数: 6768
3
来自主题: Military版 - 绿卡上种类AS6是什么意思?
A11 Unmarried Amerasian son or daughter of a U.S. citizen born in Cambodia,
Korea, Laos, Thailand, or Vietnam. Sec. 203(a)(1) of the INA and 204(g) as
added by PL-97-359 (Oct. 22, 1982)- ((entered with IV))
A12 Child of an alien classified as A11 or A16. Sec. 203(d) of the INA and
204(g) as added by PL-97-359 (Oct. 22, 1982) – ((entered with IV))
A16 Unmarried Amerasian son or daughter of a U.S. citizen born in Cambodia,
Korea, Laos, Thailand, or Vietnam. Sec. 203(a)(1) of the INA and 204(g) as
... 阅读全帖
s*********e
发帖数: 1051
4
来自主题: Statistics版 - 从yahoo finance下载数据,R or Python?
#############################################
# READ STOCK PRICE FROM FINANCE.YAHOO.COM #
#############################################
import urllib
from dateutil.relativedelta import *
from datetime import *
def GetPrice(ticker, start, end):
stock = ticker.upper()
m1 = int(start.split("/")[0])
d1 = int(start.split("/")[1])
y1 = int(start.split("/")[2])
dt1 = date(y1, m1, d1) + relativedelta(months = -1);
a = dt1.month
b = dt1.day
c = dt1.year
m2 = int(end.split("/")[0])
d
c**t
发帖数: 2744
5
来自主题: DotNet版 - How to cancel DateTimePicker event?
There are two dateTimePickers on a winform, which requires dt2 > dt1;
if dt1 is picked greater than dt2, reset dt1 to dt2-1; but the messagebox
pops
out twice. How to disable the second one? ..EnableEvents seems not working
//The code is as follows.
private void dateTimePicker2_ValueChanged(object sender, EventArgs e)
{
if (this.dateTimePicker1.Value > this.dateTimePicker2.Value)
{
MessageBox.Show("This date should NOT be earlier then " +
this.dateTimeP
EA
发帖数: 3965
6
来自主题: Statistics版 - SAS 编程问题 (有包子)
我有两组数据,包括id 和 日期。他们都是一个id对应多个日期。我想把数据A当base,
left join 数据B,但是条件是,B的日期是在A的日期的前一年内。比如A日期是4/4/
2000,那如果B的日期在4/5/1999 - 4/4/2000,就保留。
A
id dt1
1 4/4/2000
1 4/7/2005
1 9/2/2002
2 3/1/2003
2 2/3/2006
3 5/5/2009
B
id dt2
1 5/1/1999
1 1/1/2007
2 9/8/2002
2 10/1/2002
2 1/2/2006
我希望得到C像这样。
id dt1 dt2
1 4/4/2000 5/1/1999
1 4/7/2005
1 9/2/2002
2 3/1/2003 9/8/2002
2 3/1/2003 10/1/2002
2 2/3/2006 1/2/2006
3 5/5/2009
s********a
发帖数: 154
7
来自主题: Statistics版 - 新手问个简单的sas问题
data dt1;
infile datalines;
input day $ x;
datalines;
1 0
1 0
1 0
2 0
2 1
2 1
2 0
2 0
3 1
3 0
;
run;
data dt2;
set dt1;
by day;
retain first_y;
if first.day then y = 0;
if x = 1 and y = 0 then do; y = 1; first_y = _N_; end;
if y gt 0 and first_y ne _n_ then y+1;
if last.day then output;
drop x first_y;
run;
h****s
发帖数: 16779
8
来自主题: Money版 - IHG和Hilton卡
在中国颇有一些cat低的店。 欧美几乎所有店cat都很高。
hilton点基本只适合中国用。
北京dt1万点,用钱要100-150美元。

北京一万点可以换一万吗?用钱买是多少钱一万的酒店啊?我怎么随便搜的一个小镇的
hilton inn都要40000点一晚啊($109)
d*******l
发帖数: 308
9
来自主题: Travel版 - 香港入境问题
小心啊!
香港入境,航空,陆路,水路盖章颜色不同,如果DT3次就入黑名单!
我有一次虽然有签证,但不想用,陆进水出,被DT1次,后来每次出入都问。
m*****r
发帖数: 4
10
来自主题: Computation版 - 求概率
Suppose T1,T2...Tn are i.i.d. nonnegative random variable with pdf f(t).
For two fixed positive value a and b, I have to compute the following
probability, could you plz give some suggestins? Thanks.
Pr(T1+T2+...Tn < a, T1 My solution:
Pr(T1+T2+...Tn < a, T1 \int_0^{b} f(t1) \int_0^{b} f(t2) ... \int_0^{a-t1-t2-...-t_{n-1}} f(tn) dtn
dt_{n-1} ...dt1
But it seems impossible to compute the integral.
(共0页)