similar to: AIC extract and comparison

Displaying 20 results from an estimated 5000 matches similar to: "AIC extract and comparison"

2008 Apr 29
2
Help on extract paramters from fitted models
Hi, I have a question about how to extract paramters from a fitted model. I can extract coefficients and std, but from some other statistics, I dont know how to extract. Can anyone help? Here it is an example: > coxout<-coxph(Surv(t,t.censor)~x) > coxout Call: coxph(formula = Surv(t, t.censor) ~ x) coef exp(coef) se(coef) z p x 0.349 1.42 0.257 1.36 0.17 Likelihood
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,
2008 Nov 28
2
AIC function and Step function
I would like to figure out the equations for calculating "AIC" in both "step() function" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k *
2008 Apr 28
1
question on prediction in coxph
Hi, thank you all for those who helped me on prediction of newdata for linear model, it is my new question on the prediction of coxph for newdata, for example, i have the model: coxout<-coxph( Surv(time, status) ~ x predict(coxout) will give the fitted values I have tried predict(coxout, newdata), it still gave me the fitted values only. Can anyone hlep me on how to do prediction for
2007 Jun 01
1
AIC consistency with S-PLUS
Hello- I understand that log-likelihoods are bound to differ by constants, but if i estimate AIC for a set of simple nested linear models using the following 4 methods, shouldn't at least two of them produce the same ordering of models? in R: extractAIC AIC in S-PLUS: AIC n*log(deviance(mymodel)/n) + 2*p I find it troubling that these methods all give me different answers as to the best
2007 Aug 15
1
AIC and logLik for logistic regression in R and S-PLUS
Dear R users, I am using 'R' version 2.2.1 and 'S-PLUS' version 6.0; and I loaded the MASS library in 'S-PLUS'. I am running a logistic regression using glm: --------------------------------------------------------------------------- > mydata.glm<-glm(COMU~MeanPycUpT+MeanPycUpS, family=binomial, data=mydata)
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
2000 Oct 18
1
AIC in glm()
Hi all, I am trying to understand how is calculated the AIC returned by glm(). I have a model object m1 which fitting results are: > summary(m1) [...] (Dispersion parameter for gaussian family taken to be 3.735714) Null deviance: 1439.8 on 15 degrees of freedom Residual deviance: 52.3 on 14 degrees of freedom AIC: 70.357 Since there are 2 parameters, I would naively compute: AIC
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]
2012 Sep 29
1
Problems with stepAIC
Dear help community, I'm a R-beginner and use it for my master thesis. I've got a mixed model and want to analyse it with lme. There are a lot Cofactors that coult be relevant. To extract the important ones I want to do the stepAIC, but always get an error warning. Structure of my data: data.frame': 72 obs. of 54 variables: $ Block : Factor w/ 3 levels
2010 Dec 26
1
Calculation of BIC done by leaps-package
Hi Folks, I've got a question concerning the calculation of the Schwarz-Criterion (BIC) done by summary.regsubsets() of the leaps-package: Using regsubsets() to perform subset-selection I receive an regsubsets object that can be summarized by summary.regsubsets(). After this operation the resulting summary contains a vector of BIC-values representing models of size i=1,...,K. My problem
1998 Feb 03
2
glm(.) / summary.glm(.); [over]dispersion and returning AIC..
I have been implementing a proposal of Jim Lindsey for glm(.) to return AIC values, and print.glm(.) and print.summary.glm(.) printing them.... however: >>>>> "Jim" == Jim Lindsey <jlindsey@luc.ac.be> writes: Jim> The problem still remains of getting the correct AIC when the user Jim> wants the scale parameter to be fixed. (The calculation should
2003 May 08
1
All possible subset selection?
Hello, I am wondering if there is a function in R to do all possible subset selection, e.g. using AIC/BIC. It seems to me the function step can not do all possible selection. I am also want to know why the following functions give me different results. It seems I missed some points here. lm <- lm(y ~., data=somedata) AIC(lm) extractAIC(lm) Many thanks, Zheng Huang
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,
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
2011 Dec 20
2
Extract BIC for coxph
Dear all, is there a function similar to extractAIC based on which I can extract the BIC (Bayesian Information Criterion) of a coxph model? I found some functions that provide BIC in other packages, but none of them seems to work with coxph. Thanks, Michael [[alternative HTML version deleted]]
1998 Feb 04
0
[J.Lindsey: Re: glm(.) / summary.glm(.); [over]dispersion and returning AIC..]
--Multipart_Wed_Feb__4_12:25:40_1998-1 Content-Type: text/plain; charset=US-ASCII Jim, I am relating your message to R-devel. This should be discussed in a broader audience; I am not an expert on GLM's, I know you are and others on this group also... R-develers, please CC to Jim Lindsey (on this topic), since he hasn't been part of the R-devel list for a while.. BTW: I will be gone
2004 Mar 09
4
aic calculation
hello, could somebody refer me to the reason R uses -2*loglik + 2*(#param)+2 to calculate AIC? thank you -- Stoyan Iliev
2005 Aug 08
2
AIC model selection
Hello All; I need to run a multiple regression analysis and use Akaike's Information Criterion for model selection. I understand that this command will give the AIC value for specified models: AIC(object, ..., k = 2) with "..." meaning any other optional models for which I would like AIC values. But, how can I specify (in the place of "...") that I want R to
2010 Sep 22
2
speeding up regressions using ddply
Hi, I have a data set that I'd like to run logistic regressions on, using ddply to speed up the computation of many models with different combinations of variables. I would like to run regressions on every unique two-variable combination in a portion of my data set, but I can't quite figure out how to do using ddply. The data set looks like this, with "status" as