Displaying 20 results from an estimated 10000 matches similar to: "fit.contrast or some other for interactions and stratified"
2005 Feb 20
1
Treatment-Contrast Interactions
Hello all,
(Apologies in advance if my terminology is incorrect, I'm relatively new
to R and statistics).
I have data from a factorial design with two treatments (CRF-23), and
I'm trying to compute treatment-contrast interactions through analysis
of variance. I can't figure out how to do contrasts properly, despite
reading the help for "C" and "contrasts"
2012 Oct 14
1
Problems with coxph and survfit in a stratified model, with interactions
First, here is your message as it appears on R-help.
On 10/14/2012 05:00 AM, r-help-request@r-project.org wrote:
> I?m trying to set up proportional hazard model that is stratified with
> respect to covariate 1 and has an interaction between covariate 1 and
> another variable, covariate 2. Both variables are categorical. In the
> following, I try to illustrate the two problems that
2012 Oct 13
4
Problems with coxph and survfit in a stratified model with interactions
I?m trying to set up proportional hazard model that is stratified with
respect to covariate 1 and has an interaction between covariate 1 and
another variable, covariate 2. Both variables are categorical. In the
following, I try to illustrate the two problems that I?ve encountered, using
the lung dataset.
The first problem is the warning:
To me, it seems that there are too many dummies
2001 Oct 23
1
summary of aov fit on a contrast basis
Hello,
In a book (David W. Stockburger, "Multivariate Statistics: Concepts,
Models, and Applications", chapter 12 "Contrasts, Special and
Otherwise", available online at http://www.psychstat.smsu.edu/multibook)
I've found some examples of doing analysis of variance on a contrast
basis.
I attach my solution (in R, the book uses SPSS) to this problem.
Am I computing the
2002 Sep 11
0
Contrasts with interactions
Dear All,
I'm not sure of the interpretation of interactions with contrasts. Can anyone help?
I do an ANCOVA, dryweight is covariate, block and treatment are factors, c4 the response variable.
model<-aov(log(c4+1)~dryweight+treatment+block+treatment:block)
summary(model);
Df Sum Sq Mean Sq F value Pr(>F)
dryweight 1 3.947 3.947 6.6268 0.01076 *
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 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:
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:
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
2008 Dec 11
1
How to generate a prediction equation for a stratified survival model that was fitted by cph() in Design package
Dear all,
I used cph() function from Frank harrell's Design package to create a
survival model, then used functions 'Function' and 'sascode' to generate
prediction equation based on the saved survival model. But it failed. I
included a stratified variable in the model. If I removed the
stratification, they were working well. Does that mean that function
'Function'
2010 Apr 04
2
calculating an interaction statistic from stratified data
Dear R community,
I have data on beta&standard error (for the main effect of variable x),
stratified by sex for my dataset. I wish to calculate the sex-interaction
effect (as beta&se) from these two stratified datasets. Is there a package
to do this? If not, any advice how to do it manually?
Thank you very much and best regards, Georg.
************************
Georg Ehret, JHU,
2011 Aug 17
1
contrast package with interactions in gls model
Hi!
I try to explain the efffect of (1) forest where i took samples's soils (*
Lugar*: categorical variable with three levels), (2) nitrogen addition
treatments (*Tra*: categorical variable with two levels) on total carbon
concentration's soil samples (*C: *continue* *variable) during four months
of sampling (*Time:* categorical and ordered variable with four levels).
I fitted the
2002 May 30
0
se.contrast: matrix contrast.obj doesn't work as documented (PR#1613)
The man page for se.contrast, when describing the contrast.obj
parameter, states that "Multiple contrasts should be specified
by a matrix as returned by contrasts."
When doing an unbalanced single factor ANOVA, using a contrast.obj
as returned by contrasts results in the following error from
qr.qty when se.contrast is called:
Error in qr.qty(object$qr, contrast) : qr and y must have
2005 Mar 10
1
contrast matrix for aov
How do we specify a contrast interaction matrix for an ANOVA model?
We have a two-factor, repeated measures design, with
Cue Direction (2) x Brain Hemisphere(2)
Each of these has 2 levels, 'left' and 'right', so it's a simple 2x2 design
matrix. We have 8 subjects in each cell (a balanced design) and we want to
specify the interaction contrast so that:
CueLeft>CueRght
2009 Mar 01
1
SPSS repeated interaction contrast in R
dear all,
i'm trying to reproduce an spss-anova in R.
It is an 2x3x3 repeated measures desingn with repeated contrasts.
In R i've coded a contrast matrix for all factors and made a
split in the aov summary - but I can't get the repeated interaction contrasts.
The output from SPSS looks like this:
TaskSw * CongNow * CongBefore: SS df Mean Square F Sig.
1 vs. 2 1 vs. 2 1 vs. 2
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
2003 Nov 21
3
what does this mean in R-1.8.1 release notes?
what does this mean in R-1.8.1 release notes?
o median() no longer `works' for odd-length factor variables.
2009 Mar 28
1
stratified variables in a cox regression
>Hello,
I am hoping for assistance in regards to examining the contribution
of stratified variables in a cox regression. A previous post by Terry
Therneau noted that "That is the point of a strata; you are declaring
a variable to NOT be proportional hazards, and thus there is no
single "hazard ratio" that describes it". Given this purpose of
stratification, in the
2017 Oct 22
2
Syntax for fit.contrast
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 but I can't get the syntax of the coefficients to use in fit.contrast correct. I hope someone can show me how to use fit.contrast, or some
2003 Oct 08
1
Contrast specified with C() - R vs S-Plus problem
Hi,
For a n-level factor, I'd like to specify the first contrast and have
the remaining n-2 constructed automatically so that the set is
orthogonal. I then test the contrasts with summary.lm(anova-object).
In S-Plus, the following works:
>y.anova <- aov( y ~ C(CO2,c(1,0,-1)) )
>summary.lm(y.anova)
In R, it fails with the following error:
>levels(CO2)
[1]