similar to: AIC function and Step function

Displaying 20 results from an estimated 2000 matches similar to: "AIC function and Step function"

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
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
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 Jun 20
1
Stepwise model comparisons for mlogit
I am trying to perform a backwards stepwise variable selection with an mlogit model. The usual functions, step(), drop1(), and dropterm() do not work for mlogit models. Update() works but I am only able to use it manually, i.e. I have to type in each variable I wish to remove by hand on a separate line. My goal is to write some code that will systematically remove a certain set of variables
2009 Apr 30
1
stepAICc
Dear R users, Would it be difficult to change the code of stepAIC (from the MASS library) to use AICc instead of AIC? It would be great to know of someone has tried this already. Best wishes Christoph.
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]
2002 May 28
1
constrained regression
I want to do a linear regression where the coefficients obey two linear constraints, and also are all non-negative. What is the best way to do this? Computational speed is a consideration as I must do it many times. When this question was asked previously on the list, quadprog was suggested - is this the best solution? (I may have missed something obvious in the documentation, but I have
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
2006 Jul 19
1
[BioC] Errors using biocLite on Apple OS X
The warnings from make.packages.html() on the Apple Mac OS X platform can be dealt with as follows: ------------------------------------------------ (1) make.packages.html() uses the function tempdir() and attempts to create a temporary directory in the default location /tmp/ which fails due to the /tmp directory architecture on the Mac. I set up a .Renviron file in my user account
2018 Jun 26
3
list of methods
I recently got a request to add head() and tail() methods for Surv objects, which is quite reasonable, but not unlike other requests for logLik,? vcov, extractAIC, ...?? What they all have in common is that are methods added since creation of the survival package, and that I didn't know they existed. To try and get ahead of the curve, is there a way to list names of all of the default
2010 Jun 16
3
mgcv, testing gamm vs lme, which degrees of freedom?
Dear all, I am using the "mgcv" package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals. I would like to test this model vs a standard parametric mixed model, such as the ones which are possible to estimate with "lme". Since the smoothing splines can be written as random effects, is it correct to use an (approximate)
2010 Jan 15
2
processing all files with certain extension in a directory
Hi all, I'm trying to process all files with a certain extension "*.ext" in a directory like this: > R --slave --args /my/dir < dir_plot.r where I then I want to do something like: myarg <- commandArgs() inputdir <- myarg[length(myarg)] print(inputdir) "for file with extension "*.ext in inputdir" do data = process.data(file) outfile =
2006 Jun 05
2
Calculation of AIC BIC from mle
R 2.3.0, all packages up to date Linux, SuSE 10.0 Hi I want to calculate AIC or BIC from several results from mle calculation. I found the AIC function, but it does not seem to work with objects of class mle - If I execute the following: ml1 <- mle(...) AIC(ml1) I get the following error messale: Error in logLik(object) : no applicable method for "logLik" Therefore I am using the
2009 Feb 02
2
logLik for poisson models
Dear all, I have a very basic question: how does the logLik function work for poisson models? Example: I simulate 20 observations from a Poisson distribution with mean 800. y <- rpois(20,800) model <- glm(y ~ 1, family=poisson()) logLik(model) I would like to know what's the exact formula the function logLik uses. I looked at ?extractAIC but I cannot sort it out. Can you please
2008 Feb 19
4
How to join path with arguments
Hi, all How to format and join strings ? For example, like following short python examples. ********* name1 = 'sample-plot' filename = '%s.png' % name1 inputdir = '/path/to/dir' os.path.join(inputdir, filename) ********** Best, Hyunchul Kim [[alternative HTML version deleted]]
2004 Mar 05
1
Application of step to coxph using method="exact" (PR#6646)
Full_Name: John E. Kolassa Version: Version 1.8.1 OS: Solaris Submission from: (NULL) (128.6.76.36) Stepwise model selection for coxph appears to fail with method="exact". The code step(coxph(Surv(1:100,rep(1,100))~factor(rep(1:4,25)),method="exact")) produces the error message Start: AIC= 733.07 Surv(1:100, rep(1, 100)) ~ factor(rep(1:4, 25)) Error in
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)
2003 Jan 22
3
brian.casey@mscsoftware.com - Out of office
Is it possible to suspend this user from getting mail for a week otherwise we are going to get loads of "out of office" reports??????? Cheers -----Original Message----- From: brian.casey@mscsoftware.com [mailto:brian.casey@mscsoftware.com] Sent: 22 January 2003 13:34 To: samba@lists.samba.org Subject: [Samba] I am out of the office. I will be out of the office starting 01/21/2003
2004 Dec 03
2
[LLVMdev] [Fwd: Updated LLVM Visual Studio project files]
Could someone please apply this patch to the Win32 support so that Morten and Jeff can handle the recent changes? I can't do it because I"m on the road with only email access. Thanks, Reid. -----Forwarded Message----- > From: Morten Ofstad <morten at hue.no> > To: Reid Spencer <reid at x10sys.com> > Subject: Updated LLVM Visual Studio project files > Date: Thu,
2001 Mar 06
1
AIC bug?
Dear all, I am a little problem. In the help, AIC = - 2log L + k*edf. When the model is linear, the help said " -2log L is the deviance ". I have a model toto.lm with one output and three input where deviance(toto.lm) = 8.027 and edf =4. But AIC = -31.55. I don't understand why? Many thanks. Jean LEJEUNE Universit? de CAEN (France)