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!

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to