Displaying 20 results from an estimated 1000 matches similar to: "Problem using stepAIC/addterm (MASS package)"
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
2002 Apr 01
0
something confusing about stepAIC
Folks, I'm using stepAIC(MASS) to do some automated, exploratory, model
selection for binomial and Poisson glm models in R 1.3. Because I wanted to
experiment with the small-sample correction AICc, I dug around in the code
for the functions
glm.fit
stepAIC
dropterm.glm
addterm.glm
extractAIC.glm
and came across something I just don't understand.
stepAIC() passes dropterm.glm() a
2005 Aug 15
2
stepAIC invalid scope argument
I am trying to replicate the first example from stepAIC from the MASS
package with my own dataset but am running into error. If someone can
point where I have gone wrong, I would appreciate it very much.
Here is an example :
set.seed(1)
df <- data.frame( x1=rnorm(1000), x2=rnorm(1000), x3=rnorm(1000) )
df$y <- 0.5*df$x1 + rnorm(1000, mean=8, sd=0.5)
# pairs(df); head(df)
lo <-
2006 May 08
1
Panel Data Estimators (within, between, Random Effects estimator)
Dear R Users,
Here is another probelm/question.
I would like to run some panel regressions with R. Therefore I have
combined several time periods of data for different individuals in my
database.
I have already run pooled OLS but I would need to calculate a Fixed
Effects Estimator (within estimator). Unfortunately I couldn't find
anything like that in the RSearch and I suppose that lme
2005 Dec 18
3
GLM Logit and coefficient testing (linear combination)
Hi,
I am running glm logit regressions with R and I would like to test a
linear combination of coefficients (H0: beta1=beta2 against H1:
beta1<>beta2). Is there a package for such a test or how can I perform
it otherwise (perhaps with logLik() ???)?
Additionally I was wondering if there was no routine to calculate pseudo
R2s for logit regressions. Currently I am calculating the pseudo R2
2011 Nov 07
2
help with programming
>
>
Dear moderators,
Please help me encode the program instructed by follows.
Thank u!
Apply the methods introduced in Sections 4.2.1 and 4.2.2, say the
> rank-based variable selection and BIC criterions, to the Boston housing
> data.
>
The Boston housing data contains 506 observations, and is publicly
available in the R package mlbench (dataset “BostonHousing”).
The
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 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
2004 Feb 01
2
3 little questions
> From: Siegfried.Macho
>
> Dear R-helpers,
>
> 3 questions:
> 1. Is there a package that contains a routine for computing
> Kendall's W
> (coefficient of concordance), with and without ties ?
Is that the same as Kendall's tau, as in cor(..., method="kendall")?
> 2. Is there a package that contains a routine for computing
> Goodman' s
2010 Aug 05
0
multiple comparisons after glm
Dear list members,
I have a question concerning multiple comparisons after using glm.
My response variable is days until emergence of an insect species. The explanatory variables are sex (two levels), parasitoids added (two levels) and populations (34 levels). I would like to know now which populations are different in days until insect emergence.
For this I used multiple comparisons as
2011 Apr 27
0
Rule-based regression models: Cubist
Cubist is a rule-based machine learning model for regression. Parts of the
Cubist model are described in:
Quinlan. Learning with continuous classes. Proceedings
of the 5th Australian Joint Conference On Artificial
Intelligence (1992) pp. 343-348
Quinlan. Combining instance-based and model-based
learning. Proceedings of the Tenth International Conference
on Machine Learning
2011 Apr 27
0
Rule-based regression models: Cubist
Cubist is a rule-based machine learning model for regression. Parts of the
Cubist model are described in:
Quinlan. Learning with continuous classes. Proceedings
of the 5th Australian Joint Conference On Artificial
Intelligence (1992) pp. 343-348
Quinlan. Combining instance-based and model-based
learning. Proceedings of the Tenth International Conference
on Machine Learning
2004 Jan 23
1
Problem with hasArg() using R-files
Please do give reproducible example. The code you gave, which you claimed
`works correctly' doesn't:
> SDT.Optim <- function(crit = NULL, Hess = F)
+ {
+ q <- length(par); x <- data
+ if(hasArg(crit))
+ cat("\n Crit present\n")
+ else
+
2003 Apr 28
2
stepAIC/lme problem (1.7.0 only)
I can use stepAIC on an lme object in 1.6.2, but
I get the following error if I try to do the same
in 1.7.0:
Error in lme(fixed = resp ~ cov1 + cov2, data = a, random = structure(list( :
unused argument(s) (formula ...)
Does anybody know why?
Here's an example:
library(nlme)
library(MASS)
a <- data.frame( resp=rnorm(250), cov1=rnorm(250),
cov2=rnorm(250),
2003 Nov 28
1
problem with nls()
I wanted to use the nls() module to solve a Problem from Sen & Srivastava
(1990, p.209). Here is the (basic) code used to perform the estimation:
library(SenSrivastava)
library(nls)
data(E9.8)
# Use Linear Least Square for estimating start values
lm.obj <- lm(R.1 ~ I.1 + S.1, data = E9.8)
nls1.obj <- nls(R.1 ~ b.0 + b.1*(I.1^a.1-1)/a.1 + b.2*(S.1^a.2-1)/a.2,
2003 Jun 25
2
probelem of function inside function
Hi,
I encountered a problem when I am trying to write my
own function which contains another function. To
simplify a problem, I tried the following simplified
function, hope someone can idenfity the problem for
me.
I have a simple data frame called "testdata" as
following:
>
2012 Oct 30
2
error in lm
Hi everybody
I am trying to run the next code but I have the next problem
Y1<-cbind(score.sol, score.com.ext, score.pur)
> vol.lm<-lm(Y1~1, data=vol14.df)
> library(MASS)
> stepAIC(vol.lm,~fsex+fjob+fage+fstudies,data=vol14.df)
Start: AIC=504.83
Y1 ~ 1
Error in addterm.mlm(fit, scope$add, scale = scale, trace = max(0, trace -
:
no addterm method implemented for
2008 Oct 11
1
step() and stepAIC()
The birth weight example from ?stepAIC in package MASS runs well as
indeed it should.
However when I change stepAIC() calls to step() calls I get warning
messages that I don't understand, although the output is similar.
Warning messages:
1: In model.response(m, "numeric") :
using type="numeric" with a factor response will be ignored
(and three more the same.)
Checked
2003 Jul 30
0
stepAIC()
Hi,
I am experiencing a baffling behaviour of stepAIC(),
and I hope to get any advice/help on this. Greatly
appreciate any kind advice given.
I am using stepAIC() to, say, select a model via
stepwise selection method.
R Version : 1.7.1
Windows ME
Many thanks!
***Issue :
When stepAIC() is placed within a function, it seems
that stepAIC() cannot detect the data matrix, and the
program is
2012 Nov 02
0
stepAIC and AIC question
I have a question about stepAIC and extractAIC and why they can
produce different answers.
Here's a stepAIC result (slightly edited - I removed the warning
about noninteger #successes):
stepAIC(glm(formula = (Morbid_70_79/Present_70_79) ~ 1 + Cohort +
Cohort2, family = binomial, data = ghs_70_79, subset =
ghs_70_full),direction = c("backward"))
Start: AIC=3151.41