由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - split numbers evenly
相关主题
ANOVA and multiple comparasionsplit-plot菜问题
这个问题怎么可用一个test测出来请教两道BASE题,关于if then的
请教个基本的统计问题求助关于似然比检验
市场统计问题,sales/KBase 123 中的问题(已考古,没有历史资料)
请教一个two sample t test 的 问题R一问
how to calculate the SD or SEM of ratios?[求教] Classfication and regression tree in SAS
A question in splitting dataset怎样用R subset character string
Categorical Analysis - 2x3 Table 中能否进行两两比较which route in SAS is faster?
相关话题的讨论汇总
话题: numbers话题: evenly话题: group1话题: 99话题: groups
进入Statistics版参与讨论
1 (共1页)
G***G
发帖数: 16778
1
given a set of numbers, such as {1,3,8,100,200,4,3,2,5,...}
the totoal number of the numbers is 99.
how to evenly divide the set into three groups?
is there any package in R that can achieve this?
w*******9
发帖数: 1433
2
Split based on what criterion?
k*******a
发帖数: 772
3
先把 1:99分3组,假设你要的是随机分组
group1<-sample(1:99,33)
group2<-sample((1:99)[-group1],33)
group3<-(1:99)[-c(group1,group2)]
于是,如果你的data是x, 99长度的vector
那么三组就是
x[group1]
x[group2]
x[group3]

【在 G***G 的大作中提到】
: given a set of numbers, such as {1,3,8,100,200,4,3,2,5,...}
: the totoal number of the numbers is 99.
: how to evenly divide the set into three groups?
: is there any package in R that can achieve this?

D******n
发帖数: 2836
4
y not this
idx <- sample(1:99);
1) x[idx[1:33]]
2) x[idx[34:66]]
3) ...

【在 k*******a 的大作中提到】
: 先把 1:99分3组,假设你要的是随机分组
: group1<-sample(1:99,33)
: group2<-sample((1:99)[-group1],33)
: group3<-(1:99)[-c(group1,group2)]
: 于是,如果你的data是x, 99长度的vector
: 那么三组就是
: x[group1]
: x[group2]
: x[group3]

G***G
发帖数: 16778
5
I may not explain it clearly.
divide the 99 number into three groups and let the three groups with no
significant differnce.
this may be difficult. let us do splitting into two groups first.
10000 numbers divided evenly into two groups.
group1={x1,x2,...x5000}
group2={x5001,x5002,x10000}
the pvalue of significant differnce between group1 and group2 must be
maximum,
which means no significant difference.

【在 D******n 的大作中提到】
: y not this
: idx <- sample(1:99);
: 1) x[idx[1:33]]
: 2) x[idx[34:66]]
: 3) ...

k*******a
发帖数: 772
6
you can try permutation then

【在 G***G 的大作中提到】
: I may not explain it clearly.
: divide the 99 number into three groups and let the three groups with no
: significant differnce.
: this may be difficult. let us do splitting into two groups first.
: 10000 numbers divided evenly into two groups.
: group1={x1,x2,...x5000}
: group2={x5001,x5002,x10000}
: the pvalue of significant differnce between group1 and group2 must be
: maximum,
: which means no significant difference.

G***G
发帖数: 16778
7
combination(10000,5000)/2 times?

【在 k*******a 的大作中提到】
: you can try permutation then
1 (共1页)
进入Statistics版参与讨论
相关主题
which route in SAS is faster?请教一个two sample t test 的 问题
问题请教how to calculate the SD or SEM of ratios?
ADV SAS 63题中的第23题A question in splitting dataset
问一个R的问题Categorical Analysis - 2x3 Table 中能否进行两两比较
ANOVA and multiple comparasionsplit-plot菜问题
这个问题怎么可用一个test测出来请教两道BASE题,关于if then的
请教个基本的统计问题求助关于似然比检验
市场统计问题,sales/KBase 123 中的问题(已考古,没有历史资料)
相关话题的讨论汇总
话题: numbers话题: evenly话题: group1话题: 99话题: groups