Displaying 20 results from an estimated 9000 matches similar to: "Contr.poly for n > 100 (PR#2326)"
2011 Feb 03
3
interpret significance from the contr.poly() function
Hello R-help
I don’t know how to interpret significance from the contr.poly() function . From
the example below
: how can I tell if data has a significant Linear/quadratic/cubic trend?
> contr.poly(4, c(1,2,4,8))
.L .Q .C
[1,] -0.51287764 0.5296271 -0.45436947
[2,] -0.32637668 -0.1059254 0.79514657
[3,] 0.04662524 -0.7679594 -0.39757328
[4,] 0.79262909
2005 Jul 13
1
Name for factor's levels with contr.sum
Good morning,
I used in R contr.sum for the contrast in a lme model:
> options(contrasts=c("contr.sum","contr.poly"))
> Septo5.lme<-lme(Septo~Variete+DateSemi,Data4.Iso,random=~1|LieuDit)
> intervals(Septo5.lme)$fixed
lower est. upper
(Intercept) 17.0644033 23.106110 29.147816
Variete1 9.5819873 17.335324 25.088661
Variete2 -3.3794907 6.816101 17.011692
Variete3
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
2010 Sep 23
2
Contraste polinomial con dos factores con niveles no equidistantes
Hola compañeros de la lista, qué tal.
Los molesto con la siguiente duda: Tengo un experimento con dos
factores A y B, cada uno de los cuales tiene los siguientes niveles (que
son concentraciones de dos hormonas vegetales aplicadas a plantas):
niveles del factor A: 0, 0.2, 0.5, 1
niveles del factor B: 0, 0.1, 0.2, 0.5, 1
y mi variable de respuesta es continua, todo dentro del set de datos
2006 May 11
2
greco-latin square
Hi,
I am analyzing a repeated-measures Greco-Latin Square with the aov command.
I am using aov to calculate the MSs and then picking by hand the appropriate
neumerator and denominator terms for the F tests.
The data are the following:
responseFinger
mapping.code Subject.n index middle ring
little
----------------------------------------------------------------------------
1 1
2010 Apr 21
5
Bugs? when dealing with contrasts
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with
2007 Oct 09
2
fit.contrast and interaction terms
Dear R-users,
I want to fit a linear model with Y as response variable and X a categorical variable (with 4 categories), with the aim of comparing the basal category of X (category=1) with category 4. Unfortunately, there is another categorical variable with 2 categories which interact with x and I have to include it, so my model is s "reg3: Y=x*x3". Using fit.contrast to make the
2015 Jul 17
1
Improvements (?) in stats::poly and stats::polym.
Dear Keith,
>>>>> <Keith.Jewell at campdenbri.co.uk>
>>>>> on Thu, 16 Jul 2015 08:58:11 +0000 writes:
> Dear R Core Team,
> Last week I made a post to the R-help mailing list
> ?predict.poly for multivariate data?
> <https://stat.ethz.ch/pipermail/r-help/2015-July/430311.html>
> but it has had no responses so I?m
2008 Aug 26
2
options("contrasts")
Code:
> options("contrasts")
$contrasts
factor ordered
"contr.treatment" "contr.poly"
I want to change the first entry ONLY, without retyping "contr.poly". How do
I do it? I have tried various possibilities and cannot get anything to work.
I found out that the response to options("contrasts") has class
2010 Jul 07
6
forcing a zero level in contr.sum
I need to use contr.sum and observe that some levels are not statistically different from the overall mean of zero.
What is the proper way of forcing the zero estimate? It seems the column corresponding to that level should become a column of zeros.
Is there a way to achieve that without me constructing the design matrix?
Thank you.
Stephen Bond
[[alternative HTML version deleted]]
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]
2006 Aug 17
1
Setting contrasts for polr() to get same result of SAS
Hi all,
I am trying to do a ordered probit regression using polr(), replicating a
result from SAS.
>polr(y ~ x, dat, method='probit')
suppose the model is y ~ x, where y is a factor with 3 levels and x is a
factor with 5 levels,
To get coefficients, SAS by default use the last level as reference, R by
default use the first level (correct me if I was wrong),
The result I got is a
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
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
2012 Oct 07
1
Why do I get different results for type III anova using the drop1 or Anova command?
Dear experts,
I just noticed that I get different results conducting type III anova
using drop1 or the Anova command from the car package. I suppose I made
a mistake and hope you can offer me some help. I have no idea where I
got wrong and would be very grateful for explaination as R is new
terrain for me.
If I run the commands in line, they produce the same results. But if I
run them in
2006 Sep 23
1
contrasts in aov
useRs,
A no doubt simple question, but I am baffled. Indeed, I think I
once knew the answer, but can't recover it. The default contrasts
for aov (and lm, and...) are contr.treatment and contr.poly for
unordered and ordered factors, respectively. But, how does one
invoke the latter? That is, in a data.frame, how does one indicate
that a factor is an *ordered* factor such that
2007 Feb 14
1
se.contrast confusion
Hello,
I've got what I'd expect to be a pretty simple issue: I fit an aov object
using multiple error strata, and would like some significance tests for the
contrasts I specified.
In this contrived example, I model some test score as the interaction of a
subject's gender and two emotion variables (angry, happy, neutral), measured
at entry to the experiment (entry) and later
2007 Jan 08
2
Contrasts for ordered factors
Dear all,
I do not seem to grasp how contrasts are set for ordered factors. Perhaps someone can elighten me?
When I work with ordered factors, I would often like to be able to reduce the used polynomial to a simpler one (where possible). Thus, I would like to explicetly code the polynomial but ideally, the intial model (thus, the full polynomial) would be identical to one with an ordered factor.
2004 Aug 20
1
drop1 with contr.treatment
Dear R Core Team
I've a proposal to improve drop1(). The function should change the
contrast from the default ("treatment") to "sum". If you fit a
model with an interaction (which ist not signifikant) and you
display the main effect with
drop1( , scope = .~., test = "F")
If you remove the interaction, then everything's okay. There is
no way to fit a
2002 Nov 07
4
Preferable contrasts?
Dear all,
I'm working with Cox-regression, because data could be censored.
But in this particular case not.
Now I have a simple example: PRO and PRE are (0,1) coded.
The response is not normal distributed.
We are interested in a model which could describe interaction.
But my results are depending strongly in the choose of the contrast option.
It is clear that there is some dependence in