dear R users,
I have fit the lm() on a mtrix of responses.
i.e M1 = lm(cbind(R1,R2)~ X+Y+0). When i use
summary(M1), it shows details for R1 and R2
separately. Now i want to use stepAIC on these models.
But when i use stepAIC(M1) an error message comes
saying that dropterm.mlm is not
I see several options for you:
1. Write a function 'dropterm.mlm', copying 'dropterm.lm' and
modifying it as you think appropriate. The function 'dropterm.lm' is
hidden in a namespace, which you can see from 'methods(dropterm)'. To
get it, either use getAnywhere(dropterm.lm) or
On Wed, 27 Jun 2007, Spencer Graves wrote:
I see several options for you:
1. Write a function 'dropterm.mlm', copying 'dropterm.lm' and
modifying it as you think appropriate. The function 'dropterm.lm' is
hidden in a namespace, which you can see from 'methods(dropterm)'. To
get
Dear All,
I am trying to use stepAIC for an lmer object but it doesn't work. Here is an
example:
x1 - gl(4,100)
x2 - gl(2,200)
time - rep(1:4,100)
ID - rep(1:100, each=4)
Y - runif(400) =.5
levels(Y) - c(1,0)
dfr - as.data.frame(cbind(ID,Y,time,x1,x2))
fm0.lmer -
Sorry I made a mistake for the variables in the model:
fm0.lmer - lmer(Y ~ time+x1+x2 + (1|ID), data = dfr, family = binomial)
fm.lmer - stepAIC(fm0.lmer,scope = list(upper = ~ time*x1*x2, lower =
~1,trace = FALSE))
I obtain the following error:
Error in
On Mon, 4 Dec 2006, Marc Bernard wrote:
Dear All,
I am trying to use stepAIC for an lmer object but it doesn't work. Here is
an example:
No, and it is not documented to work with lmer objects. stepAIC is
support software for a book, and lmer is not discussed in that book (and
postdates
I am wondering if stepAIC in the MASS library may be used for model
selection in an overdispersed Poisson situation. What I thought of doing
was to get an estimate of the overdispersion parameter phi from fitting
a model with all or most of the available predictors (we have a large
number of
On Mon, 13 Nov 2006, Murray Jorgensen wrote:
I am wondering if stepAIC in the MASS library may be used for model
selection in an overdispersed Poisson situation. What I thought of doing
was to get an estimate of the overdispersion parameter phi from fitting
a model with all or most of the
Hi
I hope this isn't off topics, but I have always found when I stepAIC() some
glm I get an improvement in accuracy and kappa, but I have just done a case
where I got a marginal deterioration. Is this possible, or should I be
going through my figures carefully to see if I have messed up?
On Tue, 12 Sep 2006, stephenc wrote:
Hi
I hope this isn't off topics, but I have always found when I stepAIC() some
glm I get an improvement in accuracy and kappa, but I have just done a case
where I got a marginal deterioration. Is this possible, or should I be
going through my
Tate Avery wrote:
Hello,
I am attempting to refine an lm()-generated model using the stepAIC
function.
My model has approximately 20 inputs and I am trying to determine the best
upper limit scope for using those inputs.
My lower limit is y ~ 1 and my original upper limit was y ~ x1 +
Hello,
I am attempting to refine an lm()-generated model using the stepAIC
function.
My model has approximately 20 inputs and I am trying to determine the best
upper limit scope for using those inputs.
My lower limit is y ~ 1 and my original upper limit was y ~ x1 + x2 + ...
+ x20.
This is
Adai,
The following works.Perhaps you should define your 'upper' and 'lower'
in the list as aov's, as you have done with your lo,hi and mid.
John
stepAIC( mid, scope=list(upper = mid , lower = lo) )
Start: AIC= -594.66
y ~ x2 + x3
Df Sum of Sq RSS AIC
- x21 0.11
Thank you. Your suggestion is equivalent is the same as my second
stepAIC command that failed in R-2.1.1.
See Prof. Ripley's reply where he pointed out that this was due to using
the name 'df' which clashes with built-in function with the same name
from stats package.
Regards, Adai
On Tue,
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),
Try not to use the name of an R object ... the error is caused by using
'df' as the second argument to eval().
It works with DF in place of df.
I don;t understand your subject line: that is not the error message you
received.
On Mon, 15 Aug 2005, Adaikalavan Ramasamy wrote:
I am trying to
In case it is unclear why in this case there is a problem: you are running
a function (here model.frame) in the stats namespace and so it looks in
the stats namespace before the workspace when looking for 'df'.
On Mon, 15 Aug 2005, Prof Brian Ripley wrote:
Try not to use the name of an R
You are right, it works fine with a different name. Its a bad habit that
I need to shake off.
The error message said that the second argument was invalid. The second
argument in stepAIC and addterm is 'scope' and thus the title.
Thank you again.
Regards, Adai
On Mon, 2005-08-15 at 15:23
On Mon, 15 Aug 2005, Adaikalavan Ramasamy wrote:
You are right, it works fine with a different name. Its a bad habit that
I need to shake off.
The error message said that the second argument was invalid. The second
argument in stepAIC and addterm is 'scope' and thus the title.
OK, we'll
Hi,
I'm having a bit of trouble with using StepAIC with a coxph model.
Can anybody tell me if there is anything wrong with what I am doing
here (I've removed a few of the variables for the purpose of this
email, I had about 20 before):
start-
Dear list,
here is an example of stepAIC that I do not understand.
The data is n=42, Lage is the only factor and there are four other
variables treated as continuous.
First you see the stepAIC-forward solution (fs7). The strange thing here
is that apparently not all interactions are tried for
On 29 Mar 2004, at 19:07, Christian Hennig wrote:
Dear list,
First you see the stepAIC-forward solution (fs7). The strange thing here
is that apparently not all interactions are tried for inclusion, but
only
WQ:Lage. In particular, I think that WFL:Lage should be tried
in the last two steps,
At 09:46 05-10-2003, Hiroto Miyoshi wrote:
Dear R-users
I have a probelm running stepAIC in R1.7.1
(...)
--small example
library(MASS)
x1-runif(100)
x2-runif(100)
x3-runif(100)
x4-runif(100)
x5-runif(100)
y-x1+x2+x3+runif(100)
t-data.frame(y=y,x1=x1,x2=x2,x3=x3,x4=x4,x5=x5)
Dear R-users
I have a probelm running stepAIC in R1.7.1
I wrote a program which used stepAIC as a part of it,
and it worked fine while I was using the previous version of
R1.7.0. However, I found the program did not work any more.
Now, R produces a message which tells
"Error
Hiroto Miyoshi [EMAIL PROTECTED] writes:
Could anyone help me please?
--small example
library(MASS)
x1-runif(100)
x2-runif(100)
x3-runif(100)
x4-runif(100)
x5-runif(100)
y-x1+x2+x3+runif(100)
t-data.frame(y=y,x1=x1,x2=x2,x3=x3,x4=x4,x5=x5)
It is going to be very unhappy if it tries to
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
26 matches
Mail list logo