search for: drop1

Displaying 20 results from an estimated 167 matches for "drop1".

Did you mean: drop
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) > drop...
2005 Apr 23
1
question about about the drop1
...No","Yes")), alcohol=factor(c("Yes","No"),levels=c("No","Yes"))), count=c(911,538,44,456,3,43,2,279)) >fit3<-glm(count~.^3,poisson,table.8.3) >sumary(fit3) ... Residual deviance: -1.5543e-15 on 0 degrees of freedom AIC: 65.043 > drop1(fit3,.~.,test="Chisq") Single term deletions Model: count ~ (marijuana + cigarette + alcohol)^3 Df Deviance AIC LRT Pr(Chi) <none> -1.554e-15 65.04 marijuana 1 365.78 428....
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 = c("...
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 everyth...
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). I would assume that the former is more appropriate, so I was just curious if this is an intentional change. Kind reg...
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...
2006 Mar 01
1
Drop1 and weights
Hi, If I used drop1 in a weighted lm fit, it seems to ignore the weights in the AIC calculation of the dropped terms, see the example below. Can this be right? Yan -------------------- library(car) > unweighted.model <- lm(trSex ~ (river+length +depth)^2- length:depth, dno2) > Anova(unweighted.model...
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 t...
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 Baseball library(car) # for vif/recode data(Baseball) # sal87 appears as a fa...
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&quot...
2012 Jul 23
2
drop1, 2-way Unbalanced ANOVA
...jects had to be removed from the experiment. I realize that if I just use aov() to perform a two-way ANOVA the order in which the terms ("oxygen content" and "medium") are entered will give different results because of the sequential SS. What I have done in the past is utilize drop1() in conjunction with aov() drop1(aov(WaterContent~Oxygen*Medium, data), test="F") to see if the interaction term was significant (F, p-value) and if its inclusion improved model fit (AIC). If from this I determine that the interaction term can be removed and the model can be rerun with...
2002 Feb 08
2
bugs or imperfect implementation?
...hat I thought would work didn't work. 1. I noticed the utility data(***,package=***) recently and like it very much, but unless I type in the whole word "package" I'll get an error in 1.4.0. For example, data(cats,package=MASS) works fine but data(cats,pac=MASS) doesn't. 2. drop1 doesn't seem to be as smart as before. In the sequence below, drop1 didn't produce what I expected it to produce. data(HairEyeColor); lab<-dimnames(HairEyeColor) HairEye<-cbind(expand.grid(Hair=lab$Hair,Eye=lab$Eye, Sex=lab$Sex),Fr=as.vector(HairEyeColor)) HairEy...
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 file: \textlessnone\textgreater This gives an "unde...
2000 May 09
1
Type III Sums of Squares?
Hello, I'd like to propose an extension to the function summary.aov. In Splus (2000, I don't know about other versions), summary.aov allows a parameter ssType to be set to 1 or 3 (defaults to 1) to choose the type of Sums of Squares. I know I can get Type III SS in R with drop1(model), but including the functionality into summary.aov would, in my opinion, - yield a more usable table (for example, the residual Df are missing in the drop1 table) - put it into the obvious place to look for it - increase S-Plus compatibility (by a minor degree, I'll admit) - not break...
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. _______________________________________________________________________________________...
2000 Apr 19
1
scale factors/overdispersion in GLM: possible bug?
...mial (standard logit link) nested models with overdispersion. I have one possible bug to report (but I'm not confident enough to be *sure* it's a bug); one comment on the general inconsistency that seems to afflict the various functions for dealing with overdispersion in GLMs (anova.glm, drop1.glm, summary.glm); and one statistical query that maybe someone would answer if they're feeling generous. 1. possible bug: in drop1.glm() with scale != 0, R seems to divide by the dispersion parameter twice: first (if family != "gaussian") it sets loglik <- dev/dispersion...
2008 Aug 01
5
drop1() seems to give unexpected results compare to anova()
...507e-32 4.9000e-03 0.9443 Residuals 195 6.002e-28 3.078e-30 All was well so far, as x4 was identified as not significant and its coeff was almost 0 (because I made it so in the first place). Now I expected it to be dropped in stepwise: step(model, direction = 'both', test = 'F') drop1(model, test = 'F') dropterm(model, test = 'F') Df Sum of Sq RSS AIC F value Pr(F) <none> 6.002e-28 -13585.7 x1 1 2555.1 2555.1 517.5 8.3006e+32 < 2.2e-16 *** x2 1 3707.0 3707.0 591.9 1.2043e+33 < 2.2e-16 *** x3 1 7851.9 7851.9 742.0 2.5508e+33 < 2.2e-16 *** x4 1 2.1...
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....
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 balanced design, you obtain different sums of squares....