similar to: extractAIC

Displaying 20 results from an estimated 4000 matches similar to: "extractAIC"

2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
I would like test AICc as a criteria for model selection for a glm using stepAIC() from MASS package. Based on various information available in WEB, stepAIC() use extractAIC() to get the criteria used for model selection. I have created a new extractAIC() function (and extractAIC.glm() and extractAIC.lm() ones) that use a new parameter criteria that can be AIC, BIC or AICc. It works as
2017 Nov 24
0
extractAIC.coxph warning
Hi, It is not critical but in case of coxph.null model (~1) extractAIC function generates Warning message: In is.na(fit$coefficients) : is.na() applied to non-(list or vector) of type 'NULL' As I understand it happens because of absent coefficients attribute. Function stats:::extractAIC.coxph Line edf <- sum(!is.na(fit$coefficients)) I think extra null-checking
2011 May 10
0
Help documentation in extractAIC
Hello. The sentence in extractAIC's help <http://www.stat.psu.edu/~dhunter/R/html/stats/html/extractAIC.html> which discusses AIC's estimate of -2logL from RSS reads: "AIC only handles unknown scale and uses the formula n log (RSS/n) - n + n log 2pi - sum(log w) where w are the weights. Further AIC counts the scale estimation as a parameter in the edf and extractAIC does
2017 Aug 23
0
MASS:::dropterm.glm() and MASS:::addterm.glm() should use ... for extractAIC()
Hi, I have sent this message to this list the July, 7th. It was about a problem in MASS package. Until now there is no change in the devel version. As the problem occurs in a package and not in the R-core, I don't know if the message should have been sent here. Anyway, I have added a copy to Pr Ripley. I hope it could have been fixed. Sincerely Marc Le 09/07/2017 ? 16:05, Marc Girondot via
2006 Aug 06
1
extractAIC using surf.ls
Although the 'spatial' documentation doesn't mention that extractAIC works, it does seem to give an output. I may have misunderstood, but shouldn't the following give at least the same d.f.? > library(spatial) > data(topo, package="MASS") > extractAIC(surf.ls(2, topo)) [1] 46.0000 437.5059 > extractAIC(lm(z ~ x+I(x^2)+y+I(y^2)+x:y, topo)) [1]
2009 Jan 07
0
Frailty by strata interactions in coxph (or coxme)?
Hello, I was hoping that someone could answer a few questions for me (the background is given below): 1) Can the coxph accept an interaction between a covariate and a frailty term 2) If so, is it possible to a) test the model in which the covariate and the frailty appear as main terms using the penalized likelihood (for gaussian/t frailties) b)augment model 1) by stratifying on the variable that
2005 Jan 26
2
Source code for "extractAIC"?
Dear R users: I am looking for the source code for the R function extractAIC. Type the function name doesn't help: > extractAIC function (fit, scale, k = 2, ...) UseMethod("extractAIC") <environment: namespace:stats> And when I search it in the R source code, the best I can find is in (R source root)/library/stats/R/add.R: extractAIC <- function(fit, scale, k = 2,
2009 Sep 22
0
AIC vs. extractAIC
Dear list, I am confused about two functions in R: AIC(fm) and extractAIC(fm). What is the difference between two and when do I have to use one over the other? I have found the similar question previously and still not clear for me to understand. I also looked at '?AIC' and '?extractAIC' in R, which is also unclear. I pasted faked data set, fitting summary, and AICs. Thank
2007 Apr 08
0
Simulation of the Frailty of the Cox PH model
Dear R-list users, I am trying to do simulation of survival data to enable it to run under frailty option. Below is the function a that I am using. My questions are: 1. How do I modify it to get bigger (hopefully significant) value of Variance of random effect? 2. What changes do I have to make in the function to run it under correlated frailty model? (may be in kinship package) 3. Is there
2007 Dec 07
1
AIC v. extractAIC
Hello, I am using a simple linear model and I would like to get an AIC value. I came across both AIC() and extractAIC() and I am not sure which is best to use. I assumed that I should use AIC for a glm and extractAIC() for lm, but if I run my model in glm the AIC value is the same if I use AIC() on an lm object. What might be going on? Did I interpret these functions incorrectly? Thanks,
2005 Sep 07
1
Survival analysis with COXPH
Dear all, I would have some questions on the coxph function for survival analysis, which I use with frailty terms. My model is: mdcox<-coxph(Surv(time,censor)~ gender + age + frailty(area, dist='gauss'), data) I have a very large proportion of censored observations. - If I understand correctly, the function mdcox$frail will return the random effect estimated for each group on the
2002 Oct 08
2
Frailty and coxph
Does someone know the rules by which 'coxph' returns 'frail', the predicted frailty terms? In my test function: ----------------------------------------------- fr <- function(){ #testing(frailty terms in 'survival' require(survival) dat <- data.frame(exit = 1:6, event = rep(1, 6), x = rep(c(0, 1), 3),
2004 May 24
1
bug in extractAIC.survreg (PR#6910)
Full_Name: Dave Ramsey Version: 1.8.0 OS: win2000 Submission from: (NULL) (202.27.240.6) there is a bug in extractAIC.survreg in library MASS. A survreg model object has no component called "residuals". Hence n <- length(fit$residuals) returns 0 resulting in errors workaround: replace n <- length(fit$residuals) with n <- length(residuals(fit)) ### sorry: error
2012 Feb 10
0
coxme with frailty
A couple of clarifications for you. 1. I write mixed effects Cox models as exp(X beta + Z b), beta = fixed effects coefficients and b = random effects coefficients. I'm using notation that is common in linear mixed effects models (on purpose). About 2/3 of the papers use exp(X beta)* c, i.e., pull the random effects out of the exponent. Does it make a difference? Not much: b will be
2005 May 31
1
Shared Frailty in survival package (left truncation, time-dep. covariates)
Dear list, I want o fit a shared gamma frailty model with the frailty specification in the survival package. I have partly left-truncated data and time-dependent covariates. Is it possible to combine these two things in the frailty function. Or are the results wrong if I use data in the start-stop-formulation which account for delayed entry? Is the frailty distribution updated in the
2004 Nov 17
1
frailty and time-dependent covariate
Hello, I'm trying to estimate a cox model with a frailty variable and time-dependent covariate (below there is the statement I use and the error message). It's seems to be impossible, because every time I add the time-dependent covariate the model doesn't converge. Instead, if I estimate the same model without the time-dependent covariate it's converge. I'd like knowing if
2003 May 07
0
frailty models in survreg() -- survival package (PR#2933)
I am confused on how the log-likelihood is calculated in a parametric survival problem with frailty. I see a contradiction in the frailty() help file vs. the source code of frailty.gamma(), frailty.gaussian() and frailty.t(). The function frailty.gaussian() appears to calculate the penalty as the negative log-density of independent Gaussian variables, as one would expect: >
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
On Tue, 6 May 2003, Jerome Asselin wrote: > > I am confused on how the log-likelihood is calculated in a parametric > survival problem with frailty. I see a contradiction in the frailty() help > file vs. the source code of frailty.gamma(), frailty.gaussian() and > frailty.t(). > > The function frailty.gaussian() appears to calculate the penalty as the > negative
2004 Nov 08
1
coxph models with frailty
Dear R users: I'm generating the following survival data: set.seed(123) n=200 #sample size x=rbinom(n,size=1,prob=.5) #binomial treatment v=rgamma(n,shape=1,scale=1) #gamma frailty w=rweibull(n,shape=1,scale=1) #Weibull deviates b=-log(2) #treatment's slope t=exp( -x*b -log(v) + log(w) ) #failure times c=rep(1,n) #uncensored indicator id=seq(1:n) #individual frailty indicator
2011 Apr 05
0
frailty
Hi R-users I spend a lot of time searching on the web but I didn?t found a clear answer. I have some doubts with 'frailty' function of 'survival' package. The following model with the function R ?coxph? was fitted: modx <- coxph(Surv(to_stroke, stroke) ~ age + sbp + dbp + sex + frailty(center,distribution = "gamma", method='aic'), data=datax) Then I get