Displaying 20 results from an estimated 33 matches for "addterms".
Did you mean:
addterm
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
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:
>
2005 Feb 25
0
Problem using stepAIC/addterm (MASS package)
Hello,
I'm currently dealing with a rather strange problem when using the
function "stepAIC" ("MASS" package). The setting is the following: From
model learning data sets ("learndata"), I want to be able to build
prediction functions (in order to save them in a file for further use).
This is done by the function "pred.function" (see below). Therein,
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 <-
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
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
2007 Mar 13
3
inconsistent behaviour of add1 and drop1 with a weighted linear model
Dear R Help,
I have noticed some inconsistent behaviour of add1 and drop1 with a
weighted linear model, which affects the interpretation of the results.
I have these data to fit with a linear model, I want to weight them by
the relative size of the geographical areas they represent.
_________________________________________________________________________________________
> example
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
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),
2012 Jan 22
1
How to construct a formula
Hi,
I need to construct a formula programaticly, and pass it to a function
such as the linear mixed model lme. The help says it requires "a
two-sided linear formula object describing the fixed-effects part of the
model" but I do not know how to create this formula. I have tried
various things using formula(x, ...), as.formula(object, env =
parent.frame()) and as.Formula(x, ...)
2002 Nov 05
1
add1 in glm
I'm having a bit of difficulty using the stepwise model-building tools
in a glm context. Here, for example is one problem I have had using
add1, where the abbreviation "." does not work as I expected it to do. I
someone could point me towards some examples involving the interactive
building of glm models I would be grateful.
The data set that I am using is the
2013 Jun 25
1
F statistic in add1.lm vs add1.glm
Should the F statistic be the same when using add1() on models created by lm and glm(family=gaussian)?
They are in the single-degree-of-freedom case but not in the multiple-degree-of-freedom case.
MASS:addterm shows the same discrepancy. It looks like the deviance (==residual sum of squares) gets
divided by the number of degrees of freedom for the term twice in add1.glm. Using anova() on 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 =
2010 Mar 16
0
New package: ordinal
This is to announce the new R-package ?ordinal? that implements
cumulative link (mixed) models for ordinal (ordered categorical) data
(http://www.cran.r-project.org/package=ordinal/).
The main features are:
- scale (multiplicative) as well as location (additive) effects
- nominal effects for a subset of the predictors (denoted partial
proportional odds when the link is the logistic)
- structured
2003 Oct 23
0
anova model refinement/clustering question
Hi,
I am trying to refine models of a continuous response variable and a
number of categorical predictor variables. I know of some model
refinement tools available in R that help in the selection of model
terms like dropterm and addterm from MASS etc. However, I would also
like to try to refine the model by 'coalescing' some levels of some of
the predictor factors. Is there a standard
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
2010 Mar 16
0
New package: ordinal
This is to announce the new R-package ?ordinal? that implements
cumulative link (mixed) models for ordinal (ordered categorical) data
(http://www.cran.r-project.org/package=ordinal/).
The main features are:
- scale (multiplicative) as well as location (additive) effects
- nominal effects for a subset of the predictors (denoted partial
proportional odds when the link is the logistic)
- structured
2010 Oct 21
0
compile xapian-extras
...03/11/xappy-now-supports-image-similarity-searching/
)
I complie xapian-extras and xapian-extras-bindings with python.
import xapian
import xapian.imgseek
doc = xapian.Document()
imgsig = xapian.imgseek.ImgSig.register_Image(JPEG_PATH)
imgterms = xapian.imgseek.ImgTerms('A', 300)
imgterms.AddTerms(doc,imgsig)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: in method 'ImgTerms_AddTerms', argument 2 of type
'Xapian::Document &'
Please give some suggestion,Thanks!
2009 Jan 23
2
R stepping through multiplie interactions
I have a lm in R in the form
model <- lm( Z ~ A*B*C*D,data=mydata)
I want to run the model and include all interactions expect the 4 way
(A:B:C:D) is there an easy way of doing this? I then want to step down the
model eliminating the non-significant terms I understand step() does this
but how would I do it by hand?
--
View this message in context:
2008 Aug 01
5
drop1() seems to give unexpected results compare to anova()
Dear all,
I have been trying to investigate the behaviour of different weights in
weighted regression for a dataset with lots of missing data. As a start
I simulated some data using the following:
library(MASS)
N <- 200
sigma <- matrix(c(1, .5, .5, 1), nrow = 2)
sim.set <- as.data.frame(mvrnorm(N, c(0, 0), sigma))
colnames(sim.set) <- c('x1', 'x2') # x1 & x2 are