Skip to content

Commit

Permalink
version 1.0-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe de Mendiburu authored and gaborcsardi committed Feb 6, 2007
1 parent 06e305b commit c254f61
Show file tree
Hide file tree
Showing 30 changed files with 92 additions and 253 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: agricolae
Type: Package
Title: Statistical Procedures for Agricultural Research
Version: 1.0-1
Date: 2007-01-25
Version: 1.0-2
Date: 2007-02-06
Author: Felipe de Mendiburu
Maintainer: Felipe de Mendiburu <f.mendiburu@cgiar.org>
Suggests: cluster, akima, SuppDists, klaR
Expand All @@ -19,5 +19,5 @@ Description: These functions are currently utilized by the International Potato
Resampling and simulation: resampling.model, simulation.model, Ecology: Indices
Biodiversity, path analysis, Uniformity Soil: Index Smith's.
License: This software may be re-distributed freely and used for any non-commercial purpose under the GPL license.
URL: http://tarwi.lamolina.edu.pe/~fmendiburu; http://research.cip.cgiar.org/cipstat/
Packaged: Thu Jan 25 14:10:12 2007; FDEMENDIBURU
URL: http://tarwi.lamolina.edu.pe/~fmendiburu
Packaged: Tue Feb 6 11:39:18 2007; FDEMENDIBURU
3 changes: 2 additions & 1 deletion R/design.alpha.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ alpha[i,4]<-alpha[i-2,4]+1
serie <- "IV"
}
if (serie == "" ) {
cat("\nhelp(design.a01): to see the series of alpha generators\n")
cat("\nhelp(design.alpha): to see the series of alpha generators\n")
}
else {
# arreglos intermedios alpha *
Expand Down Expand Up @@ -120,6 +120,7 @@ plots <- number + 1:(s*k*r) - 1
cols <-as.numeric(rep(gl(k,1),s*r))
book<-data.frame(plots=plots,cols=cols,book)
book<-data.frame(row.names=NULL,book)
book$block <- gl(s*r, k)
names(book)[4] <- name.trt
return(book)
}
Expand Down
9 changes: 0 additions & 9 deletions R/dimnames.order.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/friedman.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cat("\npFriedman :",p.fried)
cat("\nAlpha :",alpha)
cat("\nt-Student :",Tprob)
#...............
#cat("\nRepetición:\t",nr)
#cat("\nReplication:\t",nr)
if (group) {
cat("\nLSD :",LSD)
cat("\n\nMeans with the same letter are not significantly different.")
Expand Down
2 changes: 1 addition & 1 deletion R/kruskal.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name.t <- paste(deparse(substitute(trt)))
junto <- subset(data.frame(y, trt), is.na(y) == FALSE)
N<- nrow(junto)
junto[, 1] <- rank(junto[, 1])
means <- tapply.stat(junto[,2],junto[,1],mean)
means <- tapply.stat(junto[,2],junto[,1],sum)
sds <- tapply.stat(junto[,2],junto[,1], sd)
nn <- tapply.stat(junto[,2],junto[,1],length)
means<-data.frame(means,replication=nn[,2])
Expand Down
14 changes: 0 additions & 14 deletions R/plot.disc.R

This file was deleted.

47 changes: 21 additions & 26 deletions R/stability.par.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ A <- nrow(y) # Number of genotypes
M <- ncol(y) # Number of environments
N <- rep # Number of replications
MKE <- MSerror # Pooled error mean square
RR <- main # "Estabilidad de cultivares" Title of the experiments
RR <- main # "Stability" Title of the experiments
#
FM0 <- qf(1-alpha,M-1,M * (A - 1) * (N - 1))
# Datos para el estudio
# Generacion de los arreglos
#dimensionar para Genotipos (A)
# Data
#dimension for genotype (A)
dimA <- rep(0,A); dim(dimA)<-A
SHV<-dimA; MV<-dimA; SU<-dimA; MV1<-dimA; FF<-dimA; GY<-dimA; U1<-dimA; G<-dimA
SI<-dimA; B<-dimA; SA<-dimA; S<-dimA; FS<-dimA; FSS<-dimA; R<-dimA; GYS<-dimA
F1<-dimA; GY<-dimA; NN<-dimA; X1<-dimA; X1M<-dimA; W<-dimA;GYY<-dimA; MMM<-dimA
#dimensionar para Ambientes (M)
#dimension for environment (M)
dimA <- rep(0,M); dim(dimA)<-M
SHM<-dimA; MM<-dimA; II<-dimA; X2<-dimA; X2M<-dimA
# Dimension (A,M)
#dimension (A,M)
dimA <- rep(0,A*M); dim(dimA)<-c(A,M)
U<-dimA; G1<-dimA
SV <- 0 ; SM <- 0 ; GG1 <-0 ; L <- 0; SMES <- 0
Expand Down Expand Up @@ -134,7 +133,7 @@ FS[i] <- SI[i] / MKE
FSS[i] <- S[i] / MKE
}
SHF1 <-(A - 1) * (M - 1); SHF2 = (A - 1)
# Busca los valores de F y t-student Tabulares
# value F and t-student
F05 <- qf(0.95,SHF1, SHF2)
F01 <- qf(0.99,SHF1, SHF2)
if( FV >= F01 ) DD <- "**"
Expand Down Expand Up @@ -183,7 +182,7 @@ SHF1 <- M * (A - 1) * (N - 1)
SHF2 <- M - 2
F05 <- qf(0.95,SHF1, SHF2)
F01 <- qf(0.99,SHF1, SHF2)
#F05<- 1.76 # verdadero valor es: 2.546791447
#F05<- 1.76 # True is: 2.546791447
#F01<- 2.2 # 3.927394672
for ( i in 1: A) {
if( FSS[i] >= F01 ) MMM[i] <- "**"
Expand Down Expand Up @@ -245,7 +244,7 @@ for ( j in 1: M) {
W[i] <- W[i] + (y[i, j] - X1M[i] - X2M[j] + MM1) ^ 2 * N
}
}
cat("\n","Stability statistics\n")
cat("\n\n","Stability statistics")
cat("\n",rep("-",35))
cat("\nGenotype MEANS Sigma-square s-square Ecovalence")
cat("\n",rep("-",35))
Expand All @@ -255,11 +254,11 @@ Z<-as.matrix(Z)
for ( i in 1: A) {
cat("\n",i, "\t", Z[i,1],"\t", Z[i,2], Z[i,3], "\t",Z[i,4], Z[i,5],"\t", Z[i,6])
}
FF <- SI / MKE # para cada genotipo
FF <- SI / MKE # each genotype
SHF1 <- M * (A - 1) * (N - 1); SHF2 <- M - 1
F05 <- qf(0.95,SHF1, SHF2)
F01 <- qf(0.99,SHF1, SHF2)
#F05<- 1.76 # verdadero valor es: 2.546791447
#F05<- 1.76 # True value: 2.546791447
#F01<- 2.2 # 3.927394672

