4
$\begingroup$

I have built a linear regression model with three predictor variables: the model predicts forest growth (y = stand volume) with stand age, stand basal area and site type (x1, x2 and x3 respectively). However, my goal is to predict the forest volume so that I only know the forest age and site type. Is there any way to make the prediction with the model when the stand basal area is unknown? I have also tried to build the model with only two predictor variables but it doesn't produce good values if the stand basal area is removed.

Do you have any tips? I couldn't find anything by googling except this: https://stackoverflow.com/questions/28528703/ols-predict-using-only-a-subset-of-explanatory-variables. It suggests setting the value of unused variable as 0.

EDIT: So I have already trained my model and then tested it with a testing dataset with the predict() function. BOTH, the training AND the testing data sets indeed contained the value for area. But I'm now confused when I would have to find the volume for a certain-aged forest (in a future) as I don't know the area of the forest for example after 50 years. Thus, I can not add it to the model as a predictor variable. I added this in case someone thought that I haven't done the model predictions with a testing data set yet.

$\endgroup$
5
  • $\begingroup$ Welcome to CV, Eve. If you could make a decent prediction when the stand basal area is unknown, then you could build your original model without the stand basal area. This points in the direction of "feature engineering" and considering models with nonlinear relationships, for otherwise you have no hope of succeeding. $\endgroup$
    – whuber
    Mar 1, 2023 at 15:54
  • $\begingroup$ So do you mean that in order to succeed, I would have to build my model again without the area? Or do you mean that now I would have to make a new model with the feature engineering approach? I hope you also read the EDIT section in my question which I just added :) I am now thinking of presenting a range of values for stand volumes by producing results with varying values of stand basal areas. $\endgroup$
    – eve1234
    Mar 1, 2023 at 16:03
  • $\begingroup$ The cleanest approach is to build a new model. You could attempt multiple imputation of stand basal area, but that would be indirect, complicated, and would still require the same kind of effort (nonlinear transformations of variables) as starting over. $\endgroup$
    – whuber
    Mar 1, 2023 at 17:20
  • $\begingroup$ Yes okay. But the new model with fewer predictors, i.e., without the stand basal area, doesn't produce a good fit. I tried to do data transformations to produce more linear data but it doesn't help either with a general linear model, GLM or GAM. $\endgroup$
    – eve1234
    Mar 2, 2023 at 9:26
  • $\begingroup$ That's useful to know. It tells you the stand basal area contains important information that you haven't managed to capture in your other variables. But, for the very same reason, how could you hope to manufacture that missing information from the other variables alone? That's the point of feature engineering, which effectively extends your model. $\endgroup$
    – whuber
    Mar 2, 2023 at 13:48

3 Answers 3

2
$\begingroup$

This problem was studied here with several solutions offered. One of the solutions is based on fast backwards (approximate) step down variable selection to fit a temporary submodel using only the original parameter estimates and their variance-covariance matrix.

Reference

Janssen, Kristel JM, et al. "Dealing with missing predictor values when applying clinical prediction models." Clinical chemistry 55.5 (2009): 994-1001.

$\endgroup$
1
$\begingroup$

Your regression models the mean conditional on having feature values, and if you don’t have values for those features, the conditional mean calculation breaks down. Thus, you need some value for that third covariate, and the predictions will not be the same for all such values.

However, you’re allowed to input whatever you want into the equation, so you can pick a value or even several values. For instance, you might want to make a prediction based on your two feature values and the mean value of that third feature (maybe the median value, maybe both). You might want to give a range of values, such as saying the range when you set that third feature to its $10$th and $90$th percentiles. You might consider extreme scenarios, such as what happens if that third feature takes its lowest or highest values (maybe go even a bit more extreme).

$\endgroup$
0
$\begingroup$

That's very unusual, I can't see how one could be expected to estimate a volume without an area. I would suggest running predictions with a number of example values of area. For example, choose three values of area that you think are reasonable given your context, then run the model three times - each with a fixed area value (and variable x1 and x3 values). Then present prediction results as a range of volumes that could reasonably be expected from stand ages and site types.

$\endgroup$
2
  • $\begingroup$ I don't quite understand this: should the example values for the area be picked up from my actual data set? $\endgroup$
    – eve1234
    Mar 1, 2023 at 13:35
  • $\begingroup$ That depends on why you are predicting stand volume, and why you have to predict without area? But yes, a good starting point would be to pick the mean area from your data and use that in your prediction. $\endgroup$
    – Bowhaven
    Mar 1, 2023 at 15:05

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.