Displaying 20 results from an estimated 10000 matches similar to: "question about trailing arguments in an S4 method"
2010 Aug 17
2
how to selection model by BIC
Hi All:
the package "MuMIn" can be used to select the model based on AIC or AICc.
The code is as follows:
data(Cement)
lm1 <- lm(y ~ ., data = Cement)
dd <- dredge(lm1,rank="AIC")
print(dd)
If I want to select the model by BIC, what code do I need to use? And when
to select the best model based on AIC, what the differences between the
function "dredge" in
2011 Jul 13
3
Sum weights of independent variables across models (AIC)
Hello,
I'd like to sum the weights of each independent variable across linear
models that have been evaluated using AIC.
For example:
> library(MuMIn)
> data(Cement)
> lm1 <- lm(y ~ ., data = Cement)
> dd <- dredge(lm1, beta = TRUE, eval = TRUE, rank = "AICc")
> get.models(dd, subset = delta <4)
There are 5 models with a Delta AIC Score of
2010 Aug 17
2
AIC in MuMIn
Hello,
I am using package MuMIn to calculate AIC for a full model with 10
explanatory variables.
Thanks in advance in sharing your experience.
Q1
In the AIC list of all models, each model is differentiated by model number.
Please kindly advise if it is possible to
find the corresponding explanatory variable(s) for the model number.
Q2 error message
I tried to display sub-model with only
2006 Apr 25
1
summary.lme: argument "adjustSigma"
Dear R-list
I have a question concerning the argument "adjustSigma" in the
function "lme" of the package "nlme".
The help page says:
"the residual standard error is multiplied by sqrt(nobs/(nobs -
npar)), converting it to a REML-like estimate."
Having a look into the code I found:
stdFixed <- sqrt(diag(as.matrix(object$varFix)))
if (object$method
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
2010 May 18
1
BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 18 May 2010 12:37:21 +0200 writes:
>>>>> "GaGr" == Gabor Grothendieck <ggrothendieck at gmail.com>
>>>>> on Mon, 17 May 2010 09:45:00 -0400 writes:
GaGr> BIC seems like something that would logically go into stats
2013 May 01
1
Trouble with methods() after loading gdata package.
Greetings to r-help land.
I've run into some program crashes and I've traced them back to methods()
behavior
after the package gdata is loaded. I provide now a minimal re-producible
example. This seems bugish to me. How about you?
dat <- data.frame(x = rnorm(100), y = rnorm(100))
lm1 <- lm(y ~ x, data = dat)
methods(class = "lm")
## OK so far
library(gdata)
2010 Aug 10
2
question about bayesian model selection for quantile regression
Hi All:
Recently I am researching my dissertation about the quantile model selection
by bayesian approach. I have the dependent variable(return) and 16
independent variables and I need to select the best variable for each
quantile of return. And the method I used is the bayesian approach, which is
based on calculating the posterior distibution of model identifier. In other
words, I need to obtain
2008 Aug 20
3
bug in lme4?
Dear all,
I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore:
library(lme4)
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
family = binomial, data
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all,
I had a look at the GLM code of R (1.4.1) and I believe that there are
problems with the function "glm.fit" that may bite in rare
circumstances. Note, I have no data set with which I ran into
trouble. This report is solely based on having a look at the code.
Below I append a listing of the glm.fit function as produced by my
system. I have added line numbers so that I
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.
2012 Sep 11
1
using alternative models in glmulti
All,
I am working on a multiple-regression meta-analysis and have too many
alternative models to fit by hand. I am using the "metafor" package in
R, which generates AIC scores among other metrics. I'm using a simple
formula to define these models. For example,
rma(Effect_size,variance, mods=~Myco_type + N.type +total,
method="ML")->mod where Effect_size is the
2008 Sep 24
2
Error message when calculating BIC
Hi All,
Could someone help me decode what this error means ?
> BIC(nb.80)
Error in log(attr(object, "nobs")) :
Non-numeric argument to mathematical function
>
BTW, nb.80 is a negative binomial glm model created using the MASS
library with the call at the bottom of the message
In the hopes of trying to figure this out I tried the following
workaround but it did not work
2013 Mar 18
1
try/tryCatch
Hi All,
I have tried every fix on my try or tryCatch that I have found on the
internet, but so far have not been able to get my R code to continue with
the "for loop" after the lmer model results in an error.
Here is two attemps of my code, the input is a 3D array file, but really
any function would do....
metatrialstry<-function(mydata){
a<-matrix(data=NA, nrow=dim(mydata)[3],
2009 Oct 25
1
Getting AIC from lrm in Design package
I am trying to obtain the AICc after performing logistic regression
using the Design package. For simplicity, I'll talk about the AIC. I
tried building a model with lrm, and then calculating the AIC as
follows:
likelihood.ratio <-
unname(lrm(succeeded~var1+var2,data=scenario,x=T,y=T)$stats["Model
L.R."]) #Model likelihood ratio???
model.params <- 2 #Num params in my model
AIC
2016 Apr 07
4
Contenido de un objeto/modelo ARIMA
Buenos días,
Os cuento:
Cargo la librería "Forecast" y ejecuto su función Arima(...) sobre una
serie temporal:
mimodelo <- Arima(miST$miserie, ...);
Ahora si ejecuto las siguientes sentencias, voy obteniendo los resultados
contenidos en "mimodelo", pero algunos de ellos no sé lo que son:
mimodelo[[1]] obtengo los coeficientes del modelo ARIMA
mimodelo[[2]] obtengo el
2009 Apr 29
2
AICc
I am fitting logistic regression models, by defining my own link
function, and would like to get AICc values. Using the glm command
gives a value for AIC, but I haven't been able to get R to convert
that to AICc. Is there a code that has already been written for
this? Right now I am just putting the AIC values into an excel
spreadsheet and calculating AICc, likelihood, and AIC
2005 Nov 17
3
loess: choose span to minimize AIC?
Is there an R implementation of a scheme for automatic smoothing
parameter selection with loess, e.g., by minimizing one of the AIC/GCV
statistics discussed by Hurvich, Simonoff & Tsai (1998)?
Below is a function that calculates the relevant values of AICC,
AICC1 and GCV--- I think, because I to guess from the names of the
components returned in a loess object.
I guess I could use
2006 Apr 21
1
AIC and numbers of parameters
Hi. I'm fairly new to R and have a quick question regarding AIC, logLik
and numbers of parameters. I see that there has been some correspondence
on this in the past but none of the threads seem to have been
satisfactorily resolved.
I have been trying to use R to obtain AIC for fitted models and then to
extrapolate to AICc.
For example, using simple x-y regression data, I fitted a
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers,
I have noticed that when I use lmer to analyse data, the summary function
gives different values for the AIC, BIC and log-likelihood compared with the
anova function.
Here is a sample program
#make some data
set.seed(1);
datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y'
))))
id=rep(1:120,2); datx=cbind(id,datx)
#give x1 a