for ( i in 1: A) {
Expand All @@ -286,22 +285,18 @@ for ( i in 1: A) {
GYY[i]<-""
if( GYS[i] > MGYS ) GYY[i] <- "+"
}
cat("\n")
cat("\n","Simultaneous selection for yield and stability (++)")
cat("\n")
cat("\n",rep("-",43))
cat("\n","Genotype Yield Yield Adjustment Adjusted Stability Stability YS(i)")
cat("\n"," Rank to Rank Variance Rating" )
cat("\n",rep("-",43))

cat("\n\nSignif. codes: 0 '**' 0.01 '*' 0.05 'ns' 1\n\n")

cat("Simultaneous selection for yield and stability (++)\n\n")
names<-c("Genotype","Yield","Rank","Adj.rank","Adjusted","Stab.var","Stab.rating","YSi","..." )
Z<-data.frame(Genotype=rownames(y),MV, R, MV1,GY,SI,F1,GYS,GYY)
Z<-as.matrix(Z)
for ( i in 1: A) {
cat("\n",Z[i,1],"\t", Z[i,2],"\t", Z[i,3], "\t",Z[i,4],"\t",Z[i,5],"\t", Z[i,6],"\t", Z[i,7],"\t", Z[i,8], Z[i,9])
}
cat("\n",rep("-",43))
cat("\n","Mean = ", MES, "\t\t\t\t",MGYS )
cat("\n","LSD (p=0.05) = ", DMV05 )
cat("\n",rep("-",43))
names(Z)<-names
print(data.frame( row.names=NULL,Z))
cat("\n","Yield Mean:", MES)
cat("\n","YS Mean:", MGYS)
cat("\n","LSD (0.05):", DMV05)
cat("\n",rep("-",11))
cat("\n","+ selected genotype" )
cat("\n","++ Reference: Kang, M. S. 1993. Simultaneous selection for yield")
cat("\n","and stability: Consequences for growers. Agron. J. 85:754-757." )
Expand Down
Binary file modified data/ComasOxapampa.rda
Binary file not shown.
Binary file modified data/carolina3.rda
Binary file not shown.
Binary file removed data/precipitation.rda
Binary file not shown.
Binary file removed data/stable.rda
Binary file not shown.
20 changes: 6 additions & 14 deletions hace agricolae.r
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#setwd("d:/statistics/agricolae/R")
setwd("f:/statistics/agricolae/R")
setwd("d:/statistics/agricolae/R")
#setwd("f:/statistics/agricolae/R")
library(agricolae)
data(CIC)
data(ComasOxapampa)
Expand All @@ -25,41 +25,34 @@ data(natives)
data(paracsho)
data(plots)
data(potato)
data(precipitation)
data(ralstonia)
data(rice)
data(sinRepAmmi)
data(soil)
data(stable)
data(sweetpotato)
data(trees)
data(wild)

source("alpha01.R")
source("AMMI.contour.R")
source("AMMI.R")
source("audpc.abs.R")
source("audpc.rel.R")
source("audpc.R")
source("bar.err.R")
source("bar.group.R")
source("BIB.test.R")
source("carolina.R")
source("coeff.diana.R")
source("cor.matrix.R")
source("cor.mv.R")
source("cor.vector.R")
source("correl.R")
source("correlation.R")
source("cv.model.R")
source("cv.similarity.R")
source("decimals.R")
source("delete.na.R")
source("design.ab.R")
source("design.bib.r")
source("design.alpha.R")
source("design.bib.R")
source("design.crd.R")
source("design.graeco.R")
source("design.lsd.R")
source("design.rcbd.R")
source("dimnames.order.R")
source("durbin.test.R")
source("fact.nk.R")
source("friedman.test.R")
Expand All @@ -85,7 +78,6 @@ source("ojiva.freq.R")
source("order.group.R")
source("order.stat.R")
source("path.analysis.R")
source("plot.disc.R")
source("polygon.freq.R")
source("random.ab.R")
source("reg.homog.R")
Expand Down
15 changes: 13 additions & 2 deletions man/BIB.test.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ waller: test Waller-Duncan.
\item{alpha}{ Numeric }
\item{group}{ TRUE or FALSE }
}
\references{ Design of Experiments. Robert O. Kuehl. 2nd ed., Duxbury, 2000 }
\author{ F. de Mendiburu }
\references{ Design of Experiments. Robert O. Kuehl. 2nd ed., Duxbury, 2000
Linear Estimation and Design of Experiments. D.D. Joshi. WILEY EASTERN LIMITED
1987, New Delhi, India}

