Displaying 20 results from an estimated 33 matches for "constrasts".
Did you mean:
constrast
2010 Jun 11
0
passing constrasts=FALSE to contrast functions -- why does this exist?
Hello,
I've noticed that all contrast functions, like contr.treatment,
contr.poly, etc., take a logical argument called 'contrasts'. The
default is TRUE, in which case they do their normal thing of returning
a n x n-1 matrix whose columns are linearly-independent of the
intercept.
If contrasts=FALSE, they instead return an n x n matrix with full rank
(usually the identity matrix,
2010 Dec 14
0
defining contrasts in lm() - is there a simpler way?
....factor(x$new)
contrasts(x$new) <- cbind(" my constrast" = c( .5, -.5, 0, .5, 0, -.5))
summary(lm(y ~ new, x))
I have two questions concerning this:
1) if I take a look at the constrast matrix derived from the one
contrast I specified, I assume that R automatically adds the missing constrasts so they are orthogonal.
round(cor(attributes(x$new)$contrast), 1)
Is that always the case?
2) Can I get this in a simpler way? I find it a bit tedious to define the constrast like above.
Is there something simpler, like:
lm(y ~ f1:f2, + "user defined contrast definition inside lm th...
2013 Sep 13
1
Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?
Hello,
I have a problem with creating an identity matrix for glmnet by using the
contrasts function.
I have a factor with 4 levels.
When I create dummy variables I think there should be n-1 variables (in this
case 3) - so that the contrasts would be against the baseline level.
This is also what is written in the help file for 'contrasts'.
The problem is that the function
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users,
I have two factors (treat, section) anova design experiment where
there are 3 replicates. The objective of the experiment is to test if
there is significant difference of yield between top (section 9 to 11)
and bottom (section 9 to 11) of the fruit tree under treatment. I
found that there are interaction between two factors. I wonder if I
can contrast means from levels of
2008 Jun 16
1
contrasts using adonis function
Hi,
Somebody knows how to make contrasts if i'm using the function adonis?
Thanks.
2009 Jun 11
1
standard error beta glm
Dear All,
The std. error of the estimated coefficients
obtained by the summary.lm function can be calculated
as:
y=rnorm(20)
x=y+rnorm(20)
fit <- lm(y ~ x)
summary(fit)
sqrt( sum(fit$resid**2)/fit$df.resid * solve(t(model.matrix(fit))%*%model.matrix(fit)) )
Is posible calculate Std. Error for glm as lm, using
cov(hat beta) = phi * solve(t(X) %*% hat W %*% X)^-1
on R? Who is hat W and
2008 Jul 14
1
Tissue specific genes by ANOVA?
...ts.
Now I want to test if Heart is significant higher than Liver and Brain, or
Liver is significant higher than Heart an Brain, ...
I read about the pairwise.t.test, but I dont't want to test Heart against
Liver and Heart against Brain, ...
Is there any possibility to do that? ANOVA? Duncan? Constrasts?
Please help
--
View this message in context: http://www.nabble.com/Tissue-specific-genes-by-ANOVA--tp18441289p18441289.html
Sent from the R help mailing list archive at Nabble.com.
2005 Aug 26
1
basic anova and t-test question
Hello,
I'm posting this to receive some comments/hints about a rather statistical than R-technical question ... .
In an anova of a lme factor SSPos11 shows up non-significant, but in the t-test of the summay 2 of the 4 levels (one for constrast) are significant. See below for some truncated output.
I realize that the two test are different (F-test/t-test), but I'm looking for for a
2010 Oct 20
1
Please help: ANOVA with SS Type III for unequal sample sized data
Dear R experts,
I'm beginner.
My question about ANOVA for unequal sample sized data should be obsolete but
I can not clarify it.
I have a dataset from 23 males and 18 females.
I measured one condition('cond') with 4 levels.
So I'd like to see main effect of gender, cond and gender by cond
interaction and also postHoc test. (In fact, I have to do anova 90 times)
*
1. Question
2007 Jul 06
1
maintaining specified factor contrasts when subsetting in lmer
...say time 3 is the base. This
works fine. However, when
I next use the subset argument to remove the last two time values, the
output indicates that
the specified contrast is not maintained (see below). I can solve this
by creating a new dataframe
for the subset of interest and redefining the constrasts, but I was
wondering if there is a direct method that
allows me to continue w/ the subset argument? (perhaps via supplying a
contrast argument to lmer
directly, but this doesn't seem possible based on the defintion of this
argument in model.matrix.default).
Thanks,
Dave
z <- rnorm(24...
2003 Feb 17
1
lda on curves
...example variable might be a
directional component of angular momentum for a particular joint
measured at a large number (101) of equally spaced timepoints.
Each bowler generates a (fairly smooth) curve for each variable
measured. I decided to represent each curve by a few orthogonal
polynomial constrasts.
There are 4 groups of bowlers corresponding to various speeds of
delivery. I want to use canonical variant analysis to find linear
combinations of my transformed variables discriminating well between the
groups of bowlers.
I used lda() from the MASS library to do this, but examining the outpu...
2007 Jul 12
1
how to estimate treatment-interaction contrasts
Hello, R experts,
Sorry for asking this question again again since I really want a help!
I have a two-factor experiment data and like to calculate estimates of
interation contrasts say factor A has levels of a1, a2, and B has
levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the
constrast estimate I got is right using the script below:
2003 Jan 29
3
Analyzing an unbalanced AB/BA cross-over design
I am looking for help to analyze an unbalanced AB/BA cross-over design by
requesting the type III SS !
# Example 3.1 from S. Senn (1993). Cross-over Trials in Clinical
Research
outcome<-c(310,310,370,410,250,380,330,270,260,300,390,210,350,365,370,310,380,290,260,90,385,400,410,320,340,220)
subject<-as.factor(c(1,4,6,7,10,11,14,1,4,6,7,10,11,14,2,3,5,9,12,13,2,3,5,9,12,13))
2000 May 02
3
Possible bug in factor (PR#531)
The expressions
> x<-factor(x)
and
> class(x)<-"factor"
behave differently when x is already an ordered factor. It may not be a
bug but it caught me out when I was trying to remove the "orderedness"
from a factor variable. The following R code illustrates the difference.
Is this difference between the 2 commands desirable?
> x<-1:3
> class(x)
NULL
2006 Feb 16
0
SSQ decomposition and contrasts with ANOVA
...a2 vs (a1, a3) 1 ? ? ? ?
a1 vs a3 1 ? ? ? ?
--------------------------------------------------------
Residuals 18 23.090 1.283
--------------------------------------------------------
Or, In this case, how can I to test these constrasts?
Thanks for any help,
--
Jose Claudio Faria
Brasil/Bahia/UESC/DCET
Estatistica Experimental/Prof. Adjunto
mails:
joseclaudio.faria at terra.com.br
joseclaudio.faria at oi.com.br
jc_faria at uesc.br
jc_faria at uol.com.br
tel: 73-3634.2779
2007 Jul 03
0
how to calculate interaction contrast
Hello, R experts,
Sorry for asking this question again since I really want a help!
I have a two-factor experiment data and like to calculate estimates of
interation contrasts say factor A has levels of a1, a2, and B has
levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the
constrast estimate I got is right using the script below:
2006 Jul 28
0
tests performed by anova
Dear R-helpers,
In the case of two categorical factors, say a and b, once I have
fixed the constrasts, the model matrix is set according to these
contrasts with "lm", and the t-tests for the significance of the
parameters provided by "summary" indeed concern the comparison of the
model with each submodel obtained by removing the corresponding
column of the model matrix. So :...
2007 Jun 20
0
how to calculate estimate of interation contrast in two-factor experiment
Hello, R experts,
I have a two-factor experiment data and like to calculate estimates of
interation contrasts say factor A has levels of a1, a2, and B has
levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the
constrast estimate I got is right using the script below:
score<-c(7.2,6.5,6.9,6.4,6.9,6.1,6.9,5.3,7.2,5.7,5.1,5.9,7.6,6.9,6.8,
2007 Jun 22
0
interaction contrast
Hello, R experts,
Sorry for asking this question again since I really want a help!
I have a two-factor experiment data and like to calculate estimates of
interation contrasts say factor A has levels of a1, a2, and B has
levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the
constrast estimate I got is right using the script below:
2002 Oct 14
1
Post hoc Multiple comparison
Dear R-listers
I'm a new R-user who needs some help with a test that I want to do. I
have done a field experiment: four treatments (cont, x, y and xy) at
three sites (A, B and C), the response is count data (0 - 15). I've done
a Poisson regression:
>glm(response~as.factor(treatment)*as.factor(site), family=quasipoisson,
offset(max.response), data=dat)
The "offset" is the