search for: factora

Displaying 16 results from an estimated 16 matches for "factora".

Did you mean: factor
2009 Feb 27
1
testing two-factor anova effects using model comparison approach with lm() and anova()
I wonder if someone could explain the behavior of the anova() and lm() functions in the following situation: I have a standard 3x2 factorial design, factorA has 3 levels, factorB has 2 levels, they are fully crossed. I have a dependent variable DV. Of course I can do the following to get the usual anova table: > anova(lm(DV~factorA+factorB+factorA:factorB)) Analysis of Variance Table Response: DV Df Sum Sq Mean Sq F value Pr(&g...
2009 Apr 10
2
Problem with bargraph.CI in Sciplot package
...levels. Unfortunately the standard errors on the plot do not appear to be correct. Consider an analysis consisting of two factors A and B. When all factor level combinations are present all appears fine: library(sciplot) #all data response<-c(32,54,32,65,34,65,65,45,54,23,43,23,76,87,65,45) factorA<-c("A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B") factorB<-c("a","a","a","a&quot...
2008 Mar 25
0
Behaviour of interactions in glm
...I have this as a separate column in my data. So, it looks like I have factor A + factor B + factor C:factor B, but I don't want terms for the base level of factor B for that factor C:factor B interaction. An example of the data I'm trying to fit a model to could be as follows: Record FactorA FactorB Weight Response 1 1 1 1 0.73 2 1 2 0.5 0 3 1 3 1 1.00 4 2 1 0.33 2.77 5 2 2 0.4 0 6 2 3 5 0 (I've given a sample here, as...
2008 Nov 04
1
How to generate a new factor variable by two other factor variables
How to generate a new factor variable by two other factor variables? For example, if I have two factor variables, factorA and factorB, factorA factorB 0 0 0 0 1 0 0 1 1 1 Is there a simple way to generate a new 4-levels factor variable as factorC factorA factorB 0 0 0 0 0 0 1 1 0 2 0 1 3 1 1...
2004 Aug 06
1
Lattice: how to index in a custom panel function?
Hi, I have a lattice xyplot that contains panels according to FactorA, and curves for the 2 levels of Factor B within a panel. I try to add text in the panels of a lattice graph. I suppose I have to write a custom function (panel.txt). What I really would like is to adapt the text in the panel according to the levels of FactorA. In the manuals, I find examples for...
2008 Nov 30
2
Randomization of a two-way ANOVA?
Hello list, I wish to perform a randomization test on the F-statistics of a 2 way ANOVA but have not been able to find out how to do so - is there a package / function that can perform this that I am unaware of? FactorA has 6 levels (0,1,2,3,4,5) whereas FactorB has 3 (1,2,3). A sample: Resp. FactorA FactorB 2 0 2 3 1 2 1 2 2 0 3 2 0 4 2 0 5 2 4 0 1 6 1 1 1 2 1 0 3 1 1 4 1 0 5 1 2 0 2 3 1 2 1 2 2 2 3 2 1 4 2 0 5 2 3 0 1 3 1 1 1 2 1 0 3 1 0 4 1 7 1 3 2 2 3 0 3 3 1 4 3 0 5 3 1 0 3 Also, is the F-statistic an appro...
2010 Oct 06
2
ANOVA boxplots
Dear list, i have a quick and (hopefully) straightforward question regarding the plot-function after running aov. if i plot an equation like this: plot(dataSubjects~factorA, data=mydata) R gives me the boxplots for this particular factor A. my model, however contains several factors. is there a straightforward way to plot barplots for a specific factor with the constraint that those values are taken from only the cells of a second factor B? for instance, if A contai...
2006 Mar 14
1
R CMD check: problems possibly from mapply?
...own (omitted error controls etc., it still works), and can only guess that the R CMD check problems have to do with mapply (with which I am not all that familiar). I include the code (not reproducible) in case someone has an idea what I can do to make this function packageable. (The function as.factora is defined elsewhere in the package and takes the arguments x (a column of a data frame), na.level and na.show (a logical).): ########################################################## datNAtreat <- function(x, na.levels=NULL, na.show=FALSE) { if (!is.data.frame(x)) x <- as.data.frame(...
2012 Oct 02
1
Parametric effects in GAM
Hello! Can anyone give a tip how to plot parametric effects in an Generalized Additive Model, from mgcv package? Thanks, PM
2007 Jul 24
1
Using lmer with huge amount of data
...-subject ANCOVA with one covariate, and I would like to use lmer in R package lme4 to analyze the data. In the terminology of linear mixed models, I have a fixed factor A with 3 levels, a random factor B (subject), and a covariate (age) with a model like this MyResult <- lmer(Response ~ FactorA + Age + (1 | subject), MyData, ...) My input data are like this: For each subject I have a file (a huge matrix) storing the response values of the subject at many locations (~30,000 voxels) corresponding to factor A at the 1st level, another file for factor A at the 2nd level, and a 3rd file...
2005 Dec 26
3
factorial anova
Hello every body, I am trying to do a factorial anova analysis following this model: model<-anova(lm(responsevariable~factorA*factorB)) model<-anova(lm(luz$dosel~luz$estado*luz$Bosque)) Df Sum Sq Mean Sq F value Pr(>F) estado 1 6931.1 6931.1 41.6455 7.974e-06 *** Bosque 1 36.6 36.6 0.2197 0.6456 estado:Bosque 1 36.6 36.6 0.2197 0.6456 Residuals 16 2662.9 166.4 Strange...
2005 Oct 24
0
aggregating using several functions
...frame using several functions at once (e.g., mean plus standard error). How can I make this work using aggregate()? The help file says scalar functions are needed; can anyone help? Below is the code for my "meanse" function which I??d like to use like this: aggregate(dataframe, list(factorA,factoB),meanse) Thanks for your help! Christoph meanse<-function(x,...,na.rm=T){ if(na.rm) x<-x[!is.na(x)] m<-mean(x) s<-sd(x) l<-length(x) serr<-s/sqrt(l) return(data.frame(list("Mean"=m,"Std.Error"=serr))) }
2012 Nov 21
0
Two way manova
Hello everyone, I would like to perform a 2-way manova test, but I'm having some issues. I implemented like this Y<-cbind(Resp1,Resp2,Resp3,....,Respn) model<-manova(Y "tilda" FactorA*FactorB) summary.aov(model) 1. I don't know at what level I have to do the Type I error correction. Is it on p-values returned by "summary.aov(model)? Or is it when I compare each subgroup with another subgroup? Or is it for summary(model)? 2. I have a significant interaction on summar...
2010 Jun 15
3
summary stats on continuous data
I'm sorry for what I'm sure is a terribly simple question. I have a large dataframe along these lines: S<- 1:3 d<- data.frame(cbind(S=rep(paste('S',S,sep=""),each=30), trial=rep(1:3,each=10), FactorA=rep(paste('L',1,sep=""),each=30), Acc= c(rep(1,each=20),rep(0,each=10)), Sample=rep(1:10,3), DV= sample(runif(10),10))) but where each trial has hundreds of samples and where there are several hundred trials per subject. I need to comb through the data and find, for example,...
2010 Sep 15
0
A question on modelling binary response data using factors
...hile factor C has 5 levels (C1,C2,C3,C4,C5). The experiment has only partial coverage, that is not every A is tested with every B and every C. However, I was careful in the experimental design to ensure that every A and every B was tested against at least one C. Here is my experimental data: FactorA FactorB FactorC Hit Miss A1 B1 C1 17 83 A1 B1 C2 17 83 A1 B1 C3 18 82 A1 B1 C4 NA NA A1 B...
2007 Mar 29
3
Vector indexing question
Suppose you have 4 related vectors: a.id<-c(1:25, 1:25, 1:25) a.vals <- c(101:175) # same length as a.id (the values for those IDs) a.id.levels <- c(1:25) a.id.ratings <- rep(letters[1:5], times=5) # same length as a.id.levels What I would like to do is specify a rating from a.ratings (e.g. "e"), get the vector of corresponding IDs from a.id.levels (via