similar to: Contrast matrices for nested factors

Displaying 20 results from an estimated 20000 matches similar to: "Contrast matrices for nested factors"

2008 Nov 10
1
question about contrast in R for multi-factor linear regression models?
Hi all, I am using "lm" to fit some anova factor models with interactions. The default setting for my unordered factors is "treatment". I understand the resultant "lm" coefficients for one factors, but when it comes to the interaction term, I got confused. > options()$contrasts unordered ordered "contr.treatment"
2002 Dec 01
1
generating contrast names
Dear R-devel list members, I'd like to suggest a more flexible procedure for generating contrast names. I apologise for a relatively long message -- I want my proposal to be clear. I've never liked the current approach. For example, the names generated by contr.treatment paste factor to level names with no separation between the two; contr.sum simply numbers contrasts (I recall an
2012 May 11
1
set specific contrasts using lapply
I have the following data set > data A B X1 X2 Y 1 A1 B1 1.1 2.9 1.2 2 A1 B2 1.0 3.2 2.3 3 A2 B1 1.0 3.3 1.6 4 A2 B2 0.5 2.6 3.1 > sapply(data, class) A B X1 X2 Y "factor" "factor" "numeric" "numeric" "numeric" I'd like to set a specific type of contrasts to all the categorical factors
2010 Dec 13
1
Wrong contrast matrix for nested factors in lm(), rlm(), and lmRob()
This message also reports wrong estimates produced by lmRob.fit.compute() for nested factors when using the correct contrast matrix. And in these respects, I have found that S-Plus behaves the same way as R. Using the three available contrast types (sum, treatment, helmert) with lm() or lm.fit(), but just contr.sum with rlm() and lmRob(), and small examples, I generated contrast matrices for
2009 Jan 23
1
Interpreting model matrix columns when using contr.sum
With the following example using contr.sum for both factors, > dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way > model.matrix(~ a * b, dd, contrasts = list(a="contr.sum", b="contr.sum")) (Intercept) a1 a2 b1 b2 b3 a1:b1 a2:b1 a1:b2 a2:b2 a1:b3 a2:b3 1 1 1 0 1 0 0 1 0 0 0 0 0 2 1 1 0 0 1 0
2005 Sep 28
2
Summary of translation status
Dear R-devel & Translation Teams, In order to monitor the progress of the translation for the pt_BR team I wrote a script to summarize the status of the translations. It wasn't difficult to extend it to the other languages so I decided to set up a page with the summaries of the translation for all languages for which currently exist a translation.
2012 Jul 06
2
Anova Type II and Contrasts
the study design of the data I have to analyse is simple. There is 1 control group (CTRL) and 2 different treatment groups (TREAT_1 and TREAT_2). The data also includes 2 covariates COV1 and COV2. I have been asked to check if there is a linear or quadratic treatment effect in the data. I created a dummy data set to explain my situation: df1 <- data.frame( Observation =
2012 Oct 27
1
contr.sum() and contrast names
Hi! I would like to suggest to make it possible, in one way or another, to get meaningful contrast names when using contr.sum(). Currently, when using contr.treatment(), one gets factor levels as contrast names; but when using contr.sum(), contrasts are merely numbered, which is not practical and can lead to mistakes (see code at the end of this message). This issue was discussed quickly in 2005
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
2010 Mar 10
2
Using R in a corporate envinronment
Dear r-useRs, After a couple of years in a 'R exile' of sorts, I've recently changed jobs and my current employer (an American multinational in the food manufacturing industry) is much more open than my past employer (which wouldn't even want to hear about anything that didn't begin with SAS...). So, after my insistence corporate IT is now considering adopting R as part of our
2010 Mar 10
2
Using R in a corporate envinronment
Dear r-useRs, After a couple of years in a 'R exile' of sorts, I've recently changed jobs and my current employer (an American multinational in the food manufacturing industry) is much more open than my past employer (which wouldn't even want to hear about anything that didn't begin with SAS...). So, after my insistence corporate IT is now considering adopting R as part of our
2004 Dec 18
1
Sums of sq in car package Anova function
Hello R users, I am trying to run a three factor ANOVA on a data set with unequal sample sizes. I fit the data to a 'lm' object and used the Anova function from the 'car' package with the 'type=III' option to get type III sums of squares. I also set the contrast coding option to 'options(contrasts = c("contr.sum", "contr.poly"))' as
2004 Nov 16
5
Difference between two correlation matrices
Hi Now a more theoretical question. I have two correlation matrices - one of a set of variables under a particular condition, the other of the same set of variables under a different condition. Is there a statistical test I can use to see if these correlation matrices are "different"? Thanks Mick
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
2003 Oct 11
2
Problem in 'methods' package (PR#4525)
Full_Name: Fernando Henrique Ferraz Pereira da Rosa Version: 1.8.0 OS: Linux 2.4.21 Submission from: (NULL) (200.206.211.169) After installing R 1.8.0, the R DBI interface stopped working. I tracked it down as a problem in the 'methods' package, that comes in the default installation. Somehow the function '.valueClassTest' which is defined on package 'methods',
2012 Nov 05
0
Diference in results from doBy::popMeans, multcomp::glht and contrast::contrast for a lme model
Hello R users, I'm analyzing an experiment in a balanced incomplet block design (BIB). The effect of blocks are assumed to be random, so I'm using nlme::lme for this. I'm analysing another more complex experiments and I notice some diferences from doBy::popMeans() compared multcomp::glht() and contrast::contrast(). In my example, glht() and contrast() were equal I suspect popMeans()
2006 Feb 16
0
factors and contrast matrix
Hi, at the moment I'm trying to understand the limma/affy Packages. I've tried every example I could find to try and understand the ways to create design and contrast matrices. I must admit though, that I can't figure it out. I did a few times the estrogen files from the book "bioinformatics and computational biology solutions using R and Bioconductor". I know it's a
2009 May 04
1
how to change nlme() contrast parametrization?
How to set the nlme() function to return the answer without the intercept parametrization? #========================================================================================= library(nlme) Soybean[1:3, ] (fm1Soy.lis <- nlsList(weight ~ SSlogis(Time, Asym, xmid, scal),                        data = Soybean)) (fm1Soy.nlme <- nlme(fm1Soy.lis)) fm2Soy.nlme <- update(fm1Soy.nlme,
2004 Sep 11
3
SAS to R migration questions
Hi, I'd like to get away from SAS, but I don't really know R well enough at this point to know if it would be good for this project. I tried to describe the essence of the project below without getting bogged down in details. It starts when I receive a data flat file. There's lots of columns, but the relevant ones are: custid (customer ID number) saledt (date of sale)
2005 Mar 02
2
Suppressing observation numbers
Dear R gurus, Below is a part of the R output. Please consider the two lines: > data > model.matrix(m1) Is there a way of suppressing the observation numbers 1, 2, ...27 in the output (I don't want these number to appear in the output)? Regards, NKN > # Orthogonal blocking > data=read.table("cut.txt",header=T) > attach(data) > data b x1 x2 x3 1 1 -1 -1 0 2