search for: fact3

Displaying 6 results from an estimated 6 matches for "fact3".

Did you mean: fact
2004 Aug 12
0
Re: R-help Digest, Vol 18, Issue 12
...aov1 was "Estimated effects <may> be unbalanced". The effects are not unbalanced. The design is 'orthogonal'. The problem is that there are not enough degrees of freedom to estimate all those error terms. If you change the model to: aov1 <- aov(RT~fact1*fact2*fact3+Error(sub/(fact1+fact2+fact3)),data=myData) or to aov2 <- aov(RT~fact1*fact2*fact3+Error(sub/ ((fact1+fact2+fact3)^2)),data=myData) all is well. This last model (aov2) seems to me to have an excessive number of error terms. The lme model lme(RT~fact1*fact2*fact3, random=~1|sub, data...
2009 Jan 23
3
Table Modification
...s in the table, I would like to print the values of a third variable that correspond to the frequencies. For example, the following is easily constructed in R > fact1 <- factor(sample(LETTERS[1:3],10,replace=TRUE)) > fact2 <- factor(sample(LETTERS[25:26],10,replace=TRUE)) > fact3 <- letters[1:10] > data.frame(fact1,fact2,fact3) fact1 fact2 fact3 1 C Z a 2 A Y b 3 A Y c 4 C Z d 5 A Z e 6 A Y f 7 B Y g 8 B Y h 9 C Z i 10 A Y j...
2004 Aug 11
1
Fwd: Enduring LME confusion… or Psychologists and Mixed-Effects
In my undertstanding of the problem, the model lme1 <- lme(resp~fact1*fact2, random=~1|subj) should be ok, providing that variances are homogenous both between & within subjects. The function will sort out which factors & interactions are to be compared within subjects, & which between subjects. The problem with df's arises (for lme() in nlme, but not in lme4), when
2005 Apr 28
2
Reconstruction of a "valid" expression within a function
Hello all, I have some trouble in reconstructing a valid expression within a function, here is my question. I am building a function : SUB<-function(DF,subset=TRUE) { #where DF is a data frame, with Var1, Var2, Fact1, Fact2, Fact3 #and subset would be an expression, eg. Fact3 == 1 #in a first time I want to build a subset from DF #I managed to, with an expression like eg. DF$Fact3, # but I would like to skip the DF$ for convenience # so I tried something like this : tabsub<-deparse(substitute(subset)) dDF<-deparse(s...
2004 Aug 10
4
Enduring LME confusion… or Psychologists and Mixed-Effects
Dear ExpeRts, Suppose I have a typical psychological experiment that is a within-subjects design with multiple crossed variables and a continuous response variable. Subjects are considered a random effect. So I could model > aov1 <- aov(resp~fact1*fact2+Error(subj/(fact1*fact2)) However, this only holds for orthogonal designs with equal numbers of observation and no missing values.
2005 Apr 26
0
Construction of a "mean" contengency table
...rlist is a list of the two factor I want to mean against (but I'm noot sure List is the best form for this argument), ## eg. list(DF$fact1, DF$fact2) ## FUN would be the function I want to use during aggregation, ## eg. Mean( ) ## condition would be a condition for building a subset ## eg. DF$fact3==1 { sDF <- subset(DF, condition) A <- aggregate(sDF, factorlist, FUN) M <- matrix(data=NA, nrow = length(levels(factorlist[[1]])), ncol = length(levels(factorlist[[2]])), dimnames = list(levels(factorlist[[1]]),levels(factorlist[[2]]) ) ) for (i in 1:length(A[,1]))...