Skip to content
Prev 27752 / 398498 Next

testing slope

Hi all,

I try to test a linear slope using offset.

I have:
Call:
glm(formula = Y ~ X * V)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-2.01688  -0.56028   0.05224   0.53213   3.60216  

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.3673     0.8476   1.613 0.119788    
X             4.0235     0.1366  29.453  < 2e-16 ***
Vn2           0.9683     1.1987   0.808 0.427131    
Vn3           4.6043     1.1987   3.841 0.000787 ***
X:Vn2         4.1108     0.1932  21.279  < 2e-16 ***
X:Vn3        -4.0069     0.1932 -20.740  < 2e-16 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 

(Dispersion parameter for gaussian family taken to be 1.53955)

    Null deviance: 15303.977  on 29  degrees of freedom
Residual deviance:    36.949  on 24  degrees of freedom
AIC: 105.39

Number of Fisher Scoring iterations: 2

It is clear that X slope is diferent of Zero.
X             4.0235     0.1366  29.453  < 2e-16 ***

It is too clear that X:Vn2's slope is diferent of X's slope and diferent of 
Zero, because is greater than X'slope.
X:Vn2         4.1108     0.1932  21.279  < 2e-16 ***

But, the X:Vn3' slope is different of X'slope, but not necessarily different 
of Zero.

How I make to introduce this parameter in a new model for test? An offset only 
with Vn3 slope???

I try:

m2 <- glm(Y~V*offset(0*X))
m2 <- glm(Y~X*V+V*offset(0*X))
m2 <- glm(Y~V:X+V*offset(0*X))

but neither work :((

Thanks for all.
Ronaldo