Displaying 20 results from an estimated 1000 matches similar to: "Help documentation in 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
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,
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 May 05
0
stepAICc function (based on MASS:::stepAIC.default)
Dear all,
I have tried to modify the code of MASS:::stepAIC.default(), dropterm() and addterm() to use AICc instead of AIC for model selection.
The code is appended below. Somehow the calculations are still not correct and I would be grateful if anyone could have a look at what might be wrong
with this code...
Here is a working example:
##
require(nlme)
model1=lme(distance ~ age + Sex, data =
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
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 Aug 04
0
extractAIC
Use extractAIC in frailty cox model (estimated with coxph function, gaussian
random effect) i obtaided
> extractAIC(fit.cox.f)
[1] 11.84563 8649.11736
but I don't know why I can't use the classic formulation of the AIC where
the degree of freedom are the number of the parameter (in my case 3).
--
View this message in context:
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 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,
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
2009 May 13
2
Optimization algorithm to be applied to S4 classes - specifically sparse matrices
Hello.
I am trying to optimize a set of parameters using /optim/ in which the
actual function to be minimized contains matrix multiplication and is of
the form:
SUM ((A%*%X - B)^2)
where A is a matrix and X and B are vectors, with X as parameter vector.
This has worked well so far. Recently, I was given a data set A of size
360440 x 1173, which could not be handled as a normal matrix. I
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 *
2015 Mar 11
1
Notes on building a gcc toolchain for Rtools (but not multilib)
On Wed, Mar 11, 2015 at 1:23 PM, Hsiu-Khuern Tang <tangoh at gmail.com> wrote:
> On Tue, Mar 10, 2015 at 10:47 PM, Avraham Adler <avraham.adler at gmail.com> wrote:
>> On Wed, Mar 11, 2015 at 1:40 AM, Hsiu-Khuern Tang <tangoh at gmail.com> wrote:
>>> On Tue, Mar 10, 2015 at 8:54 PM, Avraham Adler <avraham.adler at gmail.com> wrote:
>>>>
2015 Mar 11
0
Notes on building a gcc toolchain for Rtools (but not multilib)
On Tue, Mar 10, 2015 at 10:47 PM, Avraham Adler <avraham.adler at gmail.com> wrote:
> On Wed, Mar 11, 2015 at 1:40 AM, Hsiu-Khuern Tang <tangoh at gmail.com> wrote:
>> On Tue, Mar 10, 2015 at 8:54 PM, Avraham Adler <avraham.adler at gmail.com> wrote:
>>>
>>> I successfully rebuilt R-devel_2015-03-09 with the most recent version
>>> of Rtools
2017 Feb 01
0
Unexpected EOF in R-patched_2017-01-30
>>>>> Avraham Adler <avraham.adler at gmail.com>
>>>>> on Tue, 31 Jan 2017 16:07:20 -0500 writes:
> On Tue, Jan 31, 2017 at 3:30 PM, peter dalgaard <pdalgd at gmail.com> wrote:
>>
>>> On 31 Jan 2017, at 18:56 , Avraham Adler <avraham.adler at gmail.com> wrote:
>>>
>>> Hello.
2009 Jun 17
3
Matrix inversion-different answers from LAPACK and LINPACK
Hello.
I am trying to invert a matrix, and I am finding that I can get different
answers depending on whether I set LAPACK true or false using "qr". I had
understood that LAPACK is, in general more robust and faster than LINPACK,
so I am confused as to why I am getting what seems to be invalid answers.
The matrix is ostensibly the Hessian for a function I am optimizing. I want
to get
2017 Apr 04
0
Some "lm" methods give wrong results when applied to "mlm" objects
I had a look at some influence measures, and it seems to me that currently several methods handle multiple lm (mlm) objects wrongly in R. In some cases there are separate "mlm" methods, but usually "mlm" objects are handled by the same methods as univariate "lm" methods, and in some cases this fails.
There are two general patterns of problems in influence measures:
2018 Feb 09
0
R Compilation gets stuck on Windows 64
You can see how the appveyor build works here:
https://github.com/rwinlib/base
I suggest that you work off the build process in the rwinlib repository so
you are starting from something that you know works and already
incorporates the set of dependencies you need.
On Fri, Feb 9, 2018, 5:33 AM Avraham Adler <avraham.adler at gmail.com> wrote:
> On Fri, Feb 9, 2018 at 2:16 AM, Indrajit
2020 Jan 20
0
[External] Re: rpois(9, 1e10)
R uses the C 'int' type for its integer data and that is pretty much
universally 32 bit these days. In fact R wont' compile if it is not.
That means the range for integer data is the integers in [-2^31,
+2^31).
It would be good to allow for a larger integer range for R integer
objects, and several of us are thinking about how me might get there.
But it isn't easy to get right, so