How to interpret linear model 3 way interaction and random effect

,

I tried to read over below article but don't understand, anybody shade me a light?
UNDERSTANDING 3-WAY INTERACTIONS BETWEEN CONTINUOUS VARIABLES

R LME4 mixed models with nesting and nesting-interactions

Above question asked about nested interaction model, I do appreciate if somebody shade me a light.

your first post is ideas on how to graph fitted models of a certain type.
your second post is about how to construct a particular model.

I think you would have higher likelihood of being supported here, if you ask a very specific question. Try to be clear on whether you have an R question, or a statistics question...

General requests to be supported in understanding large open-ended topics are unlikely to be successful in garnering help.

Result <- lmer(Y ~ X*Z*W+(1|PPX)+I(X*Z*W)^2+I(X*Z*W)^3,data=Matrix)

From bove example, I don't know how to interpret above model?

How to calculate X value, Z value and W value in R?

You should study the lmer formula syntax
https://benwhalley.github.io/just-enough-r/fitting-models.html

Your second question doesn't make sense so I can't answer it the way you asked it. You should be aware that X Z W are symbols representing the variables containing training data for the model to be fit on

Result <- lm(Y ~ X * Z * W, data = Matrix)

How to interpret above model, calculate X value and Z value and W value in R?

if you repeat yourself I also can repeat myself. but its not a very fun game....

in a normal lm()
the * syntax means to have the variable and also its interaction with the other variable in the model
so X*Z is equivalent to X + Z + X:Z

X and Z and W values are not something that one would calculate ....

Update model : 3-way interaction terms not dropped there is an example for 3-way interaction terms with polynomial models, may I know how to interpret it?

you want to understand a model on data you dont know over a modelling context you dont know, and also the model is incorrect as it was based on a users syntax error ?

I'm sorry but I won't touch this.

https://stats.stackexchange.com/a/373259/68357 is an example, I kust wonder if I have lm()...

Below is another example

>> x <- lm(mpg ~ cyl * disp * hp * drat, mtcars)
>> summary(x)
> 
> Call:
> lm(formula = mpg ~ cyl * disp * hp * drat, data = mtcars)
> 
> Residuals:
>    Min      1Q  Median      3Q     Max
> -3.5725 -0.6603  0.0108  1.1017  2.6956
> 
> Coefficients:
>                   Estimate Std. Error t value Pr(>|t|)
> (Intercept)       1.070e+03  3.856e+02   2.776  0.01350 *
> cyl              -2.084e+02  7.196e+01  -2.896  0.01052 *
> disp             -6.760e+00  3.700e+00  -1.827  0.08642 .
> hp               -9.302e+00  3.295e+00  -2.823  0.01225 *
> drat             -2.824e+02  1.073e+02  -2.633  0.01809 *
> cyl:disp          1.065e+00  5.034e-01   2.116  0.05038 .
> cyl:hp            1.587e+00  5.296e-01   2.996  0.00855 **
> disp:hp           7.422e-02  3.461e-02   2.145  0.04769 *
> cyl:drat          5.652e+01  2.036e+01   2.776  0.01350 *
> disp:drat         1.824e+00  1.011e+00   1.805  0.08990 .
> hp:drat           2.600e+00  9.226e-01   2.819  0.01236 *
> cyl:disp:hp      -1.050e-02  4.518e-03  -2.323  0.03368 *
> cyl:disp:drat    -2.884e-01  1.392e-01  -2.071  0.05484 .
> cyl:hp:drat      -4.428e-01  1.504e-01  -2.945  0.00950 **
> disp:hp:drat     -2.070e-02  9.568e-03  -2.163  0.04600 *
> cyl:disp:hp:drat  2.923e-03  1.254e-03   2.331  0.03317 *
> ---
> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> 
> Residual standard error: 2.245 on 16 degrees of freedom
> Multiple R-squared: 0.9284,	Adjusted R-squared: 0.8612
> F-statistic: 13.83 on 15 and 16 DF,  p-value: 2.007e-06

Source : https://stat.ethz.ch/pipermail/r-help/2013-April/351761.html

mpg is y, may I know below calculation if correct?

  • cyl = cyl
  • disp = disp + cyl:disph + cyl:disp:hp + cyl:disp:drat + cyl:disp:hp:drat
  • hp = hp + cyl:hp + cyl:disp:hp +disp:hp:drat + cyl:disp:hp:drat
  • drat = drat + hp:drat + cyl:disp:drat + disp:hp:drat + cyl:disp:hp:drat

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.