-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBiomass R results.R
More file actions
32 lines (32 loc) · 919 Bytes
/
Biomass R results.R
File metadata and controls
32 lines (32 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
library(car)
fold <-"C:/Users/murem/OneDrive/Desktop/BME/Datasets"
setwd(fold)
getwd()
Biomass <- read.table('Biomass.txt', header=TRUE)
head(Biomass)
is.numeric(Biomass$BIOMASS)
is.factor(Biomass$BIOMASS)
is.numeric(Biomass$ALT)
is.factor(Biomass$ALT)
is.numeric(Biomass$CONS)
is.factor(Biomass$CONS)
Biomass$CONS <- as.factor(Biomass$CONS)
is.numeric(Biomass$CONS)
is.factor(Biomass$CONS)
is.numeric(Biomass$SOIL)
is.factor(Biomass$SOIL)
Biomass$SOIL <- as.factor(Biomass$SOIL)
is.factor(Biomass$SOIL)
summary(Biomass)
model1 <- lm(BIOMASS~ CONS + ALT+ SOIL, data=Biomass)
summary(model1)
predict(model1, newdata= data.frame(ALT= 200, CONS= "1", SOIL= '1'))
predict(model1, newdata= data.frame(ALT= 300, CONS= "2", SOIL= '3'))
Anova(model1)
crPlots(model1)
model2 <- lm(BIOMASS ~ALT + SOIL + CONS, data=Biomass)
summary(model2)
anova(model1)
Anova(model1)
anova(model2)
Anova(model2)