Creating custom emission factors to assess soil carbon stock using multiple management practices. These custom emission factors were ran using linear mixed effect modeling practices shown in the R Script below.
#Estimating Emission Factors using a linear mixed effect model (LME)#LME model using backwards stepwise method#Using mixed effect model because we have fixed and random variables#----load nlme package (linear and non linear mixed effects model)-----library(nlme)#----Read in EF input file----LU.data<-read.csv("data/SoilCCult.csv", header=TRUE)management.data<-read.csv("data/SoilCManagement.csv", header=TRUE)Cinput.data<-read.csv("data/SoilCInput.csv", header=TRUE)#-----Test for correlation in predictor variables-------cor(LU.data[,c("years", "years2", "dep1", "dep2")])
#----Data check via Visualization----###Aquicbarplot(table(Cinput.data$aquic),ylab ="Times appeared in Data", main="aquic")
barplot(table(management.data$aquic),ylab ="Times appeared in Data", main="aquic")
barplot(table(LU.data$aquic),ylab ="Times appeared in Data", main="aquic")
###Years and Years2 (years squared)barplot(table(Cinput.data$years),ylab ="Times appeared in Data", main="years")
barplot(table(management.data$years),ylab ="Times appeared in Data", main="years")
barplot(table(LU.data$years),ylab ="Times appeared in Data", main="years")
###Top and bottombarplot(table(Cinput.data$top),ylab ="Times appeared in Data", main="top")
barplot(table(management.data$top),ylab ="Times appeared in Data", main="top")
barplot(table(LU.data$top),ylab ="Times appeared in Data", main="top")
barplot(table(Cinput.data$bottom),ylab ="Times appeared in Data", main="bottom")
barplot(table(management.data$bottom),ylab ="Times appeared in Data", main="bottom")
barplot(table(LU.data$bottom),ylab ="Times appeared in Data", main="bottom")
###Tempbarplot(table(Cinput.data$ipcc.temp),ylab ="Times appeared in Data", main="Temp")
barplot(table(management.data$ipcc.temp),ylab ="Times appeared in Data", main="Temp")
barplot(table(LU.data$ipcc.temp),ylab ="Times appeared in Data", main="Temp")
###Precipitationbarplot(table(Cinput.data$ipcc.pre),ylab ="Times appeared in Data", main="Precipitation Climate")
barplot(table(management.data$ipcc.pre),ylab ="Times appeared in Data", main="Precipitation Climate")
barplot(table(LU.data$ipcc.pre),ylab ="Times appeared in Data", main="Precipitation Climate")
###Soil typebarplot(table(Cinput.data$ipcc.soil),ylab ="Times appeared in Data", main="Soil Type")
barplot(table(management.data$ipcc.soil),ylab ="Times appeared in Data", main="Soil Type")
barplot(table(LU.data$ipcc.soil),ylab ="Times appeared in Data", main="Soil Type")
#_____________________________________________________________________________________________________#MANAGEMENT MODEL DEVELOPMENT#-------Test full model with all variables as main effects-------test.fit<-lme(ch.cstock~ch.till+years+years2+dep1+dep2+aquic+ipcc.soil+ipcc.pre+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
#--------Diagnostic Plots, Residual Plot--------- #do residual plot after test.fit model for all variablesresid<-residuals(test.fit)plot(fitted(test.fit), resid)abline(0,0)
### QQ normal plotqqnorm(resid)qqline(resid)
#-----Remove variables w/ high p-values to see if it improves the model------###Using backwards stepwise method###If AIC goes UP by 2, it means the variable I took away was important. If it goes down by 2, the variable was not important#___removed years2 because high p value___test.fit<-lme(ch.cstock~ch.till+years+dep1+dep2+aquic+ipcc.soil+ipcc.pre+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
### AIC went from -74 to -76, is that considered up or down in this case? I think down… so we keep years2?###leaving out years2 because we want the model as simple as possible#___removed ipcc.temp because high p value___test.fit<-lme(ch.cstock~ch.till+years+dep1+dep2+aquic+ipcc.soil+ipcc.pre,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
###changed AIC from -76 to -78, leaving out ipcc.temp#____Removed aquic_____test.fit<-lme(ch.cstock~ch.till+years+dep1+dep2+ipcc.soil+ipcc.pre,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
###Leaving out aquic because AIC changed from -78 to -81#____removing ipcc.soil____test.fit<-lme(ch.cstock~ch.till+years+dep1+dep2+ipcc.pre,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: management.data
AIC BIC logLik
-87.44697 -53.87607 52.72348
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.01274511
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 0.04766797 0.1984883
Fixed effects: ch.cstock ~ ch.till + years + dep1 + dep2 + ipcc.pre
Value Std.Error DF t-value p-value
(Intercept) 1.2155265 0.03673901 203 33.08544 0.0000
ch.tillrt -0.0483838 0.02622587 203 -1.84489 0.0665
years 0.0037403 0.00174900 31 2.13852 0.0405
dep1 -0.0206351 0.00210659 203 -9.79550 0.0000
dep2 0.0002162 0.00002675 203 8.08192 0.0000
ipcc.prewet 0.0830077 0.02911534 68 2.85100 0.0058
Correlation:
(Intr) ch.tll years dep1 dep2
ch.tillrt -0.159
years -0.545 -0.101
dep1 -0.432 -0.077 -0.017
dep2 0.399 0.064 -0.045 -0.950
ipcc.prewet -0.522 0.098 0.073 -0.165 0.154
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.4822612 -0.5733692 -0.0913330 0.4402047 3.9800368
Number of Observations: 308
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
70 102
###Leaving out ipcc.soil because AIC changed from -81 to -87#____removing ipcc.pre____*KEPT IPCC.PREtest.fit<-lme(ch.cstock~ch.till+years+dep1+dep2,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: management.data
AIC BIC logLik
-81.89104 -52.05024 48.94552
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.04089841
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 0.0410433 0.1994555
Fixed effects: ch.cstock ~ ch.till + years + dep1 + dep2
Value Std.Error DF t-value p-value
(Intercept) 1.2772696 0.03284326 203 38.88985 0.0000
ch.tillrt -0.0567931 0.02661311 203 -2.13403 0.0340
years 0.0031722 0.00182699 31 1.73630 0.0924
dep1 -0.0200671 0.00210794 203 -9.51980 0.0000
dep2 0.0002095 0.00002674 203 7.83402 0.0000
Correlation:
(Intr) ch.tll years dep1
ch.tillrt -0.138
years -0.602 -0.088
dep1 -0.611 -0.059 0.011
dep2 0.564 0.049 -0.071 -0.949
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.3393973 -0.5998968 -0.1325983 0.4353780 3.9937867
Number of Observations: 308
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
70 102
### Keeping ipcc.pre because AIC changed from -87 back to -81#----Best Fit Management Model-----test.fit.management<-lme(ch.cstock~ch.till+years+dep1+dep2+ipcc.pre,random =~1|ran.exp/ran.yrexp, data = management.data, method ="ML", na.action = na.omit)summary(test.fit.management)
Linear mixed-effects model fit by maximum likelihood
Data: management.data
AIC BIC logLik
-87.44697 -53.87607 52.72348
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.01274511
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 0.04766797 0.1984883
Fixed effects: ch.cstock ~ ch.till + years + dep1 + dep2 + ipcc.pre
Value Std.Error DF t-value p-value
(Intercept) 1.2155265 0.03673901 203 33.08544 0.0000
ch.tillrt -0.0483838 0.02622587 203 -1.84489 0.0665
years 0.0037403 0.00174900 31 2.13852 0.0405
dep1 -0.0206351 0.00210659 203 -9.79550 0.0000
dep2 0.0002162 0.00002675 203 8.08192 0.0000
ipcc.prewet 0.0830077 0.02911534 68 2.85100 0.0058
Correlation:
(Intr) ch.tll years dep1 dep2
ch.tillrt -0.159
years -0.545 -0.101
dep1 -0.432 -0.077 -0.017
dep2 0.399 0.064 -0.045 -0.950
ipcc.prewet -0.522 0.098 0.073 -0.165 0.154
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.4822612 -0.5733692 -0.0913330 0.4402047 3.9800368
Number of Observations: 308
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
70 102
#____________________________________________________________________________________________________________#cINPUT MODEL DEVELOPMENT#-------Test full model with all variables as main effects-------###Did not include soil type because it does not matter for Cinput datatest.fit<-lme(ch.cstock~ch.inp+years+years2+dep1+dep2+aquic+ipcc.pre+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = Cinput.data, method ="ML", na.action = na.omit)summary(test.fit)
#____Removing aquic because high p value____test.fit<-lme(ch.cstock~ch.inp+years+years2+dep1+dep2+ipcc.pre+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = Cinput.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: Cinput.data
AIC BIC logLik
-219.8959 -190.4948 120.9479
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.02155949
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 1.404757e-06 0.07559902
Fixed effects: ch.cstock ~ ch.inp + years + years2 + dep1 + dep2 + ipcc.pre + ipcc.temp
Value Std.Error DF t-value p-value
(Intercept) 1.0647743 0.04770339 58 22.320728 0.0000
ch.inpl -0.1257814 0.02679209 58 -4.694723 0.0000
years -0.0036977 0.00391837 22 -0.943685 0.3556
years2 0.0000742 0.00008879 22 0.835624 0.4124
dep1 0.0032287 0.00150467 58 2.145753 0.0361
dep2 -0.0000228 0.00001891 58 -1.205032 0.2331
ipcc.prewet 0.0178249 0.02907533 19 0.613060 0.5471
ipcc.tempwarm -0.0262489 0.02247104 19 -1.168122 0.2572
Correlation:
(Intr) ch.npl years years2 dep1 dep2 ipcc.p
ch.inpl -0.674
years -0.777 0.306
years2 0.725 -0.315 -0.974
dep1 -0.281 0.037 0.000 -0.033
dep2 0.252 -0.027 0.001 0.022 -0.957
ipcc.prewet -0.498 0.529 0.335 -0.302 -0.146 0.144
ipcc.tempwarm -0.150 -0.173 0.057 0.020 0.072 -0.090 -0.308
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.24054950 -0.55163767 -0.06600909 0.52227609 3.36081396
Number of Observations: 107
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
22 46
###Leave out aquic#____Removing ipcc.pre_____test.fit<-lme(ch.cstock~ch.inp+years+years2+dep1+dep2+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = Cinput.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: Cinput.data
AIC BIC logLik
-221.5017 -194.7734 120.7508
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.02279106
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 6.608399e-07 0.07549399
Fixed effects: ch.cstock ~ ch.inp + years + years2 + dep1 + dep2 + ipcc.temp
Value Std.Error DF t-value p-value
(Intercept) 1.0787360 0.04157504 58 25.946720 0.0000
ch.inpl -0.1341617 0.02286890 58 -5.866557 0.0000
years -0.0044796 0.00371354 22 -1.206295 0.2405
years2 0.0000901 0.00008522 22 1.056801 0.3021
dep1 0.0033722 0.00148184 58 2.275709 0.0266
dep2 -0.0000246 0.00001862 58 -1.318874 0.1924
ipcc.tempwarm -0.0217812 0.02160346 20 -1.008228 0.3254
Correlation:
(Intr) ch.npl years years2 dep1 dep2
ch.inpl -0.558
years -0.748 0.162
years2 0.695 -0.193 -0.972
dep1 -0.408 0.131 0.054 -0.083
dep2 0.372 -0.119 -0.051 0.069 -0.956
ipcc.tempwarm -0.370 -0.010 0.175 -0.077 0.028 -0.047
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.21678502 -0.58798692 -0.06059058 0.50893876 3.21488084
Number of Observations: 107
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
22 46
###Leave out ipcc.pre#_____Removing ipcc.temp____test.fit<-lme(ch.cstock~ch.inp+years+years2+dep1+dep2,random =~1|ran.exp/ran.yrexp, data = Cinput.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: Cinput.data
AIC BIC logLik
-222.4738 -198.4183 120.2369
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.02537353
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 3.806715e-07 0.07533366
Fixed effects: ch.cstock ~ ch.inp + years + years2 + dep1 + dep2
Value Std.Error DF t-value p-value
(Intercept) 1.0624051 0.03926304 58 27.058654 0.0000
ch.inpl -0.1336006 0.02330449 58 -5.732826 0.0000
years -0.0038257 0.00372994 22 -1.025661 0.3162
years2 0.0000831 0.00008682 22 0.956987 0.3490
dep1 0.0034261 0.00147686 58 2.319843 0.0239
dep2 -0.0000255 0.00001852 58 -1.379507 0.1730
Correlation:
(Intr) ch.npl years years2 dep1
ch.inpl -0.603
years -0.750 0.167
years2 0.721 -0.195 -0.976
dep1 -0.418 0.120 0.052 -0.082
dep2 0.372 -0.109 -0.044 0.066 -0.956
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.11617924 -0.62191195 -0.03337844 0.53035651 3.11400864
Number of Observations: 107
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
22 46
#only brought down AIC by 1, might keep out? Means it really has no affect on the model, but we want the model as simple as possible anyway.###NOTE: Taking out years2 because it worsened the model#----Best Fit C Input Model-----test.fit.CInput<-lme(ch.cstock~ch.inp+years+dep1+dep2,random =~1|ran.exp/ran.yrexp, data = Cinput.data, method ="REML", na.action = na.omit)summary(test.fit.CInput)
Linear mixed-effects model fit by REML
Data: Cinput.data
AIC BIC logLik
-164.3576 -143.3578 90.17879
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.030629
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 3.188172e-07 0.07654272
Fixed effects: ch.cstock ~ ch.inp + years + dep1 + dep2
Value Std.Error DF t-value p-value
(Intercept) 1.0342824 0.027920709 58 37.04356 0.0000
ch.inpl -0.1280234 0.023610778 58 -5.42224 0.0000
years -0.0003797 0.000856623 23 -0.44328 0.6617
dep1 0.0035614 0.001463052 58 2.43426 0.0180
dep2 -0.0000268 0.000018323 58 -1.46459 0.1484
Correlation:
(Intr) ch.npl years dep1
ch.inpl -0.675
years -0.330 -0.099
dep1 -0.492 0.086 -0.122
dep2 0.444 -0.080 0.090 -0.956
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.10382963 -0.55572607 0.02143947 0.53793687 3.08551597
Number of Observations: 107
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
22 46
#________________________________________________________________________________________________#LAND USE MODEL DEVELOPMENT#-------Test full model with all variables as main effects-------###Did not include soil type pr aquic because it does not matter for Cinput data because we did not have enough soil type representation or aquic sites to fully represent the modeltest.fit<-lme(ch.cstock~years+years2+dep1+dep2+ipcc.prec+ipcc.temp,random =~1|ran.exp/ran.yrexp, data = LU.data, method ="ML", na.action = na.omit)summary(test.fit)
Linear mixed-effects model fit by maximum likelihood
Data: LU.data
AIC BIC logLik
10.1963 39.75457 4.901848
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.07900865
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 2.80147e-05 0.22315
Fixed effects: ch.cstock ~ years + years2 + dep1 + dep2 + ipcc.prec + ipcc.temp
Value Std.Error DF t-value p-value
(Intercept) 0.8533453 0.08722319 93 9.783468 0.0000
years -0.0081524 0.00280862 9 -2.902638 0.0175
years2 0.0000594 0.00002376 9 2.500383 0.0338
dep1 0.0168374 0.00290466 93 5.796695 0.0000
dep2 -0.0001320 0.00003254 93 -4.056438 0.0001
ipcc.precwet -0.0481100 0.06114358 9 -0.786836 0.4516
ipcc.tempwarm -0.0873289 0.05283942 9 -1.652722 0.1328
Correlation:
(Intr) years years2 dep1 dep2 ipcc.p
years -0.752
years2 0.677 -0.953
dep1 -0.294 -0.074 0.055
dep2 0.234 0.042 -0.028 -0.916
ipcc.precwet -0.484 0.414 -0.448 -0.130 0.109
ipcc.tempwarm -0.386 -0.030 -0.016 0.098 -0.026 0.172
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.69345778 -0.68525693 -0.07894826 0.48777740 3.48592852
Number of Observations: 142
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
34 47
Linear mixed-effects model fit by maximum likelihood
Data: LU.data
AIC BIC logLik
9.159036 32.80565 3.420482
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.09172667
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 1.628889e-05 0.2227962
Fixed effects: ch.cstock ~ years + years2 + dep1 + dep2
Value Std.Error DF t-value p-value
(Intercept) 0.7804414 0.07372605 93 10.585695 0.0000
years -0.0076584 0.00262714 11 -2.915094 0.0141
years2 0.0000529 0.00002195 11 2.412040 0.0345
dep1 0.0169964 0.00284137 93 5.981773 0.0000
dep2 -0.0001316 0.00003215 93 -4.092387 0.0001
Correlation:
(Intr) years years2 dep1
years -0.788
years2 0.653 -0.943
dep1 -0.379 -0.012 -0.009
dep2 0.321 -0.006 0.023 -0.915
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.75464698 -0.69354075 -0.06667757 0.56532555 3.53624701
Number of Observations: 142
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
34 47
###Leave out ipcc.temp, AIC only changed by 1 so it has no significant effects on the model#----Best Fit Land Use Model----test.fit.LU<-lme(ch.cstock~years+years2+dep1+dep2,random =~1|ran.exp/ran.yrexp, data = LU.data, method ="ML", na.action = na.omit)summary(test.fit.LU)
Linear mixed-effects model fit by maximum likelihood
Data: LU.data
AIC BIC logLik
9.159036 32.80565 3.420482
Random effects:
Formula: ~1 | ran.exp
(Intercept)
StdDev: 0.09172667
Formula: ~1 | ran.yrexp %in% ran.exp
(Intercept) Residual
StdDev: 1.628889e-05 0.2227962
Fixed effects: ch.cstock ~ years + years2 + dep1 + dep2
Value Std.Error DF t-value p-value
(Intercept) 0.7804414 0.07372605 93 10.585695 0.0000
years -0.0076584 0.00262714 11 -2.915094 0.0141
years2 0.0000529 0.00002195 11 2.412040 0.0345
dep1 0.0169964 0.00284137 93 5.981773 0.0000
dep2 -0.0001316 0.00003215 93 -4.092387 0.0001
Correlation:
(Intr) years years2 dep1
years -0.788
years2 0.653 -0.943
dep1 -0.379 -0.012 -0.009
dep2 0.321 -0.006 0.023 -0.915
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.75464698 -0.69354075 -0.06667757 0.56532555 3.53624701
Number of Observations: 142
Number of Groups:
ran.exp ran.yrexp %in% ran.exp
34 47
#______________________________________________________________________________________________### EF'S THEN CALCULATED IN EXCEL# Derive PDF for each model/EF###Land Use EFfixed.LU<-fixed.effects(test.fit.LU)LU.cov<-test.fit.LU$varFixx.LU<-c(1,75,5625,15,300)# VarianceV.LU.EF<-(t(x.LU))%*%LU.cov%*%x.LU# Standard Deviationsqrt(V.LU.EF)
[,1]
[1,] 0.03887679
#_________________________________________###CInput EFfixed.Cinput<-fixed.effects(test.fit.CInput)Cinput.cov<-test.fit.CInput$varFixX.Cinput.low<-c(1,1,75,15,300)X.Cinput.high<-c(1,0,75,15,300)# VarianceV.Cinput.low<-(t(X.Cinput.low))%*%Cinput.cov%*%X.Cinput.lowV.Cinput.high<-(t(X.Cinput.high))%*%Cinput.cov%*%X.Cinput.high# Standard Deviationsqrt(V.Cinput.low)
[,1]
[1,] 0.05190687
sqrt(V.Cinput.high)
[,1]
[1,] 0.05707304
#_________________________________________###Management EFfixed.management<-fixed.effects(test.fit.management)management.cov<-test.fit.management$varFixx.rt.wet<-c(1,1,20,15,300,1)x.nt.wet<-c(1,0,20,15,300,1)x.nt.dry<-c(1,0,20,15,300,0)x.rt.dry<-c(1,1,20,15,300,0)# Variancev.rt.wet<-(t(x.rt.wet))%*%management.cov%*%x.rt.wetv.nt.wet<-(t(x.nt.wet))%*%management.cov%*%x.nt.wetv.nt.dry<-(t(x.nt.dry))%*%management.cov%*%x.nt.dryv.rt.dry<-(t(x.rt.dry))%*%management.cov%*%x.rt.dry# Standard Deviationsqrt(v.rt.wet)
[,1]
[1,] 0.02827946
sqrt(v.nt.wet)
[,1]
[1,] 0.02364594
sqrt(v.nt.dry)
[,1]
[1,] 0.03007006
sqrt(v.rt.dry)
[,1]
[1,] 0.03158836
#_____________Export CSV files with my covariance matrix to run in cholesky decomp model for monte carlo__________________###CSV files#write.csv(data.frame(LU.cov), "LandUseCov.csv")#write.csv(data.frame(Cinput.cov), "CinputCov.csv")#write.csv(data.frame(management.cov), "MgmtCov.csv")#NOTE: always keep dep1 and dep2 when testing the model w/ AIC value and years