Skip to content
Prev 362482 / 398498 Next

[FORGED] Regression with factors ?

I also tested whether "nesting" the I( ) calls would succeed in giving you any results from what I thought was a rather odd  construction
Call:
lm(formula = y ~ I((p1ab - p2ab)^2), data = observed_data)

Coefficients:
       (Intercept)  I((p1ab - p2ab)^2)  
             1.506              -1.435
Call:
lm(formula = y ~ I(1 - I((p1ab - p2ab)^2)), data = observed_data)

Coefficients:
              (Intercept)  I(1 - I((p1ab - p2ab)^2))  
                  0.07062                    1.43527  


The sign of the "interaction term" just gets reversed. I don't see that any offset term got calculated for the "1" term. Offsets can be included but I think this particular form where you are asking for two different coefficients, they might not be separable in the linear model framework.