Relative Content

Tag Archive for rlinear-regressionpiecewise

Find the optimal model using step wise linear regression

I have a sf object with 2 columns, named fclass and geometry. I am interested in the fclass column. The fclass has several unique values. I convert this sf object to spatraster, I resample it and I perform a linear regression where I use another spatraster, called ntl, as my response (lm(ntl ~ road)).