由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - Dashagen请进
相关主题
如何把model fitting statistics 读出来(R)[R]how to sample all possible continuous subset from ordered data
How can I do this in R?求问一个R apply 函数的问题
R问题请教。【急】一个基本的R的问题,求助。谢谢!大包子答谢
请问R里apply和sapply有什么区别[R]有没有函数:根据字典翻译一个向量
问个R里面avoid for loop的问题(sapply,lapply...)Generate and Retrieve Many Objects with Sequential Names
【欢迎进来讨论】for loop in RDifferent results from SAS R and Fortran
问个R的问题关于在R中run SVM的问题
R一问一般的统计仿真实验和monte carlo simulation是一回事吗?
相关话题的讨论汇总
话题: result话题: fs话题: summary话题: names话题: lm
进入Statistics版参与讨论
1 (共1页)
d*******1
发帖数: 854
1
我以前问的那个问题,你建议用如下的function把p value 拿出来,
res<- sapply(result, function(x)
{fs<- summary(x)$fstatistic;pf(fs[1],fs[2],fs[3],lower
.tail=F)}
)
但是我现在还想把least square mean of difference between treatment and
control拿出来, 但是不知道用什么命令。我试图用str(result)弄清result的结构,
但是没有看到fstatistic这个component.....
请指教。
s*r
发帖数: 2757
2
100wb
D******n
发帖数: 2836
3
names(summary(x))

lower


【在 d*******1 的大作中提到】
: 我以前问的那个问题,你建议用如下的function把p value 拿出来,
: res<- sapply(result, function(x)
: {fs<- summary(x)$fstatistic;pf(fs[1],fs[2],fs[3],lower
: .tail=F)}
: )
: 但是我现在还想把least square mean of difference between treatment and
: control拿出来, 但是不知道用什么命令。我试图用str(result)弄清result的结构,
: 但是没有看到fstatistic这个component.....
: 请指教。

d*******1
发帖数: 854
4
50怎么样? 还有一笔帐要还, 所以囊中羞涩了, 呵呵

【在 s*r 的大作中提到】
: 100wb
D******n
发帖数: 2836
5
SIR must earn a lot.....

【在 s*r 的大作中提到】
: 100wb
s*r
发帖数: 2757
6
ok, given my negative answer
the idea of least square mean is probably SAS's invention. the R community
probably dislikes the concept. for example:
http://tolstoy.newcastle.edu.au/R/help/05/09/12613.html

【在 d*******1 的大作中提到】
: 50怎么样? 还有一笔帐要还, 所以囊中羞涩了, 呵呵
s*r
发帖数: 2757
7
i spent a lot

【在 D******n 的大作中提到】
: SIR must earn a lot.....
d*******1
发帖数: 854
8
> names(summary(result))
NULL
> names(summary(res))
[1] "Min." "1st Qu." "Median" "Mean" "3rd Qu." "Max."
还是没有看到类似于fstatistic, coefficient和estimate之类的重要东东啊?

【在 D******n 的大作中提到】
: names(summary(x))
:
: lower
: ,

d*******1
发帖数: 854
9
I cannot care less about least square mean. however, what i do care is how
to parse out the important statistics (like parameter estimation, standard
deviation of parameter, variance-covariance matrix etc.) from the result of
lm(). howeve, it seem really difficult for me to get hold of the structure
of object that storing statistics. even str() and names() do not help a
whole lot here.
can you provide any insight?
thanks

【在 s*r 的大作中提到】
: ok, given my negative answer
: the idea of least square mean is probably SAS's invention. the R community
: probably dislikes the concept. for example:
: http://tolstoy.newcastle.edu.au/R/help/05/09/12613.html

s*r
发帖数: 2757
10
names should be helpful.

of

【在 d*******1 的大作中提到】
: I cannot care less about least square mean. however, what i do care is how
: to parse out the important statistics (like parameter estimation, standard
: deviation of parameter, variance-covariance matrix etc.) from the result of
: lm(). howeve, it seem really difficult for me to get hold of the structure
: of object that storing statistics. even str() and names() do not help a
: whole lot here.
: can you provide any insight?
: thanks

