由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 请教一个R问题
相关主题
How to the macro regression with if?a question
问个regression with dummy的问题[合集] passing-bablok and deming regression
sample size vs. number of regressorsSAS Regression Macro 问题请教 (有包子)
请教一个问题A question on one-step vs. Two-step regression
R-help,求救R里面两个关于ARIMA的问题求助,怎么消除线性回归的multicollinearity
regression problem - go confused很惭愧的问一个简单的regression algebra.
紧急求助,问到MULTIPLE REGRESSION的题包子请问保险公司里的Predictive Modeling具体干什么
请教牛人们关于time series 的 linear regression 问题谁给说说marketing analysis主要做什么
相关话题的讨论汇总
话题: glm话题: suppose话题: work话题: here
进入Statistics版参与讨论
1 (共1页)
l****c
发帖数: 7
1
Suppose X is a n*p matrix, Y is 1*n vector. I want to fit a multiple
regression in R as:
glm(y~ x[,1] +x[,2] + ...+x[,p]) ( this is not work in R, since "..." is
not work)
Here p is pretty large, suppose 20, do I have to type all 20 variables. Is
there a simple way to write that in R?
I tried to use glm.fit in R as:
glm.fit(X, y)
But the coeffiecients is different from the glm(why).
Thanks!
D******n
发帖数: 2836
2
glm(y~.)

is
Is

【在 l****c 的大作中提到】
: Suppose X is a n*p matrix, Y is 1*n vector. I want to fit a multiple
: regression in R as:
: glm(y~ x[,1] +x[,2] + ...+x[,p]) ( this is not work in R, since "..." is
: not work)
: Here p is pretty large, suppose 20, do I have to type all 20 variables. Is
: there a simple way to write that in R?
: I tried to use glm.fit in R as:
: glm.fit(X, y)
: But the coeffiecients is different from the glm(why).
: Thanks!

l*********s
发帖数: 5409
3
An associated question: is there some short hand notation for specification
of ,say, all 2nd order interaction terms?

【在 D******n 的大作中提到】
: glm(y~.)
:
: is
: Is

l****c
发帖数: 7
4
I didn't get it.
R won't recognize y~. in regression model.

【在 D******n 的大作中提到】
: glm(y~.)
:
: is
: Is

o****o
发帖数: 8077
5
难道不是
glm(y~x[,1:p])
么?

is
Is

【在 l****c 的大作中提到】
: I didn't get it.
: R won't recognize y~. in regression model.

l****c
发帖数: 7
6
Yeap!!!Thanks!

【在 o****o 的大作中提到】
: 难道不是
: glm(y~x[,1:p])
: 么?
:
: is
: Is

1 (共1页)
进入Statistics版参与讨论
相关主题
谁给说说marketing analysis主要做什么R-help,求救R里面两个关于ARIMA的问题
hotel booking model分析regression problem - go confused
很困惑的一个regression的问题: x is calculated from y紧急求助,问到MULTIPLE REGRESSION的题
请教各位高人2个SAS作图的技巧性小问题,多谢多谢啦。请教牛人们关于time series 的 linear regression 问题
How to the macro regression with if?a question
问个regression with dummy的问题[合集] passing-bablok and deming regression
sample size vs. number of regressorsSAS Regression Macro 问题请教 (有包子)
请教一个问题A question on one-step vs. Two-step regression
相关话题的讨论汇总
话题: glm话题: suppose话题: work话题: here