Displaying 20 results from an estimated 80 matches similar to: "Drop1 and weights"
2005 Mar 03
0
Baffled by drop1
I've been experimenting with drop1 for my biostatistics class, to obtain the
so-called Type III sums of squares. I am fully aware of the deficiencies of
this method, however I feel that the students should be familiar with it.
What I find baffling is that when applied to a fully balanced design, you
obtain different sums of squares. I've used this for several years in Splus
and R and never
2011 Mar 14
1
coxph and drop1
A recent question in r-help made me realize that I should add a drop1 method
for coxph and survreg. The default does not handle strata() or cluster()
properly.
However, for coxph the right options for the "test" argument would be
likelihood-ratio, score, and Wald; not chisq and F. All of them reference
a chi-square distribution. My thought is use these arguments, and add an
2005 Mar 03
0
Baffled by drop1: Please ignore previous request!
My apologies to the list for sending this without adequate research. I have
found my answer; please ignore! Thanks.
I've been experimenting with drop1 for my biostatistics class, to obtain the
so-called Type III sums of squares. I am fully aware of the deficiencies of
this method, however I feel that the students should be familiar with it.
What I find baffling is that when applied to a fully
2010 Mar 01
0
MASS::loglm - exploring a collection of models with add1, drop1
I'd like to fit and explore a collection of hierarchical loglinear
models that might
range from the independence model,
~ 1 + 2 + 3 + 4
to the saturated model,
~ 1 * 2 * 3 * 4
I can use add1 starting with a baseline model or drop1 starting with the
saturated model,
but I can't see how to get the model formulas or terms in each model as
a *list* that I can work with
further.
Consider
2005 Apr 23
1
question about about the drop1
the data is :
>table.8.3<-data.frame(expand.grid( marijuana=factor(c("Yes","No"),levels=c("No","Yes")), cigarette=factor(c("Yes","No"),levels=c("No","Yes")), alcohol=factor(c("Yes","No"),levels=c("No","Yes"))), count=c(911,538,44,456,3,43,2,279))
2008 Aug 10
1
(Un-)intentional change in drop1() "Chisq" behaviour?
Dear List,
recently tried to reproduce the results of some custom model selection
function after updating R, which unfortunately failed. However, I
ultimately found the issue to be that testing with pchisq() in drop1()
seems to have changed. In the below example, earlier versions (e.g. R
2.4.1) produce a missing P-value for the variable x, while newer
versions (e.g. R 2.7.1) produce 0 (2.2e-16).
2009 Apr 02
1
calculating drop1 R^2s
This is probably simple, but I just can't see it...
I want to calculate the R^2s for a series of linear models where each
term is dropped in turn. I can get the
RSS from drop1(), and the r.squared from summary() for a given model,
but don't know how to use the
result of drop1() to get the r.squared for each model with one term dropped.
Working example:
library(vcd) # for
2010 Oct 22
1
trouble with \textless in Hmisc latex() on a drop1 object
Yes, it's homework . . . delete now if desired . . . but I think it is an
interesting problem.
Running R 2.11.1, LaTeX on WinXP, via Sweave.
A drop1() object from a glm() produces, as part of its output, a string that
looks like this:
<none>
The trouble I run into is that running latex() on a drop1() object from
glm() produces a string that looks like this in the generated .tex
2011 Feb 23
1
request for patch in "drop1" (add.R)
By changing three lines in drop1 from access based on $ to access
based on standard accessor methods (terms() and residuals()), it becomes
*much* easier to extend drop1 to work with other model types.
The use of $ rather than accessors in this context seems to be an
oversight rather than a design decision, but maybe someone knows better ...
In particular, if one makes these changes (which I am
2004 Aug 20
1
drop1 with contr.treatment
Dear R Core Team
I've a proposal to improve drop1(). The function should change the
contrast from the default ("treatment") to "sum". If you fit a
model with an interaction (which ist not signifikant) and you
display the main effect with
drop1( , scope = .~., test = "F")
If you remove the interaction, then everything's okay. There is
no way to fit a
2013 Apr 24
1
Trouble Computing Type III SS in a Cox Regression using drop1 and Anova
Hello All,
Am having some trouble computing Type III SS in a Cox Regression using either drop1 or Anova from the car package. Am hoping that people will take a look to see if they can tell what's going on.
Here is my R code:
cox3grp <- subset(survData,
Treatment %in% c("DC", "DA", "DO"),
c("PTNO", "Treatment", "PFS_CENSORED",
2005 Oct 20
3
different F test in drop1 and anova
Hi,
I was wondering why anova() and drop1() give different tail
probabilities for F tests.
I guess overdispersion is calculated differently in the following
example, but why?
Thanks for any advice,
Tom
For example:
> x<-c(2,3,4,5,6)
> y<-c(0,1,0,0,1)
> b1<-glm(y~x,binomial)
> b2<-glm(y~1,binomial)
> drop1(b1,test="F")
Single term deletions
Model:
y ~
2008 Sep 30
2
weird behavior of drop1() for polr models (MASS)
I would like to do a SS type III analysis on a proportional odds logistic
regression model. I use drop1(), but dropterm() shows the same behaviour. It
works as expected for regular main effects models, however when the model
includes an interaction effect it seems to have problems with matching the
parameters to the predictor terms. An example:
library("MASS");
options(contrasts =
2012 Oct 07
1
Why do I get different results for type III anova using the drop1 or Anova command?
Dear experts,
I just noticed that I get different results conducting type III anova
using drop1 or the Anova command from the car package. I suppose I made
a mistake and hope you can offer me some help. I have no idea where I
got wrong and would be very grateful for explaination as R is new
terrain for me.
If I run the commands in line, they produce the same results. But if I
run them in
2007 Mar 13
3
inconsistent behaviour of add1 and drop1 with a weighted linear model
Dear R Help,
I have noticed some inconsistent behaviour of add1 and drop1 with a
weighted linear model, which affects the interpretation of the results.
I have these data to fit with a linear model, I want to weight them by
the relative size of the geographical areas they represent.
_________________________________________________________________________________________
> example
2008 Aug 01
5
drop1() seems to give unexpected results compare to anova()
Dear all,
I have been trying to investigate the behaviour of different weights in
weighted regression for a dataset with lots of missing data. As a start
I simulated some data using the following:
library(MASS)
N <- 200
sigma <- matrix(c(1, .5, .5, 1), nrow = 2)
sim.set <- as.data.frame(mvrnorm(N, c(0, 0), sigma))
colnames(sim.set) <- c('x1', 'x2') # x1 & x2 are
2012 Jul 23
2
drop1, 2-way Unbalanced ANOVA
Hi all,
I've spent quite a lot of time searching through the help lists and reading
about how best to run perform a 2-way ANOVA with unbalanced data. I realize
this has been covered a great deal so I was trying to avoid adding yet
another entry to the long list considering the use of different SS, etc.
Unfortunately, I have come to the point where I feel I have to wade in and
see if someone
2008 Mar 01
1
model R^2 and partial R^2 values
Dear R-list members,
I am doing a CART analysis in R using the rpart function in the rpart package:
Phrag.rpart=rpart(PhragDiff~., data = Phrag, method="anova", xval=10).
I used the xerror values in the CP table to prune the tree to 4 nsplits:
CP nsplit rel error xerror xstd
1 0.098172 0 1.00000 1.02867 0.12768
2 0.055991 3 0.70548 1.00823 0.12911
3
2006 May 05
0
summarize: A log analysis script
Hi folks,
I wrote a quick script to extract performance one-liners from Rails logs.
(Didn''t want to futz with syslog for http://rails-analyzer.rubyforge.org/ .)
Reads output from :info or :debug log levels (the defaults).
Usage:
# summarize < development.log
# summarize < production.log
Output looks like:
(w/FULL_URL set false)
123.23.23.123 2006-05-05 10:59:42 | r
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 *