相关主题
【欢迎进来讨论】for loop in R[R]how to sample all possible continuous subset from ordered data
问个R的问题求问一个R apply 函数的问题
R一问【急】一个基本的R的问题,求助。谢谢!大包子答谢
进入Statistics版参与讨论
s*r
发帖数: 2757
11
if 'res' is a vector, you will get
if 'res' is other types of object, the output of names(summary()) will be
different.
the following section is from the help for function lm
"Value
lm returns an object of class "lm" or for multiple responses of class c("mlm
", "lm").
The functions summary and anova are used to obtain and print a summary and
analysis of variance table of the results. The generic accessor functions
coefficients, effects, fitted.values and residuals extract various useful
features
d*******1
发帖数: 854
12
ok, here is what i am doing:
result<- lapply(split(all,all$CHIPEXP_NAME),function(x) lm(logvalue~
treatment,x))
用lapply拿到result(是个 vector)
再用:
res<- sapply(result, function(x)
{fs<- summary(x)$fstatistic;pf(fs[1],fs[2],fs[3],lower
.tail=F)}
)
拿到每个by variable 的 p value, 我的问题是怎样拿到其他stat呢?比如parameter
estimtate, parameter stderr, degree of freedom.....etc? 如何看到result 的结
构呢?
用names(result)只是得到所有by variable的值, 因为我这个result是由lapply产生
的一个vector, 每个by varaible的值都成了colum

【在 s*r 的大作中提到】
: names should be helpful.
:
: of

D******n
发帖数: 2836
13
names(result[[1]])
names(summary(result[[1]]))

lower
parameter

【在 d*******1 的大作中提到】
: ok, here is what i am doing:
: result<- lapply(split(all,all$CHIPEXP_NAME),function(x) lm(logvalue~
: treatment,x))
: 用lapply拿到result(是个 vector)
: 再用:
: res<- sapply(result, function(x)
: {fs<- summary(x)$fstatistic;pf(fs[1],fs[2],fs[3],lower
: .tail=F)}
: )
: 拿到每个by variable 的 p value, 我的问题是怎样拿到其他stat呢?比如parameter

D******n
发帖数: 2836
14
result is a list,
result[[i]] is its ith element , which is a lm type data structure and basic
ally a list.

lower
parameter

【在 d*******1 的大作中提到】
: ok, here is what i am doing:
: result<- lapply(split(all,all$CHIPEXP_NAME),function(x) lm(logvalue~
: treatment,x))
: 用lapply拿到result(是个 vector)
: 再用:
: res<- sapply(result, function(x)
: {fs<- summary(x)$fstatistic;pf(fs[1],fs[2],fs[3],lower
: .tail=F)}
: )
: 拿到每个by variable 的 p value, 我的问题是怎样拿到其他stat呢?比如parameter

d*******1
发帖数: 854
15
太感谢了, 大大有帮助, 那 result[1]又是什么呢

basic

【在 D******n 的大作中提到】
: result is a list,
: result[[i]] is its ith element , which is a lm type data structure and basic
: ally a list.
:
: lower
: parameter

1 (共1页)
进入Statistics版参与讨论
相关主题
一般的统计仿真实验和monte carlo simulation是一回事吗?问个R里面avoid for loop的问题(sapply,lapply...)
[请教] 如何用SAS求解2个parameter满足2个方程【欢迎进来讨论】for loop in R
在线急等:做maximum likelihood estimation,用optimization怎么都的不出正确的数值问个R的问题
请问如何在R中写recursive function?R一问
如何把model fitting statistics 读出来(R)[R]how to sample all possible continuous subset from ordered data
How can I do this in R?求问一个R apply 函数的问题
R问题请教。【急】一个基本的R的问题,求助。谢谢!大包子答谢
请问R里apply和sapply有什么区别[R]有没有函数:根据字典翻译一个向量
相关话题的讨论汇总
话题: result话题: fs话题: summary话题: names话题: lm