In 1985 species/provenance trials were laid out at six sites in Thailand as part of an ACIAR project extending over several years to investigate Australian multi-purpose tree species. The experimental design in each case was an RCB design with three replicates and the number of seedlots ranged from 30 to 42. Plots consisted of 5 \(\times\) 5 trees with a 2m \(\times\) 2m spacing. Plot summary files were constructed for the 24-month measurement according to the methods described in Chapter 3. Analyses were performed on the plot mean data at each site.
library(car)library(dae)library(dplyr)library(emmeans)library(ggplot2)library(lmerTest)library(magrittr)library(predictmeans)data(DataExam5.1)# Pg.68 fm5.4<-lm(formula = ht ~ site*seedlot , data = DataExam5.1 )# Pg. 73anova(fm5.4)Analysis of Variance TableResponse: ht Df Sum Sq Mean Sq F value Pr(>F)site 3919585306528NaNNaNseedlot 263176289122165NaNNaNsite:seedlot 787079579076NaNNaNResiduals 00NaN# Pg. 73emmeans(object = fm5.4, specs =~ site) site emmean SE df lower.CL upper.CL Ratchaburi 462NaN0NaNNaN Sai Thong 628NaN0NaNNaN Si Sa Ket 494NaN0NaNNaN Sakaerat 370NaN0NaNNaNResults are averaged over the levels of: seedlot Confidence level used:0.95emmeans(object = fm5.4, specs =~ seedlot) seedlot emmean SE df lower.CL upper.CL13877365NaN0NaNNaN13866353NaN0NaNNaN13689559NaN0NaNNaN13688546NaN0NaNNaN13861627NaN0NaNNaN13854628NaN0NaNNaN13684660NaN0NaNNaN13864422NaN0NaNNaN13863586NaN0NaNNaN13683770NaN0NaNNaN13681695NaN0NaNNaN14175438NaN0NaNNaN14660521NaN0NaNNaN13653592NaN0NaNNaN13846440NaN0NaNNaN13621384NaN0NaNNaN13871272NaN0NaNNaN13519422NaN0NaNNaN13514369NaN0NaNNaN13148273NaN0NaNNaN13990282NaN0NaNNaN14537780NaN0NaNNaN14106772NaN0NaNNaN12013616NaN0NaNNaN14130422NaN0NaNNaN14485123NaN0NaNNaN11935273NaN0NaNNaNResults are averaged over the levels of: site Confidence level used:0.95 ANOVAfm5.4<-anova(fm5.4) ANOVAfm5.4[4, 1:3] <-c(208, 208*1040, 1040) ANOVAfm5.4[3, 4] <- ANOVAfm5.4[3, 3]/ANOVAfm5.4[4, 3] ANOVAfm5.4[3, 5] <-pf(q = ANOVAfm5.4[3, 4] , df1 = ANOVAfm5.4[3, 1] , df2 = ANOVAfm5.4[4, 1] , lower.tail =FALSE )# Pg. 73 ANOVAfm5.4Analysis of Variance TableResponse: ht Df Sum Sq Mean Sq F value Pr(>F) site 3919585306528NaNNaNseedlot 263176289122165NaNNaNsite:seedlot 7870795790768.7273<0.00000000000000022***Residuals 2082163201040---Signif. codes:0'***'0.001'**'0.01'*'0.05'.'0.1' '1# Pg. 80 DataExam5.1%>%filter(seedlot %in%c("13653", "13871")) %>%ggplot(data = . , mapping =aes(x = sitemean , y = ht , color = seedlot , shape = seedlot ) ) +geom_point() +geom_smooth(method = lm , se =FALSE , fullrange =TRUE ) +theme_classic() +labs(x ="SiteMean" , y ="SeedLot Mean" )
Tab5.10<- DataExam5.1%>%summarise(Mean =mean(ht), .by = seedlot) %>%left_join( DataExam5.1%>%nest_by(seedlot) %>%mutate(fm1 =list(lm(ht ~ sitemean, data = data))) %>%summarise(Slope =coef(fm1)[2]) , by ="seedlot" )# Pg. 81 Tab5.10 seedlot Mean Slope111935272.750.53017435214485123.000.10170020314130422.250.54976906412013616.252.06723798514106771.751.37751724614537779.750.96012145713990281.750.08298796813148273.250.05333546913514368.750.123072331013519422.000.292116481113871271.500.830482031213621383.751.200856071313846440.000.706910011413653591.501.594343801514660521.250.933539901614175438.001.337707451713681695.001.309378371813683769.751.796297351913863586.251.480347302013864422.500.611138572113684660.001.678605702213854628.001.620268532313861626.751.437846622413688546.501.727176522513689558.751.194753322613866352.750.610097342713877364.750.79221858ggplot(data = Tab5.10, mapping =aes(x = Mean, y = Slope)) +geom_point(size =2) +theme_bw() +labs(x ="SeedLot Mean" , y ="Regression Coefficient" )