由买买提看人间百态

topics

全部话题 - 话题: dat1
(共0页)
D******n
发帖数: 2836
1
来自主题: Database版 - Which way is better for creating such flag
== Method 1==
select
dat1.*,
case
when id in (select id from dat2) then 1
else 0
end as b_flag
from
dat1
;
== Method 2===
select
dat1.*,
(dat2.id is not null) as b_flag
from
dat1
left join
dat2
on
dat1.id=dat2.id
;
which way is faster?
k***g
发帖数: 7244
2
来自主题: Faculty版 - SPSS 问题求助
R 是一个免费开源的统计软件,一般搞统计或者计量的用的很多,因为很灵活,网站是
http://www.r-project.org/
直接下载 windows 版本安装就可以了,然后运行下面的 code:
install.packages("foreign")
#安装 foreign library
library(foreign)
#加载 foreign 这个library
dat1<-read.spss("path/file")
#读入你的 SPSS 数据,暂时命名为 dat1
write.csv(dat1, file="path/file.csv")
#把 dat1 写成 csv 格式数据
这样就可以了,不需要太多 R 的知识
W******i
发帖数: 2001
3
Does leadership run in your family? According to a recent study from Kansas
State University, that might just be the case. The team found that a certain
dopamine transporter gene can have both positive and negative effects on
leadership in the workplace. So depending on whether or not you inherited it
may give insight into if you’re likely to rise high in business, Medical
Daily reports.
The allele is known as DAT1, and according to the study, now published The
Leadership Quaterly, inheriting it... 阅读全帖
o******6
发帖数: 538
4
来自主题: Statistics版 - [合集] How to do %eval(1.5+0.1) in macro.
☆─────────────────────────────────────☆
careerchange (Stupid) 于 (Thu Mar 19 11:19:58 2009) 提到:
In a macro, it seems that %eval(1+2) is fine, but
not %eval(1.5+0.1). How to get 1.6 from 1.5+0.1
in macro (not in data step)? Thanks.
☆─────────────────────────────────────☆
careerchange (Stupid) 于 (Thu Mar 19 11:26:35 2009) 提到:
An example is as following. The first call of %dat1 works.
How to make the second call work?
%macro dat1(num);
data one;
x=&num.;
run;
proc print data=one; run;
%m
d*******8
发帖数: 321
5
来自主题: Statistics版 - sas 简单问题
业余时间学了些SAS,有些简单问题向大家请教。
我有很多SAS DATA 文件,dat1, dat2.... 这些文件结构相同。现在需要把这些文件转
换合并成一个SAS DATASET。最简单的方法就是:
data alldata;
set dat1 dat2.....;
run;
但是文件太多了, 我现在用一个文件(filenames)去记录所有文件名:
names
k*****u
发帖数: 1688
6
dir("c:\\surfreta")->dat1
# regular expression
grep("xyz", dat1, value=T)
D******n
发帖数: 2836
7
来自主题: Statistics版 - How to create in= flag using SQL
试了一下,sub query更快,
proc sql;
create table new2 as
select
dat1.*,
case
when id in (select id from dat2) then 1
else 0
end
as b_flag
from
dat1
;
quit;
b*********e
发帖数: 89
8
来自主题: Faculty版 - 有没有做基因的,genetyping求助
最近需要测定一些被试人群的几个特定基因的polymorphism,
包括5-httlpr,APOE, DAT1,DRD2,DRD4,COMT,MAO-A等常见与特定精神疾病有关联的基因
,总共不超过10个,因为预算有限,原来又没有做过,所以想先了解一下行情。
另外,目前从saliva测基因的技术可靠性和性价比如何,与测血样相比?
采血样的成本和人力的要求比较高,还有不少被试不愿意,
如果能从saliva测最好。
听说可以找公司根据需要定制专门测定特定一些基因SNP的KIT,这样贵不贵?
我们的人群也不大,不到1千人。
thanks for any advices.
b*********e
发帖数: 89
9
来自主题: Biology版 - genotype 的价格
最近需要测定一些被试人群的几个特定基因的polymorphism,
包括5-httlpr,APOE, DAT1,DRD2,DRD4,COMT,MAO-A等常见与特定精神疾病有关联的基因
,总共不超过10个,因为预算有限,原来又没有做过,所以想来了解一下行情。
另外,目前从saliva测基因的技术可靠性和性价比如何,与测血样相比?
采血样的成本和人力的要求比较高,还有不少被试不愿意,
如果能从saliva测最好。
thanks for any advices.
w******n
发帖数: 309
10
来自主题: Statistics版 - a question about mutiple files analysis
I have 100 files(from the simulation results), say dat1 ... dat100, for each
file, I would like to some analysis, for example, get the mean of each file
. Then I would like to save the analysis results into different files: say
mean1.txt .... mean100.txt. I know how to do for each file, however, I don't
know how to do the loop from file 1 to fil1 100.
thanks a lot1
S******y
发帖数: 1123
11
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
I have written some (Shell + SAS sysparm ) batch scripts to view my
SAS data set on Unix.
For example --
If I have a SAS data set called - mytestdat.sas7bdat
I will type the following command on Unix -
> see mytestdat
then I will automatically get a file called _see.lst, which contains
PROC CONTENTS and PROC PRINT (top ten records) output.
Following the same logic, I have developed a number of scripts -
> freq 'mytestdat|loss_year'
to see freq by loss_year variable
> summary 'mytestdat|loss_year... 阅读全帖
d*******o
发帖数: 493
12
来自主题: Statistics版 - 怎样检查俩个大的dataset一样
proc compare base=dat1 compare=dat2;
run;
f******9
发帖数: 267
13
来自主题: Statistics版 - R read many files
请教一个问题,In R, 如何同时 read in 1000 files,然后 assign 不同的名字 to
each file, dat1, dat2, ... , dat1000
这些 files, row length 一样,col length 不同,如何 cbind 这1000 files into a
single file?
D******n
发帖数: 2836
14
来自主题: Statistics版 - How to create in= flag using SQL
How to create b_flag as illustrated below using SQL?
data combined;
merge
dat1(in= _a)
dat2(in= _b)
;
by id;
if _a;
b_flag = _b;
run;
left join or sub-query?
y*****n
发帖数: 5016
15
来自主题: Statistics版 - How to create in= flag using SQL
select
b.id ne . as b_flag
from dat1 a left join dat2 b on a.id=b.id
(共0页)