Hi All,

I have fitted the linear regression model between 2 numerical and 2
categorical data i.e landcover and soilmap. The landcover has 5 levels and
soilmap has 6 levels. Now i want to apply this model to my data. I filled in
the equation with the numerical data but i do not know how to include the
categorical covariates here.

Do you know how to complete this equation with the help of the Regression
analysis results and the other loaded data in R  below ?:

*clay.predict=1.269e+01 +2.102e-05*evi$band1 -3.158e+00*twi$band1 + ......*

 the loaded data in r:
evi = readGDAL("evim")
landcover= readGDAL("landcovm")
soilmap = readGDAL("soilm")
twi = readGDAL("twim")
m = read.table("mtaall1.txt",  header = TRUE)

*Regression analysis results* :
summary(clay.fit)
Call:
lm(formula = m$logclay ~ m$evi + m$logtwi + m$landcover.f + m$soilmap.f,
    data = m)
Residuals:
     Min       1Q   Median       3Q      Max
-1.96706 -0.36136  0.02409  0.37494  1.54777
Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)

(Intercept)                         1.269e+01  1.452e+00   8.743  < 2e-16
***
m$evi                               2.102e-05  9.004e-06   2.334  0.01989 *

m$logtwi                           -3.158e+00  4.592e-01  -6.878 1.42e-11
***
m$landcover.fagroforest            -9.040e-01  3.093e-01  -2.923  0.00359 **

m$landcover.fclosed to open forest -1.020e+00  3.179e-01  -3.209  0.00139 **

m$landcover.fclosed forest         -8.061e-01  3.221e-01  -2.503  0.01257 *

m$landcover.fsavanna               -9.544e-01  3.056e-01  -3.123  0.00187 **

m$soilmap.f2                       -9.257e-01  2.337e-01  -3.962 8.26e-05
***
m$soilmap.f3                       -9.718e-01  2.361e-01  -4.117 4.34e-05
***
m$soilmap.f4                       -6.288e-01  2.383e-01  -2.639  0.00852 **

m$soilmap.f5                       -7.967e-01  2.681e-01  -2.972  0.00307 **

m$soilmap.f6                       -1.343e+00  3.139e-01  -4.278 2.17e-05
***
m$soilmap.fNA                      -4.226e-01  2.636e-01  -1.603  0.10935

m$soilmap.fn/a                     -1.119e+00  4.873e-01  -2.295  0.02203 *

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.5617 on 656 degrees of freedom
  (103 observations deleted due to missingness)
Multiple R-squared: 0.1963,     Adjusted R-squared: 0.1804
F-statistic: 12.33 on 13 and 656 DF,  p-value: < 2.2e-16

May you please help?thanks in advance for your usual cooperation. Nikki

	[[alternative HTML version deleted]]

