Displaying 20 results from an estimated 6000 matches similar to: "contrats hardcoded in aov()?"
2004 Jan 30
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with suggested (PR#6510)
I think there are two bugs in aov() that shows up when the right hand
side of `formula' contains both `-1' and an Error() term, e.g.,
aov(y ~ a + b - 1 + Error(c), ...). Without `-1' or `Error()' there
is no problem. I've included and example, and the source of aov()
with suggested fixes below.
The first bug (labeled BUG 1 below) creates an extra, empty stratum
inside
2004 Feb 02
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with (PR#6520)
I believe you are right, but can you please explain why anyone would want
to fit this model? It differs only in the coding from
aov(y ~ a + b + Error(c), data=test.df)
and merely lumps together the top two strata.
There is a much simpler fix: in the line
if(intercept) nmstrata <- c("(Intercept)", nmstrata)
remove the condition (and drop the empty stratum later if you
2005 Apr 13
2
multinom and contrasts
Hi,
I found that using different contrasts (e.g.
contr.helmert vs. contr.treatment) will generate
different fitted probabilities from multinomial
logistic regression using multinom(); while the fitted
probabilities from binary logistic regression seem to
be the same. Why is that? and for multinomial logisitc
regression, what contrast should be used? I guess it's
helmert?
here is an example
2006 Aug 22
1
summary(lm ... conrasts=...)
Hi Folks,
I've encountered something I hadn't been consciously
aware of previously, and I'm wondering what the
explanation might be.
In (on another list) using R to demonstrate the difference
between different contrasts in 'lm' I set up an example
where Y is sampled from three different normal distributions
according to the levels ("A","B","C")
2004 Mar 03
1
Confusion about coxph and Helmert contrasts
Hi,
perhaps this is a stupid question, but i need some help about
Helmert contrasts in the Cox model.
I have a survival data frame with an unordered factor `group'
with levels 0 ... 5.
Calculating the Cox model with Helmert contrasts, i expected that
the first coefficient would be the same as if i had used treatment
contrasts, but this is not true.
I this a error in reasoning, or is it
2001 Jun 15
1
contrasts in lm and lme
I am using RW 1.2.3. on an IBM PC 300GL.
Using the data bp.dat which accompanies
Helen Brown and Robin Prescott
1999 Applied Mixed Models in Medicine. Statistics in Practice.
John Wiley & Sons, Inc., New York, NY, USA
which is also found at www.med.ed.ac.uk/phs/mixed. The data file was opened
and initialized with
> dat <- read.table("bp.dat")
>
2005 Apr 23
2
ANOVA with both discreet and continuous variable
Hi all,
I have dataset with 2 independent variable, one (x1)
is continuous, the other (x2) is a categorical
variable with 2 levels. The dependent variable (y) is
continuous. When I run linear regression y~x1*x2, I
found that the p value for the continuous independent
variable x1 changes when different contrasts was used
(helmert vs. treatment), while the p values for the
categorical x2 and
2004 Oct 10
3
some help interpreting ANOVA results, please?
On Sun, 10 Oct 2004, RenE J.V. Bertin wrote:
> Could I ask some hints/help in interpreting the following ANOVA results,
> please? This concerns an experiment where I study the incidence and
> severity of motion sickness. I have Sickness.norm, a subjective
> discomfort/sickness estimate, normalised to 0..1, the session time T
> (normalised to 0..1 and binned in 0.2 wide bins) and a
2008 Nov 14
1
aov help
Please pardon an extremely naive question. I see related earlier
posts, but no responses which answer my particular question. In
general, I'm very confused about how to do variance decomposition with
random and mixed effects. Pointers to good tutorials or texts would
be greatly appreciated.
To give a specific example, page 193 of V&R, 3d Edition, illustrates
using raov assuming pure
2009 Nov 08
2
reference on contr.helmert and typo on its help page.
I'm wondering which textbook discussed the various contrast matrices
mentioned in the help page of 'contr.helmert'. Could somebody let me
know?
BTW, in R version 2.9.1, there is a typo on the help page of
'contr.helmert' ('cont.helmert' should be 'contr.helmert').
2005 Feb 15
2
summary(aov(...)) into a string?
It doesn't print anything: the summary.aov (or summary.aovlist)
print method does.
?summary.aov tells you the structure of the objects they return.
On Tue, 15 Feb 2005, RenE J.V. Bertin wrote:
> I'd like to annotate a plot with the output of summary(aov(model)),
> ideally just with the significant effects. I don't find a means to
> redirect what that command prints into
2004 Nov 18
4
Re: changing (core) function argument defaults?
>From: Patrick Connolly <p.connolly@hortresearch.co.nz>
>To: "RenE J.V. Bertin" <rjvbertin@hotmail.com>
>Subject: Re: [R] changing (core) function argument defaults?
>Date: Thu, 18 Nov 2004 11:43:10 +1300
>
>On Wed, 20-Oct-2004 at 07:48PM +0200, RenE J.V. Bertin wrote:
>
>|> Hello,
2004 Nov 18
4
Re: changing (core) function argument defaults?
>From: Patrick Connolly <p.connolly@hortresearch.co.nz>
>To: "RenE J.V. Bertin" <rjvbertin@hotmail.com>
>Subject: Re: [R] changing (core) function argument defaults?
>Date: Thu, 18 Nov 2004 11:43:10 +1300
>
>On Wed, 20-Oct-2004 at 07:48PM +0200, RenE J.V. Bertin wrote:
>
>|> Hello,
2007 Jun 28
2
aov and lme differ with interaction in oats example of MASS?
Dear R-Community!
The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov and lme without interaction term and the results are the same.
But I have problems to reproduce the example aov with interaction in MASS (10.2, p.301) with lme. Here the script:
library(MASS)
library(nlme)
options(contrasts = c("contr.treatment", "contr.poly"))
# aov: Y ~
2008 Sep 26
1
Type I and Type III SS in anova
Hi all,
I have been trying to calculate Type III SS in R for an unbalanced two-way
anova. However, the Type III SS are lower for the first factor compared to
type I but higher for the second factor (see below). I have the impression
that Type III are always lower than Type I - is that right?
And a clarification about how to fit Type III SS. Fitting model<-aov(y~a*b)
in the base package and
2000 Aug 01
1
Testing for parallel slopes
I'm running a series of simple bivariate linear regressions on grouped
data. I want to test the slopes to see if they are parallel. I normally
use analysis of covariance to do so, looking at interaction between the
covariate and the factor to make this determination.
VR3 pp.149 - 154 has a very nice example of an ANOCOVA, ending with a
discussion of this very operation.
My question has
2005 Feb 23
1
model.matrix for a factor effect with no intercept
I was surprised by this (in R 2.0.1):
> a <- ordered(-1:1)
> a
[1] -1 0 1
Levels: -1 < 0 < 1
> model.matrix(~ a)
(Intercept) a.L a.Q
1 1 -7.071068e-01 0.4082483
2 1 -9.073800e-17 -0.8164966
3 1 7.071068e-01 0.4082483
attr(,"assign")
[1] 0 1 1
attr(,"contrasts")
attr(,"contrasts")$a
[1]
2005 Aug 29
1
lme and ordering of terms
Dear R users,
When fitting a lme() object (from the nlme library), is it possible to
test interactions *before* main effects? As I understand, R
conventionally re-orders all terms such that highest-order interactions
come last - but I??d like to know if it??s possible (and sensible) to
change this ordering of terms.
I??ve tried the terms() command (from aov) but I don??t know if something
2003 Aug 14
1
gnls - Step halving....
Hi all,
I'm working with a dataset from 10 treatments, each
treatment with 30 subjects, each subject measured 5
times. The plot of the dataset suggests that a
3-parameter logistic could be a reasonable function to
describe the data. When I try to fit the model using
gnls I got the message 'Step halving factor reduced
below minimum in NLS step'. I´m using as the initial
values of the
2002 Jul 09
3
portable snprintf implementation
This may be of interest:
http://www.ijs.si/software/snprintf/
It looks like this version may well be more complete and conform the standards than the version that comes with R.
BTW: I am currently patching unix/sys_std.c and modules/gtkconsole.c such that they don't store lines in the history that are identical to the previous line. Is there any interest in posting those patches here?
RenE