similar to: Question about factor that is numeric, in aov()

Displaying 20 results from an estimated 20000 matches similar to: "Question about factor that is numeric, in aov()"

2010 Mar 01
5
Type-I v/s Type-III Sum-Of-Squares in ANOVA
Hello, I believe the aov() function in R uses a "Type-I sum-of-squares" by default as against "Type-III". This is relevant for me because I am trying to understand ANOVA in R using my knowledge of ANOVA in SPSS. I can only reproduce the results of an ANOVA done using R through SPSS if I specify that SPSS uses a Type-I sum-of-squares. (And yes, I know that when the sample
2010 Mar 28
6
Coding of categorical variables for logistic regression?
Hello, I am trying to do a logistic regression and have one predictor variable (x) that is ratio and two predictor variables (y and z) that are categorical. These have three levels each which I have called "High", "Medium" and "Low". My question: do I need to use a numerical coding scheme for the categorical variables as required by some statistical software
2010 Mar 09
3
Help with ANOVA in R
Hi I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using this correctly. Two major questions I have are: 1) Is using the code (zzz.aov <- aov(Intensity ~
2010 Mar 09
1
Source code for the t-distribution
I have tried looking for the source code for the pt() function in https://svn.r-project.org/R/trunk/src/library/stats/ and am unable to find it there. Can someone please tell me where to find it? Thanks, Ravi Kulkarni -- View this message in context: http://n4.nabble.com/Source-code-for-the-t-distribution-tp1585875p1585875.html Sent from the R help mailing list archive at Nabble.com.
2003 Apr 10
3
multiple numerical variables in aov
Hi all, I have a question regarding the anova function aov(). I want to perform an anova calculation using one grouping variable but more than one numerical variables: So instead of: aov(v ~ g) I want something like aov(v1 + v2 + v3 ~ g) Essentially I want to find out whether the variables v1, v2, v3, etc can collectively discriminate between different values of variable g. Could
2011 Mar 16
4
Scope of variable?
I know this is a very elementary question... I could not find a solution looking at old posts. I am unable to access a variable outside the scope of a for loop, even when the variable was defined before the loop: haar <- function() { a = c(1.4560773, 2.3752412, 0.9798882, 3.0909252, 2.3986487, 1.8581543) for (i in c(1:100)) { m = matrix(rnorm(36)+1i*rnorm(36),6) qrm = qr(m) Q = qr.Q(qrm)
2008 Apr 28
2
F values from a Repeated Measures aov
Hi Folks, I have repeated measures for data on association time (under 2 acoustic condtions) in male and female frogs as they grow to adulthood (6 timepoints). Thus, two within-subject variables (Acoustic Condition: 2 levels, Timepoint: 6 levels) and one between-subject variable (Sex:male or female). I am pretty sure my distributions depart from normality but I would first like to simply run a
2011 Apr 05
2
Time series example in Koop
I am trying to reproduce the output of a time series example in Koop's book "Analysis of Financial Data". Koop does the example in Excel and I used the ts function followed by the lm function. I am unable to get the exact coefficients that Koop gives - my coefficients are slightly different. After loading the data file and attaching the frame, my code reads: > y = ts(m.cap) >
2010 Mar 17
2
define F-ratio computations with aov
Greetings to all, This is my model: aov.fit<-aov(Y~A+B+C+D+E+A:C+A:E) In summary(aov.fit) all F values are comptuted by eg MS(A)/MS(Residuals). This is not correct (or what I want), except for F(B) and F(A:E). I suppose P values are not correct either. Is it possible with aov to define the way F computations will be done? I 'd like them to be like this: F(A)=MS(A)/MS(E),
2010 Mar 02
2
ANOVA "Types" and Regression models: the same?
Hello, I think I am beginning to understand what is involved in the so-called "Type-I, II, ..." ANOVAS (thanks to all the replies I got for yesterday's post). I have a question that will help me (and others?) understand it better (or remove a misunderstanding): I know that ANOVA is really a special case of regression where the predictor variable is categorical. I know that there
2011 Dec 11
2
multiple comparison of interaction of ANCOVA
Hi there, The following data is obtained from a long-term experiments. > mydata <- read.table(textConnection(" + y year Trt + 9.37 1993 A + 8.21 1995 A + 8.11 1999 A + 7.22 2007 A + 7.81 2010 A + 10.85 1993 B + 12.83 1995 B + 13.21 1999 B + 13.70 2007 B + 15.15 2010 B + 5.69 1993 C + 5.76 1995 C + 6.39 1999
2010 Feb 26
2
TukeyHSD troubles
I've tried to run a Tukey post-hoc but keep getting this weird error, whether the aov was significant or not. treat_code is a dummy variable, but that shouldn't matter. Any suggestions? Thanks Amy > summary(aov(EtoH~treat_code, mydata)) Df Sum Sq Mean Sq F value Pr(>F) treat_code 1 16.44 16.44 11.027 0.001014 ** Residuals 287 427.91 1.49 --- Signif.
2012 Nov 24
1
Adding a new variable to each element of a list
Hello, I have a list of data with multiple elements, and each element in the list has multiple variables in it. Here's an example: ### Make the fake data dv <- c(1,3,4,2,2,3,2,5,6,3,4,4,3,5,6) subject <- factor(c("s1","s1","s1","s2","s2","s2","s3","s3","s3",
2009 Apr 08
1
Anova interaction not tested
I've noticed with certain datasets that when I try to do an anova and test for main effects and interaction for two explanatory variables, sometimes the main effect results are given but not the interaction results. For example, ex1 = aov(Score ~ var1*var2, data=myData) summary(ex1) gives me only the main effects for var1 and var2, but not the interaction. I also tried ex1 = aov(Score ~
2007 Jul 10
4
type III ANOVA for a nested linear model
Hello, is it possible to obtain type III sums of squares for a nested model as in the following: lmod <- lm(resp ~ A * B + (C %in% A), mydata)) I have tried library(car) Anova(lmod, type="III") but this gives me an error (and I also understand from the documentation of Anova as well as from a previous request (http://finzi.psych.upenn.edu/R/Rhelp02a/archive/64477.html) that it is
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.
2007 Aug 02
6
Error message in lmer
I do not think anyone has answered this. > I'm trying to run a simple one-way ANCOVA with the lmer > function in R package lme4, but have encountered some > conceptual problem. The data file MyData.txt is like this: > > Group Subj Cov Resp > A 1 3.90 4.05 > A 2 4.05 4.25 > A 3 4.25 3.60 > A 4 3.60 4.20 > A 5 4.20 4.05 > A 6 4.05 3.85
2003 Oct 15
2
aov and non-categorical variables
It is unclear to me how aov() handles non-categorical variables. I mean it works and produces results that I would expect, but I was under impression that ANOVA is only defined for categorical variables. In addition, help(aov) says that it "call to 'lm' for each stratum", which I presume means that it calls to lm() for every group of the categorical variable, however I
2005 Nov 08
1
Type II and III sums of squares with Error in AOV
I've recently run into the problem of using aov with nested factors, and wanting to get the type II and III sums of squares. Normally Anova from the car package would do fine, but it doesn't like having an Error included, so my.aov <-aov(Response ~ Treatment + Error(Treatment:Replicate)) Anova(my.aov, type="II") yields Error in Anova(nested.anova) : no applicable method
2011 Jan 07
2
anova vs aov commands for anova with repeated measures
Dear all, I need to understand a thing in the beheaviour of the two functions aov and anova in the following case involving an analysis of ANOVA with repeated measures: If I use the folowing command I don´t get any problem: >aov1 = aov(response ~ stimulus*condition + Error(subject/(stimulus*condition)), >data=scrd) > summary(aov1) Instead if I try to fit the same model for the