Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
229 views
in Technique[技术] by (71.8m points)

quadratic - interpretation of estimates from poly function in r

i want to run a second-order polynomial regression where my dependent variable ("y") is a continuous variable while my independent variable ("comp") is a multivariate variable (including two variables). The sample data in the dependent variable, "comp", look like this;

               [,1]          [,2]
  [1,]  2.277968e-02 -0.0655286426
  [2,] -5.865487e-01 -0.1292127584
  [3,] -3.120342e-01 -0.2922297149
  [4,] .....................

i have been using 'poly' function in r to run such regression.

here is my code:

model <- lm(y~poly(comp,2, raw = TRUE)*factor(x1), data=test)
(aov.health=car::Anova(model,  test.statistic="F") )
summary(health)

when i run this model, i get this output;

> summary(model)

Call:
lm(formula = y ~ poly(comp, 2, raw = TRUE) * factor(x1), data = test)

                                         Estimate Std. Error t value Pr(>|t|)    
(Intercept)                               1.63428    0.08437  19.371   <2e-16 ***
poly(comp, 2, raw = TRUE)1.0             -0.38673    0.23435  -1.650   0.0994 .  
poly(comp, 2, raw = TRUE)2.0              0.89645    0.43803   2.047   0.0412 *  
poly(comp, 2, raw = TRUE)0.1             -0.13266    0.52954  -0.251   0.8023    
poly(comp, 2, raw = TRUE)1.1              0.80634    0.98185   0.821   0.4118    
poly(comp, 2, raw = TRUE)0.2              0.57313    1.45062   0.395   0.6929    
factor(x1)2                               0.12263    0.09484   1.293   0.1966    
poly(comp, 2, raw = TRUE)1.0:factor(x1)2  0.40963    0.25081   1.633   0.1030    
poly(comp, 2, raw = TRUE)2.0:factor(x1)2 -1.13142    0.46668  -2.424   0.0156 *  
poly(comp, 2, raw = TRUE)0.1:factor(x1)2 -0.45742    0.58463  -0.782   0.4343    
poly(comp, 2, raw = TRUE)1.1:factor(x1)2 -0.78708    1.08822  -0.723   0.4698    
poly(comp, 2, raw = TRUE)0.2:factor(x1)2 -2.59316    1.61733  -1.603   0.1094    
---

I am not sure if I understand the names of the estimates correctly and how do I interpret these numbers. if I have to write these in a mathematical formula for calculating these estimates, what would be those? can somebody help?

question from:https://stackoverflow.com/questions/65842233/interpretation-of-estimates-from-poly-function-in-r

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...