[英]How can you extract T-values from a multiple regression to put them in a vector in R?
When running a multiple regression, as shown here (data is from the 2014 and 2015 NHL seasons and is being used to predict wins): 进行多元回归时,如下所示(数据来自2014和2015 NHL赛季,并用于预测获胜次数):
TwoPredictorModel<-lm(Wins~Time.Shorthanded+Shots.per.Game, data=dat)
summary(TwoPredictorModel)
And yields the following outcome: 并产生以下结果:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -18.042277 18.056039 -0.999 0.321903
Time.Shorthanded 0.009883 0.035455 0.279 0.781450
Shots.per.Game 1.889582 0.469588 4.024 0.000171
How can I extract the T-values in R to put them into a vector? 如何提取R中的T值并将其放入向量中?
将其拉出摘要,例如
summary(lm(mpg~wt+hp, mtcars))$coefficients[,"t value"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.