[R] R: fractional factorial design in R

statistical.model@googlemail.com statistical.model at googlemail.com
Tue Jan 24 22:03:00 CET 2006


sorry, some small mistakes in the previuos syntax. This works!

design.test <- gen.orthogonal.design(c(2,4,3),numCards=16)
design.test

gen.orthogonal.design <- function(listFactors,numCards){
	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=FALSE,nTrials=numCards)
	design<-desPB$design#[,2:(numFactors+1)]
	cat("Number of trials: ", fill=T, length(design[,1]), append=T)
	print(cor(design))
	return(design)
}

However, it is necessary to run the function and guess numCards until the
correlation matrix is diagonal and all levels are selected for the final
design.
Any idea how to solve this problem without an iterative function?

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