[R] R: fractional factorial design in R
statistical.model@googlemail.com
statistical.model at googlemail.com
Tue Jan 24 21:46:07 CET 2006
>If an orthogonal main effect plan exists for the number of trials you
specify, optFederov() in AlgDesign will more than likely find it for
you, since such a design should be an optimal design.
thanks very much to you and the others!!
I have written a little function, and now the syntax to obtain an orthogonal
design such as 2x4x3x2 is:
design.test <- gen.orthogonal.design(c(2,4,3,2))
gen.orthogonal.design <- function(listFactors){
library(AlgDesign)
FactorsNames<-c("A","B","C","D","E","F","G","H","J","K","L")
numFactors<-length(listFactors)
dat<-gen.factorial(listFactors,center=FALSE,varNames=FactorsNames[1:numFacto
rs])
desPB<-optFederov(~.,dat,nRepeats=20,approximate=TRUE)
design<-desPB$design[,2:numFactors]
cat("Minimum number of trials: ", fill=T, length(design[,1]),
append=T)
#cor(design)
return(design)
}
Roberto Furlan
University of Turin, Italy
----------------------------------------
La mia Cartella di Posta in Arrivo è protetta con SPAMfighter
188 messaggi contenenti spam sono stati bloccati con successo.
Scarica gratuitamente SPAMfighter!
More information about the R-help
mailing list