--Original Message-
From: R-help On Behalf Of Jeff Newmiller
Sent: Wednesday, April 19, 2023 10:41 AM
To: r-help@r-project.org; akshay kulkarni ; R help
Mailing list
Subject: Re: [R] AIc and BIC in caret...
[External Email]
This is a statistical question, not actually a question about R, and th
om: R-help On Behalf Of Jeff Newmiller
Sent: Wednesday, April 19, 2023 10:41 AM
To: r-help@r-project.org; akshay kulkarni ; R help
Mailing list
Subject: Re: [R] AIc and BIC in caret...
[External Email]
This is a statistical question, not actually a question about R, and thus not
on topic. Usin
Mailing list
Subject: Re: [R] AIc and BIC in caret...
This is a statistical question, not actually a question about R, and thus not
on topic. Using too many variables leads to models that tend to have large
errors on new data (not from your fitting sample). [1]
[1] https://en.m.wikipedia.org/wiki
This is a statistical question, not actually a question about R, and thus not
on topic. Using too many variables leads to models that tend to have large
errors on new data (not from your fitting sample). [1]
[1] https://en.m.wikipedia.org/wiki/Overfitting
On April 19, 2023 6:50:44 AM PDT, aksha
https://cran.r-project.org/web/packages/quantreg/quantreg.pdf
Seems to be by the guy who has been writing about A1c and quantile
regression since at least 1978. His work is cited in several papers on the
subject. I would copy-paste his name here, but this from an iPhone.
On Fri, Nov 25, 2022 at
Hi Bert,
Many thanks for your response.
Best,
Le mercredi 6 janvier 2021 à 21:47:14 UTC+1, Bert Gunter
a écrit :
Per the posting guide linked below:
"If the question relates to a contributed package , e.g., one downloaded from
CRAN, try contacting the package maintainer first. You can
Per the posting guide linked below:
"If the question relates to a *contributed package* , e.g., one downloaded
from CRAN, try contacting the package maintainer first. You can also use
find("functionname") and packageDescription("packagename") to find this
information. *Only* send such questions to
4th Question:
Why have you not posted this on the R-sig-mixed-models list, where it
clearly belongs, rather than here?
-- Bert
On Sat, Dec 29, 2012 at 12:47 PM, Diego Pujoni wrote:
> Dear colleagues,
>
> I have a data from a repeated measures design that I'm analysing through a
> mixed model. N
Thank you for the clarification, indeed the default Gaussian distribution
gives me identical results and AIC values for simple model comparison.
Best,
Rita
--
View this message in context:
http://r.789695.n4.nabble.com/AIC-for-GAM-models-tp4640972p4641101.html
Sent from the R help mailing lis
Hello,
For gam, try model1$aic. The returned value is an object of class "gam"
as described in ?gamObject.
For gamm, try model$gam$aic. The returned value is a list of two
objects, a "gam" and the return value of "lme" or "|gammPQL".
See ?gam and ?gamm, the Value section.
Hope this helps,
Rui
On 13/04/2012 07:32, Joon-Taek Yoo wrote:
Hello
I have a question on the seasonal decomposition based on Loess smoothing
(called "stl") for the R statistics package.
I am wondering how to calculate value of AIC (Akaike Information Criterion)
for the seasonal decomposition by stl in R.
AIC is
Le 21/03/2012 10:56, Patrick Giraudoux a écrit :
Hi,
Using lme from the package nlme 3.1-103, I meet a strange warning. I
am trying to compare to models with:
library(nlme)
lmez6=lme(lepus~vulpes,random=~1|troncon/an,data=ika_z6_test)
lmez60=lme(lepus~1,random=~1|troncon/an,data=ika_z6_test)
This isn't a question about R; more appropriate for stackexchange.
Here is one string that might interest you:
http://stats.stackexchange.com/questions/4997/can-aic-compare-across-different-types-of-model
Tania Sav wrote:
>
> Hello,
>
> I'm using AIC() to choose a better model. I have 3 o
The packages is wle.
I'll put together some code that shows the behavior I'm talking about,
and send it to the list.
Alexandra
On Thu, 2011-06-23 at 13:51 +0200, Rubén Roa wrote:
> I don't find the mle.aic function. Thus it does not ship with R and it's in
> some contributed package.
> What pa
Caribu gmail.com> writes:
>
> Hello,
>
> I'm using GLMM on the pscl package and i'm not getting the AIC on the
> summary.
>
[snip]
glmmPQL is in the MASS package, not the pscl package.
Because it uses a quasi-likelihood approach, it does not
provide an AIC value (which technically does n
AIC is only defined up to an additive constant (as is log-likelihood).
It should not surprise you that the values for AIC differ between packages.
The real question is whether the change in AIC when going form one model to
anoth is the same. If not, one is wrong (at least).
-Original Mess
Many thanks! Using a fresh session didn't work, but I upgraded to R.2.11.1
and it runs fine now.
bbolker wrote:
>
> eleadbeater sussex.ac.uk> writes:
>
>> Dear R-users,
>>
>> I'm trying to model some data using a tweedie GLM approach. My response
>> variable is the number of pupae that are t
eleadbeater sussex.ac.uk> writes:
> Dear R-users,
>
> I'm trying to model some data using a tweedie GLM approach. My response
> variable is the number of pupae that are the offspring of a subordinate wasp
> on a wasp's nest. However, they're not count data- for each nest, I only
> know the mean
Bert Gunter gene.com> writes:
>
> John:
>
> 1. As always, and as requested (see posting guide), a small
> reproducible example might help.
Bert is right that things aren't well defined. However, AIC
is still *widely* used for nonlinear models. For the sloppy
folks among us, here are some u
John:
1. As always, and as requested (see posting guide), a small
reproducible example might help.
2. What is CLi in your model?
3. In general, AIC may not be particularly meaningful as a measure of
fit quality penalized for model complexity in NON-linear models unless
the different models are
On Fri, 2010-08-20 at 06:31 +0800, elaine kuo wrote:
>
>
> Oh, actually, I suppose you could automate this, so it will
> return all
> models with single variable:
>
> dd <- dredge(lm1)
> parms <- !is.na(dd[, -c(1, (ncol(dd) - c(0:7
> >>
> > Please kindly advise if it is possible to show the singular model with
> > only one certain variable using the command subset. (or maybe others)
> > I tried the command "subset=X3" but it returned multiple models
> > including X3.
> >
> >
> > The above demand might look unnecessary when vi
On Thu, 2010-08-19 at 04:42 +0800, elaine kuo wrote:
> Yes, I tried the example in the ?dredge and agreed that something else
> caused the mistake.
>
>
> Aside from the cause which takes time to clarify (16 explanatory
> variables in the model),
> I would like to ask another question.
>
>
> Pl
Yes, I tried the example in the ?dredge and agreed that something else
caused the mistake.
Aside from the cause which takes time to clarify (16 explanatory variables
in the model),
I would like to ask another question.
Please kindly advise if it is possible to show the singular model with only
on
On Wed, 2010-08-18 at 21:11 +0800, elaine kuo wrote:
> A cause other than data based on standardized regression
> was identified.
> It is that the manual command added with target <- at the left hand
> side.
> C1 did not work but C2 did.
> C1 target<-dredge(mig.stds, subset = temp_max)
>
>
>
A cause other than data based on standardized regression was identified.
It is that the manual command added with target <- at the left hand side.
C1 did not work but C2 did.
C1 target<-dredge(mig.stds, subset = temp_max)
C2 dredge(mig.stds, subset = temp_max)
Elaine
On Wed, Aug 18, 2010
On Wed, 2010-08-18 at 17:37 +0800, elaine kuo wrote:
> => I posted it for help, after following the manual with the
> command dredge but receiving an error message two days ago.
>
> command target<-dredge(mig.stds, subset = temp_max)
>error in eval(expr, en
>
>
> >
> Please suggest how to define subset in my case
>
> How would I know? I still haven't seen your data. You seem to be
> mistaken on what is and is not included in your model and you fitted it.
> What hope do we have...? However, given the model 'mig.stds' from above
> in this email:
>
> > m
> Hmmm. Thinking some more, I might not have answered your (unstated)
> question. What do your mean by GLM?
>
> => I meant generalized linear model as well. Thanks for the references.
The first one was mentioned first in my life time after keeping asking
the same question.
> I mean the Genera
On Wed, 2010-08-18 at 08:51 +0100, Gavin Simpson wrote:
> On Wed, 2010-08-18 at 05:42 +0800, elaine kuo wrote:
> > Thank you.
> > Most of the answers solved the puzzles.
> > => Please explain why fitted lm is better for GLM.
>
> Seriously? A GLM specified as glm(, family = gaussian) is the l
On Wed, 2010-08-18 at 05:42 +0800, elaine kuo wrote:
> Thank you.
> Most of the answers solved the puzzles.
>
>
> Q2
>
>
> > I tried to display sub-model with only temp_ran using the
> code below but
> > failed.
> > Please kindly suggest the potential fa
Thank you.
Most of the answers solved the puzzles.
Q2
> > I tried to display sub-model with only temp_ran using the code below but
> > failed.
> > Please kindly suggest the potential failure cause.
> >
> > code
> >
> > library(MuMIn)
> > datam <-read.csv("c:/migration/Mig_ratio_20100817.csv",hea
On Tue, 2010-08-17 at 16:05 +0800, elaine kuo wrote:
> Hello,
Why did you decide to post the exact same message from two different
email addresses??
> I am using package MuMIn to calculate AIC for a full model with 10
> explanatory variables.
> Thanks in advance in sharing your experience.
>
> Q
That's really too big a question to do justice to in a mailing list
reply. If possible, consult a local expert.
To keep it very short, I would say:
(1) when you are interested in maximizing expected predictive accuracy
(rather than testing hypotheses);
(2) when the parameters in the mode
Thanks for Ben.
Model selection by AIC is feasible by the code below.
One more question, when is it appropriate to carry out model averaging and
parameter averaging?
code
library(MuMIn)
data(Cement)
lm1 <- lm(y ~ ., data = Cement)
dd <- dredge(lm1, beta = TRUE, eval = TRUE, rank =
elaine kuo gmail.com> writes:
[re: MuMIn package]
> However, the criteria in this package for model selection are AICc
> (second-order AIC) and QAIC (quasi-AIC).
> Please kindly share if it is possible to carry AIC rather than the metrics
> above using this package.
> Thank you.
I think you'r
This is tricky.
gamm4 is basing AIC on the (approximate) marginal likelihood with the smooth
terms treated as random effects and integrated out. The appropriate degrees
of freedom are then the number of smoothing parameters + the number of fixed
effects. This is completely conventional AIC.
ga
Hi Corrado,
Not being familiar with your research goals or data I can't make
recommendations, but I can suggest a couple of places to look for
information: Frank Harrell's Regression Modeling Strategies and his
Design library available on CRAN, and Hastie et al's The Elements of
Statistical Learn
Try,
> library("fGarch")
> fitmodel = garchFit(formula=~ar(1)+~garch(1,1), data=garat)
> fitmo...@fit$ics #is a vector with Information Criterion Statistics
> fitmo...@fit$ics[1] #is the AIC
Murilo Eiji Doi
Ben Bolker wrote:
>
> Vasileios Ismyrlis gmail.com> writes:
>
>>
>> library(
Try,
> library("fGarch")
> fitmodel = garchFit(formula=~ar(1)+~garch(1,1), data=garat)
> fitmo...@fit$ics #is a vector with Information Criterion Statistics
> fitmo...@fit$ics[1] #is the AIC
Ben Bolker wrote:
>
> Vasileios Ismyrlis gmail.com> writes:
>
>>
>> library("fGarch")
>> fit = garch
Thank you, Kingsford.
Then I am wondering if there are other ways to write R codes to calculate
the "weights" ? Thanks!
Dana
Kingsford Jones wrote:
>
> On Sun, Nov 30, 2008 at 5:05 PM, Dana77 <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for kind help from Steven and Christos last time. Now I
On Sun, Nov 30, 2008 at 5:05 PM, Dana77 <[EMAIL PROTECTED]> wrote:
>
> Thanks for kind help from Steven and Christos last time. Now I got new
> problem regarding the codes for calculating the "weights" (w) in "AIC ()
> function".
> The original code is as below:
> > getAnywhere("logLik.lm")
> fu
Thanks for kind help from Steven and Christos last time. Now I got new
problem regarding the codes for calculating the "weights" (w) in "AIC ()
function".
The original code is as below:
> getAnywhere("logLik.lm")
function (object, REML = FALSE, ...)
{
res <- object$residuals
p <- ob
Hi Dana,
Many thanks to Christos Hatzis who sent
me an offline response, pointing out the
new functions that make this much
easier than my last suggestions:
methods() and getAnywhere()
> methods("extractAIC")
[1] extractAIC.aov* extractAIC.coxph* extractAIC.glm* extractAIC.lm*
ext
Hi Dana,
Of course the only true way to know what the
AIC calculations are is to read the source
code. From within R, what with namespaces,
that is becoming increasingly difficult.
The AIC() function is not too hard to find
from R.
> AIC
function (object, ..., k = 2)
UseMethod("AIC")
So now
On Fri, Nov 7, 2008 at 11:03 AM, <[EMAIL PROTECTED]> wrote:
> Dear R Users,
> May be this message should be directy send to Douglas Bates ...
> I just want to know if I can use the AIC value given in the output of an lmer
> model to classify my logistic models.
> I heard that the AIC value given
Vasileios Ismyrlis gmail.com> writes:
>
> library("fGarch")
> fit = garchFit(formula=~ar(1)+~garch(1,1), data=garat)
>
> Now I want to count AIC for this model. How can I do it? I cannot do
> it with the AIC function of stats package, because R tells me:
> "Error in UseMethod("logLik") : no ap
Ben, I think the reference you're searching for is the one below
@ARTICLE{Lebreton1992,
author = {Lebreton, J.-D. and Burnham, K. P. and Clobert, J. and Anderson,
D. R.},
title = {Modeling survival and testing biological hypotheses using marked
animals: a unified approach with
Marc Schwartz comcast.net> writes:
>
> on 10/31/2008 01:07 PM Antonio.Gasparrini lshtm.ac.uk wrote:
> > I'm trying to extract the AIC statistic from a GLM model
> >with quasipoisson link.
> > The formula I'm referring to is
> >
> > AIC = -2(maximum loglik) + 2df * phi
> >
> > with phi t
on 10/31/2008 01:07 PM [EMAIL PROTECTED] wrote:
> Dear fellows,
>
> I'm trying to extract the AIC statistic from a GLM model with quasipoisson
> link.
> The formula I'm referring to is
>
> AIC = -2(maximum loglik) + 2df * phi
>
> with phi the overdispersion parameter, as reported in:
>
>
Choosing the model with minimum AIC is just one consideration that
might be used. If you look at books such as McQuarrie and Tsai
(1998), Regression and Time Series Model Selection, World Scientific,
you will find about 450 pages dealing mainly with the use of this and
similar criteria to select a
John,
Thank you for those references.
Cheers,
Michael
On Tue, Oct 14, 2008 at 8:27 AM, John C Frain <[EMAIL PROTECTED]> wrote:
> Choosing the model with minimum AIC is just one consideration that
> might be used. If you look at books such as McQuarrie and Tsai
> (1998), Regression and Time Seri
Michael Just gmail.com> writes:
> I ran AIC for some competing models I created. I get df and an AIC score
> from the AIC procedure. Can I use the models with the lowest AIC scores from
> this procedure to choose my 'best' models?
Depends. You told us nothing. Have you tried to search the list
Lisa wrote:
Hi, I need to fit models and use AIC method to campare the best fitted model
manually.
When i extract AIC by using extractAIC, it gave me the df and AIC values.
Now the problem is, how can I compare the AIC values from two models?
is there anyway to extract AIC with no df so that I
Patrick Giraudoux univ-fcomte.fr> writes:
>
> Dear listers,
>
> Here we have a strange result we can hardly cope with. We want to
> compare a null mixed model with a mixed model with one independent
> variable.
>
> > lmmedt1<-lme(mediane~1, random=~1|site, na.action=na.omit, data=bdd2)
> >
ian white a écrit :
Patrick,
The likelihoods of two models fitted using REML cannot be compared
unless the fixed effects are the same in the two models.
Many thanks for this reminder. Shame on me: it recalls me that this
subject may have been already largely discussed on this list. Now, I
Patrick,
The likelihoods of two models fitted using REML cannot be compared
unless the fixed effects are the same in the two models.
On Tue, 2008-02-26 at 14:38 +0100, Patrick Giraudoux wrote:
> Dear listers,
>
> Here we have a strange result we can hardly cope with. We want to
> compare a n
Chuanjun Zhang umkc.edu> writes:
>
> Dear R Users:
>
> I am trying to compare several structures of the within-patient covariance
> such as unstructured, Autoregressive, and spatial by using the MIXED effects
> model. Can AIC, BIC be negative ? If yes, then in what situations they may
> be nega
Ryan Briscoe Runquist wrote:
>
>
> 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 mod
Lynnette Dagenais wrote:
>
> Hi,
>
> I was wondering if someone could help me answer a question that is bound
> to come up in my Master's defense. I'm using AIC to select models and my
> question is how do I know that the models I developed a priori contain the
> 'best' models in the system.
On Sat, 24 Nov 2007, Lynnette Dagenais wrote:
> Hi,
>
> I was wondering if someone could help me answer a question that is bound
> to come up in my Master's defense.
Lynnette,
I expect you will get some opinions here, but you might get a better
answer from your committee.
Have you already ask
Digging into the R-code behind AIC for gaussian family models, I see:
AIC = nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt)) + 2 * p
dev = sum(wt * (y - mean(y))^2
For the unweighted case, this translates directly to -2LL with the
penalty number of parameters including both intercept and err
joe,
some procs in SAs calculates log likelihood differently than what it
is supposed to be. try using proc nlmixed and specifying the LL
explicitly.
in your case, I has stronger faith in R result instead of SAS result.
On 9/26/07, Joe Yarmus <[EMAIL PROTECTED]> wrote:
> In accordance with Venable
63 matches
Mail list logo