similar to: add1() and glm

Displaying 20 results from an estimated 1000 matches similar to: "add1() and glm"

2006 May 07
1
model selection, stepAIC(), and coxph() (fwd)
Hello, My question concerns model selection, stepAIC(), add1(), and coxph(). In Venables and Ripley (3rd Ed) pp389-390 there is an example of using stepAIC() for the automated selection of a coxph model for VA lung cancer data. A statistics question: Can partial likelihoods be interpreted in the same manner as likelihoods with respect to information based criterion and likelihood ratio tests?
2006 Apr 20
3
the difference between "x1" and x1
Hello, I am not sure what to write in the subject line, but I would like to take a character string that is a variable in a data frame and apply a function that takes a numeric argument to this character string. Here is a simplified example that would solve my problem. Imagine I have my data stored in a data frame. > x1 <- x2 <- x3 <- x4 <- x5 <- rnorm(20,0,1); > data <-
2006 Jun 28
0
Fwd: add1() and anova() with glm with dispersion
> Hello, > > I have a question about a discrepancy between the > reported F statistics using anova() and add1() from > adding an additional term to form nested models. > > I found and old posting related to anova() and > drop1() regarding a glm with a dispersion parameter. > > The posting is very old (May 2000, R 1.1.0). > The old posting is located here. >
2006 Apr 13
2
assignment to a symbol created by paste
Hello, I am creating a number of objects that I wish to have a common name with an index such as x1, x2, x3, ... I would like to do everyting in a loop to make the code compact and minimize the probability of an error by typo. A test problem may look like for (j in 1:10){ as.symbol(paste("x",j,sep="")) <- j; } which ideally would produce x1 = 1, ... x10 = 10. However,
2013 Jun 25
1
F statistic in add1.lm vs add1.glm
Should the F statistic be the same when using add1() on models created by lm and glm(family=gaussian)? They are in the single-degree-of-freedom case but not in the multiple-degree-of-freedom case. MASS:addterm shows the same discrepancy. It looks like the deviance (==residual sum of squares) gets divided by the number of degrees of freedom for the term twice in add1.glm. Using anova() on the
2012 Nov 02
1
add1() alternative
Hi, I'm trying to build a hierarchical logistic regression model with lme4 package, but I have a problem on selecting the variables to include in this model. In a simple logistic regression, using Forward selection, i use a likelihood ratio test to check which variables i should include in the model, using the function add1(). The problem is that this function doesn't work with the
2012 Jan 19
2
add1 GLM - Warning message, what does it mean?
Hi All, I am wondering if anyone can tell me what the warning message below the model means? J add1(DTA.glm,~ Aeventexhumed + Veg + Berm + HTL + Estuary + Rayos) Single term additions Model: cbind(MaxHatch, TotalEggs - MaxHatch) ~ Aeventexhumed + Veg + Berm + HTL Df Deviance AIC <none> 488.86 4232.9 Estuary 1 454.96 4201.0 Rayos 3 258.80 4008.9 Warning
2002 Nov 05
1
add1 in glm
I'm having a bit of difficulty using the stepwise model-building tools in a glm context. Here, for example is one problem I have had using add1, where the abbreviation "." does not work as I expected it to do. I someone could point me towards some examples involving the interactive building of glm models I would be grateful. The data set that I am using is the
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
2013 May 14
1
problem in add1's F statistic when data contains NAs?
Shouldn't the F statistic (and p value) for the x2 term in the following calls to anova() and add1() be the same? I think anova() gets it right and add1() does not. > d <- data.frame(y=1:10, x1=log(1:10), x2=replace(1/(1:10), 2:3, NA)) > anova(lm(y ~ x1 + x2, data=d)) Analysis of Variance Table Response: y Df Sum Sq Mean Sq F value Pr(>F) x1 1
2005 Aug 05
0
(PR#8049) add1.lm and add1.glm not handling weights and
David, Thanks. The reason add1.lm (and drop1.lm) do not support offsets is that lm did not when they were written, and the person who added offsets to lm did not change them. (I do wish they had not added an offset arg and just used the formula as in S's glm.) That is easy to add. For the other point, some care is needed if 'x' is supplied and the upper scope reduces the number
2005 Aug 04
0
add1.lm and add1.glm not handling weights and offsets properly (PR#8049)
I am using R 2.1.1 under Mac OS 10.3.9. Two related problems (see notes 1. and 2. below) are illustrated by results of the following: y <- rnorm(10) x <- z <- 1:10 is.na(x[9]) <- TRUE lm0 <- lm(y ~ 1) lm1 <- lm(y ~ 1, weights = rep(1, 10)) add1(lm0, scope = ~ x) ## works ok add1(lm1, scope = ~ x) ## error lm2 <- lm(y ~ 1, offset = 1:10) add1(lm0, scope = ~ z) ##
2007 May 21
2
Source code of add1
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070521/f7808713/attachment.pl
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
2013 Apr 23
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
Hi, I am investigating a performance degradation between llvm-3.1 and llvm-3.2 (Note: current top-of-tree shows a similar degradation) One issue I see is the following: - 'loop invariant code motion' seems to be depending on the result of the 'reassociate expression' pass: In the samples below I observer the following behavior: Both start with the same expression: %add = add
2013 Apr 23
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
As far as I can understand of the code, the Reassociate tries to achieve this result by its "ranking" mechanism. If it dose not, it is not hard to achieve this result, just restructure the expression in a way such that the earlier definition of the sub-expression is permute earlier in the resulting expr. e.g. outer-loop1 x= outer-loop2 y =
2012 Apr 05
4
Appropriate method for sharing data across functions
In trying to streamline various optimization functions, I would like to have a scratch pad of working data that is shared across a number of functions. These can be called from different levels within some wrapper functions for maximum likelihood and other such computations. I'm sure there are other applications that could benefit from this. Below are two approaches. One uses the <<-
2010 Jul 06
0
Add1 w/ coef estimates?
I was wondering if there is anyway to have Add1() display the coefficient estimates for each candidate predictor along with the F test. This is for lm() btw. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Add1-w-coef-estimates-tp2279662p2279662.html Sent from the R help mailing list archive at Nabble.com.
2013 Apr 25
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
It's an interesting problem. The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in PACT '08. Cooper gives a nice intro in one of his lectures: http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf I can't tell, quickly, what's going on in Reassociate; as usual, the documentation resolutely avoids giving any credit for the ideas. Why is that?
2013 Apr 25
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
On Apr 25, 2013, at 10:51 AM, Preston Briggs <preston.briggs at gmail.com> wrote: > It's an interesting problem. > The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in PACT '08. > Cooper gives a nice intro in one of his lectures: http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf > I can't tell, quickly, what's going on