1
$\begingroup$

I have a dataset with biomass, dbh, height, wood density, site, and species. As data were not normally distributed, I converted biomass, dbh and wd using the log() function. Then I developed a linear mixed model using the lmer() function in R Studio. I kept biomass as the response variable and the remaining other parameters as the fixed and random effects as shown below:

lmer(B~D + H + WD +(1|species) + (1|site)

Now, the problem I am facing is how to back-transform the model in order to calculate the bias and correction factor. In linear regression, we can back-transform by using exp(), but in my case, I don't have any idea. I went into lots of tutorials but these tutorials cannot solve my problem. Additionally, how do I perform train/test splits and cross-validation on my lmer model using caret()?

This is the first time I am developing a model and I am not from a statistics background. Can anyone please help me out?

$\endgroup$
2
  • $\begingroup$ As an extension of linear regression, linear mixed models only integrate additional random effects in the variance component estimation. If your question is to back transform fixed effects you can do that as you did in linear regression. However, it is worth noting that in practice, we are not very interested in the distribution of the outcome but more the residuals (and the random effects here). So probably a log transform is not necessary. Check your assumptions. I would surely provide a comprehensive answer if needed. $\endgroup$ Commented Jun 28, 2023 at 11:51
  • $\begingroup$ Instead of transforming the inputs to the model, try using the log link function when running the model. $\endgroup$
    – user78229
    Commented Jun 28, 2023 at 12:34

1 Answer 1

0
$\begingroup$

Welcome to the site.

First, linear models don't require that the data be normally distributed. Some models make assumptions about the error and, since we can't know the error, we look at the residuals.

Second, even if the residuals aren't normally distributed, these days, there are models that make fewer assumptions. Some of these are old, but computer intensive and didn't become practical until there were fast computers.

So, don't transform the data unless you have a substantive reason for doing so. That is, do it when you want to look at variables multiplicatively rather than additively (this often happens with variables related to money).

There are a bunch of nonlinear mixed models. Without knowing more about your goals, I'm not sure which is best, but one possibility is a quantile model, which is available in R with the lqmm package.

$\endgroup$
3
  • $\begingroup$ So that means that I can continue further without back-transforming the outcome. And will you please help me out with the model validation part? @Mangnier Loïc $\endgroup$
    – Drishant
    Commented Jun 28, 2023 at 13:25
  • $\begingroup$ Thank you for your suggestion. I will try to do it in that manner also @ Mike Hunter $\endgroup$
    – Drishant
    Commented Jun 28, 2023 at 13:27
  • $\begingroup$ The main objective of my work is to develop an allometric model for a particular forest. @Peter Flom $\endgroup$
    – Drishant
    Commented Jun 28, 2023 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.