\author{ F. de Mendiburu }
\seealso{\code{\link{durbin.test}} }
\examples{
library(agricolae)
Expand All @@ -48,6 +50,15 @@ out<-BIB.test(run,psi,monovinyl,method="waller",group=TRUE)
out<-BIB.test(run,psi,monovinyl,method="tukey",group=TRUE)
out<-BIB.test(run,psi,monovinyl,method="tukey",group=FALSE)
bar.err(out,density=4,ylim=c(0,60))
# Example linear estimation and design of experiments. D.D. Joshi. 1987
# Professor of Statistics, Institute of Social Sciences Agra, India
# 6 varieties of wheat crop in a BIB whit 10 blocks of 3 plots each.
y <-c(69,77,72,63,70,54,65,65,57,59,50,45,68,75,59,38,60,60,62,
55,54,65,62,65,61,39,54,67,63,56)
varieties<-gl(6,5)
block <- c(1,2,3,4,5,1,2,6,7,8,1,3,6,9,10,2,4,7,9,10,3,5,7,8,9,4,5,6,8,10)
model<-BIB.test(block, varieties, y)

}
\keyword{ models }

4 changes: 2 additions & 2 deletions man/agricolae.package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ designs applied specially for field experiments in agriculture and plant breedin
\tabular{ll}{
Package: \tab agricolae\cr
Type: \tab Package\cr
Version: \tab 1.0-1\cr
Date: \tab 2007-01-25\cr
Version: \tab 1.0-2\cr
Date: \tab 2007-02-06\cr
License: \tab This software may be re-distributed freely and used under the GPL license 2.0 or higher\cr
}
Planning of field experiments: lattice, factorial, RCBD, CRD, Latin Square, Greaco, BIB, Alpha design.
Expand Down
3 changes: 2 additions & 1 deletion man/carolina3.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
\usage{data(carolina3)}
\format{
A data frame with 72 observations on the following 5 variables.
A data frame with 64 observations on the following 5 variables.
\describe{
\item{\code{set}}{a numeric vector}
\item{\code{male}}{a numeric vector}
Expand All @@ -19,6 +19,7 @@

\source{
Biometrical Methods in Quantitative Genetic Analysis, Singh, Chaudhary. 1979.
table 3. Raw data for B.C. Design-III. pag 207
}
\references{
Biometrical Methods in Quantitative Genetic Analysis, Singh, Chaudhary. 1979.
Expand Down
2 changes: 1 addition & 1 deletion man/correlation.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ analysis<-correlation(pH,soil[,3:8],method="pearson",alternative="less")
analysis
detach(soil)

# Example 3: correlation between pH and % clay method kendall.
# Example 3: correlation between pH and clay method kendall.
data(soil)
attach(soil)
correlation(pH,clay,method="kendall", alternative="two.sided")
Expand Down
4 changes: 2 additions & 2 deletions man/cotton.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
}

\source{
Book spanish: Métodos estadísticos para la investigación.
Book spanish: Metodos estadisticos para la investigacion.
Autor: Calzada Benza
Universidad Nacional Agraria - La Molina - Peru..
}
\references{
Book spanish: Métodos estadísticos para la investigación.
Book spanish: Metodos estadisticos para la investigacion.
Autor: Calzada Benza
Universidad Nacional Agraria - La Molina - Peru.
}
Expand Down
2 changes: 1 addition & 1 deletion man/decimals.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%- decimals.
\title{ Finding the largest decimal number from the elements of a vector or matrix }
\description{
In many situations it is required to have a larger decimal number than a set
In many situations it is required to have a larger decimal number than a set
of values expressed in climbing, vector or matrix.
}
\usage{
Expand Down
31 changes: 0 additions & 31 deletions man/dimnames.order.Rd

This file was deleted.

6 changes: 3 additions & 3 deletions man/homog1.Rd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
\name{homog1}
\alias{homog1}
\docType{data}
\title{ Data of fríjol }
\title{ Data of frijol }
\description{
Data of fríjol under 4 technologies for the homogeneity of regression study.
Data of frijol under 4 technologies for the homogeneity of regression study.
Yield of Frijol in kg/ha in clean and dry grain.

Tecnnologies:
Expand All @@ -23,7 +23,7 @@
}

\references{
Oriente antioqueño (1972) (ICA.- Orlando Martinez W.)
Oriente antioqueno (1972) (ICA.- Orlando Martinez W.)
Colombia.
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/join.freq.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ table.freq(h1)
# Join classes 9,10,11 and 12 with little frequency.
inter<-join.freq(intervals,9:12) # with c(9,10,11,12) or 9:12
# new table
h2<-hist(size,breaks=inter,freq=TRUE,xlim=c(0,0.12),col="bisque")
h2<-hist(size,breaks=inter,xlim=c(0,0.12),col="bisque")
table.freq(h2)

}
Expand Down
Loading

0 comments on commit c254f61

Please sign in to comment.