similar to: Syntax for fit.contrast

Displaying 20 results from an estimated 10000 matches similar to: "Syntax for fit.contrast"

2017 Oct 22
3
Syntax for fit.contrast (from package gmodels)
David, Thank you for responding to my post. Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"): Call: glm(formula = events ~ type, family = poisson(link = log), data = data, offset = log(SS)) Deviance Residuals: Min 1Q Median 3Q Max -43.606 -17.295 -4.651 4.204 38.421 Coefficients:
2017 Oct 23
2
Syntax for fit.contrast (from package gmodels)
David, Again you have my thanks!. You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE. I don't mind if I get these on the log scale; I can get the anti-log. Can you suggest how I can get the point estimate and its SE for "regional"? The predict function will give the point estimate, but not (to my knowledge)
2017 Oct 22
0
Syntax for fit.contrast
> On Oct 22, 2017, at 6:04 AM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > I have a model (run with glm) that has a factor, type. Type has two levels, "general" and "regional". I am trying to get estimates (and SEs) for the model with type="general" and type ="regional" using fit.contrast ?fit.contrast No documentation for
2017 Oct 22
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 3:56 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > David, > Thank you for responding to my post. > > Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"): > Call: > glm(formula = events ~ type, family = poisson(link = log), data = data, > offset =
2017 Oct 23
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 5:01 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > David, > Again you have my thanks!. > You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE. There needs to be a reference value for the contrast. Contrasts are differences. I gave you the choice of two references
2017 Oct 23
1
Syntax for fit.contrast (from package gmodels)
David, predict.glm and se.fit were exactly what I was looking for. Many thanks! John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax)
2001 Aug 31
2
contrasts in lm
I've been playing around with contrasts in lm by specifying the contrasts argument. So, I want to specify a specific contrast to be tested Say: > y _ rnorm(100) > x _ cut(rnorm(100, mean=y, sd=0.25),c(-3,-1.5,0,1.5,3)) > reg _ lm(y ~ x, contrasts=list(x=c(1,0,0,-1))) > coef(reg)[2] x1 -1.814101 I was surprised to see that I get a different estimate for the
2006 Jul 17
2
planned comparisons for ANOVA
Hi, we need some help to define planned comparisons. I've based my understanding of the problem on reading Tabachnick and Fidell (2006), ie: http://www.ablongman.com/catalog/academic/product/0,1144,0205459382,00.html I don't understand how to specify planned comparisons in R. I've not found explanations for this in MASS or elsewhere. There is only discussion of the contrast
2006 Jan 18
3
linear contrasts with anova
I have some doubts about the validity of my procedure to estimeate linear contrasts ina a factorial design. For sake of semplicity, let's imagine a one way ANOVA with three levels. I am interested to test the significance of the difference between the first and third level (called here contrast C1) and between the first and the seconda level (called here contrast C2). I used the following
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
2009 Jul 10
1
problems with contrast matrix
Dear lme and lmer -ers, I have some problems using "home-made" contrast matrix in lme and lmer. I did an experiment to investigate the relationship between the response of an animal and some factors, namely the light wavelength (WA), the light intensity to which this animal was exposed and the sex of the animal tested. - The response can be a variable LA (normal distribution) or
2009 Aug 14
1
aov p values for levels of a factor.
Windows XP R2.8.1 I am running an balanced aov, in which Time has 4 levels, Group has 2 levels: fit2<-aov(Post ~ as.factor(Time) +as.factor(Group)+as.factor(Group*Time)+Error(SS), alldata) I would like to get a p value for each level of time, each level of Group and each level of Group*Time. How can I do this? I get this, which appears to be omnibus p values for the factors: Error: SS
2005 Jul 17
1
printing the name of the arguments passed to a function
R2.1.1 Win 2k I have a function, B, within a function, A. I would like to have B print the name of the argument passed to it (not the value of the arguments). i.e., A<-function() { B<-function(x,y) { fit1<-lm(y~x,data=jo) print(summary(fit1) I want B to print the string "age" and the string "height". } B(age,height) }
2011 Oct 28
4
Contrasts with an interaction. How does one specify the dummy variables for the interaction
Forgive my resending this post. To data I have received only one response (thank you Bert Gunter), and I still do not have an answer to my question. Respectfully, John Windows XP R 2.12.1 contrast package. I am trying to understand how to create contrasts for a model that contatains an interaction. I can get contrasts to work for a model without interaction, but not after adding the
2010 Jun 21
1
Contrast interaction effects in lmer object for reciprocal transplant experiment
Dear All: I am using lmer() {lme4} to analyze results from a reciprocal transplant experiment where the response variable is modeled as a function of two fixed effects and their interaction. Example data follow: #library(lme4) #library(gmodels)
2007 Jul 25
2
using contrasts on matrix regressions (using gmodels, perhaps)
Hi, I want to test for a contrast from a regression where I am regressing the columns of a matrix. In short, the following. X <- matrix(rnorm(50),10,5) Y <- matrix(rnorm(50),10,5) lm(Y~X) Call: lm(formula = Y ~ X) Coefficients: [,1] [,2] [,3] [,4] [,5] (Intercept) 0.3350 -0.1989 -0.1932 0.7528 0.0727 X1 0.2007 -0.8505 0.0520
2012 Jun 13
4
lme: extract result-function
Hi, mod <- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...) results in summary(mod)$coeff B C D E F G (Intercept) b c d e f g i Now I'm interested in the function f <- function(B,C,D,E,F,G) <- { return(i + b*B + c*C + d*D + e*E + f*F + g*G) } Is there a easier way to create such function with flexible number of coefficient, than do it by hand? thx Christof
2008 Jan 10
1
A Contrast Question
Hi Folks, This should have been simple to answer, but despite much chasing I don't seem able to catch this particular mouse! Basically (somewhat simplified): I have a binary response variable Y (0/1) and a 2-level factor A (0/1). I want to assign a contrast to A such that, when I run summary(glm(Y~A, family=binomial))$coef the Intercept coefficient is the result that I would get from
2013 Apr 23
1
Writing contrast statements to test difference of slope in linear regressions
Hi Everyone, I am uncertain that I am writing the contrast statements correctly. Basically, I'm unsure when to use a -1 and a 1 when writing the contrasts. Specifically I am interested in comparing the slopes between different temperature regimes. Temperature is therefore a factor. Time and percent are numerical. Using the gmodels package I made the following model:
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a #simple one-way anova. This is an example, I am not stupid enough to want #to simultaneously apply all of these contrasts to real data. With a few #exceptions, the tests that I would compute by hand (or by other software) #will give the same t or F statistics. It is the contrast estimates that R produces #that I can't seem to