similar to: Checking for orthogonal contrasts

Displaying 20 results from an estimated 7000 matches similar to: "Checking for orthogonal contrasts"

2011 Feb 02
2
unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis
Hello [R]-help I am trying to find > a package where you can do ANOVA based trend analysis on grouped data > using orthogonal polynomial contrasts coefficients, for unequally > spaced factor levels. The closest hit I've had is from this web site: >(http://webcache.googleusercontent.com/search?q=cache:xN4K_KGuYGcJ:www.datavis.ca/sasmac/orpoly.html+Orthogonal+polynomial >l but I
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.
2012 Aug 09
1
summary() after changing contrasts
Hi, After running a regression on a factor variable, summary() reports the coefficients 'nicely,' ie, labelled with a string that is a concatenation of the variable name and the factor label. However, changing the base case a la contrasts(variable)<-contr.treatment(N, base=x) results in the coefficients being reported as a less-helpful concatenation of variable name plus a digit. Of
2008 Apr 10
1
Orthogonal polynomial contrasts
How do you remove one of the terms from an ordered polynomial contrast in your linear model. For example, I have significant terms for linear and cubic but not quadratic, how would i remove the quadratic term from lm(response~treatment) Cheers, Chris -- View this message in context: http://www.nabble.com/Orthogonal-polynomial-contrasts-tp16608353p16608353.html Sent from the R help mailing list
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
2011 May 11
1
Help with contrasts
Hi, I need to build a function to generate one column for each level of a factor in the model matrix created on an arbitrary formula (instead of using the available contrasts options such as contr.treatment, contr.SAS, etc). My approach to this was first to use the built-in function for contr.treatment but changing the default value of the contrasts argument to FALSE (I named this function
2008 Oct 11
2
R vs SPSS contrasts
Hi Folks, I'm comparing some output from R with output from SPSS. The coefficients of the independent variables (which are all factors, each at 2 levels) are identical. However, R's Intercept (using default contr.treatment) differs from SPSS's 'constant'. It seems that the contrasts were set in SPSS using /CONTRAST (varname)=Simple(1) I can get R's Intercept to match
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 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
2010 May 08
1
matrix cross product in R different from cross product in Matlab
Hi all, I have been searching all sorts of documentation, reference cards, cheat sheets but can't find why R's crossprod(A, B) which is identical to A%*%B does not produce the same as Matlabs cross(A, B) Supposedly both calculate the cross product, and say so, or where do I go wrong? R is only doing sums in the crossprod however, as indicated by (z <- crossprod(1:4)) # = sum(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
2008 Jun 16
1
contrasts using adonis function
Hi, Somebody knows how to make contrasts if i'm using the function adonis? Thanks.
2010 Aug 29
2
glm prb (Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : )
glm(A~B+C+D+E+F,family = binomial(link = "logit"),data=tre,na.action=na.omit) Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : contrasts can be applied only to factors with 2 or more levels however, glm(A~B+C+D+E,family = binomial(link = "logit"),data=tre,na.action=na.omit) runs fine glm(A~B+C+D+F,family = binomial(link =
2001 Feb 08
2
Test for multiple contrasts?
Hello, I've fitted a parametric survival model by > survreg(Surv(Week, Cens) ~ C(Treatment, srmod.contr), > data = poll.surv.wo3) where srmod.contr is the following matrix of contrasts: prep auto poll self home [1,] 1 1 1.0000000 0.0 0 [2,] -1 0 0.0000000 0.0 0 [3,] 0 -1 0.0000000 0.0 0 [4,] 0 0 -0.3333333 1.0 0 [5,] 0 0
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
2013 Apr 27
1
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
i am getting the following error Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels can any on e suggest how to rectify [[alternative HTML version deleted]]
2019 Feb 21
2
model.matrix.default() silently ignores bad contrasts.arg
Dear Ben, Perhaps I'm missing the point, but contrasts.arg is documented to be a list. From ?model.matrix: "contrasts.arg: A list, whose entries are values (numeric matrices or character strings naming functions) to be used as replacement values for the contrasts replacement function and whose names are the names of columns of data containing factors." This isn't entirely
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
2003 Jan 16
2
polynomial contrasts in R
In S-Plus, I can obtain polynomial contrasts for an ordered factor with contr.poly(). The function also exists in R, however is limited to factors where the levels are equally spaced. In S-Plus, one can obtain the contrasts for a set of numeric values representing unequally spaced ordered factors. Has anyone implemented this in R? I see that the S-Plus function calls another function (poly.raw())
2011 May 20
1
Contrasts in Penalized Package
Hi, The "penalized" documentation says that "Unordered factors are turned into as many dummy variables as the factor has levels". This is done by a function in the package called contr.none. I'm trying to figure out how exactly is a model matrix created with this contrast option when the user calls the function with a formula. I typed "library(penalized) ;