model1<-lme(yield~nitro,random=~1|Block,data=data2[data2$Variety=="Golden Rain",],method="ML") #ML=log-likelihood is maximized
> summary(model1)
Linear mixed-effects model fit by maximum likelihood
Data: data2[data2$Variety == "Golden Rain", ]
AIC BIC logLik
214.0783 218.7906 -103.0392

Random effects:
Formula: ~1 | Block
(Intercept) Residual
StdDev: 14.11664 14.57903

Fixed effects: yield ~ nitro
Value Std.Error DF t-value p-value
(Intercept) 81.90000 7.955139 17 10.295231 0
nitro 75.33333 13.900561 17 5.419446 0
Correlation:
(Intr)
nitro -0.524

Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-1.41732354 -0.65141124 -0.01988072 0.57579658 1.80182897

Number of Observations: 24
Number of Groups: 6
> plot(model1)
> coefficients(model1)
(Intercept) nitro
VI 70.64981 75.33333
V 74.79462 75.33333
III 67.88661 75.33333
IV 84.66320 75.33333
II 88.80801 75.33333
I 104.59775 75.33333
> model2<-lme(yield~nitro,random=~nitro|Block,data=data2[data2$Variety=="Golden Rain",],method="ML")
> summary(model2)
Linear mixed-effects model fit by maximum likelihood
Data: data2[data2$Variety == "Golden Rain", ]
AIC BIC logLik
216.7607 223.8291 -102.3804

Random effects:
Formula: ~nitro | Block
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
(Intercept) 10.45993 (Intr)
nitro 21.06468 0.434
Residual 13.52652

Fixed effects: yield ~ nitro
Value Std.Error DF t-value p-value
(Intercept) 81.90000 6.571106 17 12.46366 0e+00
nitro 75.33333 15.716547 17 4.79325 2e-04
Correlation:
(Intr)
nitro -0.315

Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-1.3899717 -0.7664257 -0.1858717 0.5894594 1.8622456

Number of Observations: 24
Number of Groups: 6
> plot(model2)
> coefficients(model2)
(Intercept) nitro
VI 75.07782 54.63216
V 76.77631 68.78685
III 72.49200 56.83858
IV 82.80148 86.61895
II 85.55161 92.34968
I 98.70079 92.77378
> anova(model1,model2)
Model df AIC BIC logLik Test L.Ratio p-value
model1 1 4 214.0783 218.7905 -103.0392
model2 2 6 216.7608 223.8291 -102.3804 1 vs 2 1.317588 0.5175