Displaying 20 results from an estimated 5000 matches similar to: "stepAIC and polynomial terms"
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
Greetings, everyone. I've been trying to analyze bird nest survival
data using generalized linear mixed models (because we documented
several consecutive nesting attempts by the same individuals; i.e.
repeated measures data) and have been unable to persuade the various
GLMM models to work with my user-defined link function. Actually,
glmmPQL seems to work, but as I want to evaluate a suite of
2006 Apr 16
3
second try; writing user-defined GLM link function
I apologize for my earlier posting that, unbeknownst to me before,
apparently was not in the correct format for this list. Hopefully this
attempt will go through, and no-one will hold the newbie mistake
against me.
I could really use some help in writing a new glm link function in
order to run an analysis of daily nest survival rates. I've struggled
with this for weeks now, and can at least
2005 Mar 31
1
Surface plot for polynomial regression
Dear R-experts,
my goal is to visualize the following polynomial regression as a 3D-surface:
Z = b0 + b1*X + b2*Y + b3*XY + b4*X^2 + b5*Y^2
I believe that a solution to this problem may be of interest to a wider
range of scientists because the problem is a derivative of a more general
problem, i.e.: how to describe the relationship between one dependent
variable and the DIFFERENCE between two
2008 Apr 10
1
Orthogonal polynomial contrasts
How do you remove one of the terms from an ordered polynomial contrast in
your linear model. For example, I have significant terms for linear and
cubic but not quadratic, how would i remove the quadratic term from
lm(response~treatment)
Cheers,
Chris
--
View this message in context: http://www.nabble.com/Orthogonal-polynomial-contrasts-tp16608353p16608353.html
Sent from the R help mailing list
2009 Jan 26
1
glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
Problem:
I am sorting through model selection process for first time and want to make
sure that I have used glm, stepAIC, and update correctly. Something is
strange because I get a different result between:
1) a glm of 12 predictor variables followed by a stepAIC where all
interactions are considered and then an update to remove one specific
interaction.
vs.
2) entering all the terms
2009 May 22
1
Forcing a variableinto a model using stepAIC
Dear All,
I am attempting to use forward and/or backward selection to determine
the best model for the variables I have. Unfortunately, because I am
dealing with patients and every patient is receiving treatment I need
to force the variable for treatment into the model. Is there a way to
do this using R? (Additionally, the model is stratified by
randomisation period). I know that SAS can be
2011 May 06
2
Confidence intervals and polynomial fits
Hi all! I'm getting a model fit from glm() (a binary logistic regression fit, but I don't think that's important) for a formula that contains powers of the explanatory variable up to fourth. So the fit looks something like this (typing into mail; the actual fit code is complicated because it involves step-down and so forth):
x_sq <- x * x
x_cb <- x * x * x
x_qt <- x * x * x
2009 Jun 16
1
Confidence Bands in Polynomial Regression
Hello R users,
Given a linear (in the parameters) regression model where one predictor x
interacts with time and time*time (ie, a quadratic effect of time t):
y = b0 + b1(x) + b2(t) + b3(t^2) + b4(x*t) + b5(x*t^2) + e,
I would like to construct 95% confidence bands (optimally, shaded) around
this function:
*dy* = b1 + b4(t) + b5(t^2)
*dx*
That is, the partial effect of x on y changing over
2003 May 02
2
stepAIC/lme (1.6.2)
Based on the stepAIC help, I have assumed that it only was for lm, aov, and
glm models. I gather from the following correspondence that it also works
with lme models.
Thomas Lumley 07:40 a.m. 28/04/03 -0700 4 Re: [R] stepAIC/lme problem
(1.7.0 only)
Prof Brian Ripley 04:19 p.m. 28/04/03 +0100 6 Re: [R] stepAIC/lme problem
(1.7.0 only)
Prof Brian Ripley 06:09 p.m. 29/04/03 +0100 6 Re: [R]
2003 Aug 04
1
Error in calling stepAIC() from within a function
Hi,
I am experiencing a baffling behaviour of stepAIC(),
and I hope to get any advice/help on what went wrong
or I'd missed. I greatly appreciate any advice given.
I am using stepAIC() to, say, select a model via
stepwise selection method.
R Version : 1.7.1
Windows ME
Many thanks and best regards,
Siew-Leng
***Issue :
When stepAIC() is placed within a function, it seems
2009 May 05
2
Stepwise logistic Regression with significance testing - stepAIC
Hello R-Users,
I have one binary dependent variable and a set of independent variables (glm(formula,…,family=”binomial”) ) and I am using the function stepAIC (“MASS”) for choosing an optimal model. However I am not sure if stepAIC considers significance properties like Likelihood ratio test and Wald test (see example below).
> y <- rbinom(30,1,0.4)
> x1 <- rnorm(30)
> x2
2006 Oct 11
1
Bug in stepAIC?
Hi,
First of all, thanks for the great work on R in general, and MASS in
particular. It's been a life saver for me many times.
However, I think I've discovered a bug. It seems that, when I use
weights during an initial least-squares regression fit, and later try to
add terms using stepAIC(), it uses the weights when looking to remove
terms, but not when looking to add them:
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),
2006 Apr 07
1
how to run stepAIC starting with NULL model?
Hello,
I'm trying to figure out how to run the stepAIC function starting with the
NULL model. I can call the null model (e.g., lm(y ~ NULL)), but using
this object in stepAIC doesn't seem to work.
The objective is to calculate AICc. This can be done if stepAIC can be
run starting with the NULL model; the (2p(p-1)/(n-p-1))to get AICc would
be added to the final step AIC value. Can
2009 Jan 12
3
lm: how are polynomial functions interpreted?
[This email is either empty or too large to be displayed at this time]
2007 Jun 05
1
Question using stepAIC
Hi - I use stepAIC to automatically select the model. The stepAIC was applied on polr as follow:objPolr <- polr(formula=myformula, data=dat, method=METHOD);objPolr.step <- stepAIC(objPolr, trace=T);Then R complaints that it doesn't know about 'dat' when it executes the second line. Below is the exact error that I got when executing the stepAIC line above:Error in eval(expr,
2017 Aug 22
1
boot.stepAIC fails with computed formula
Failed? What was the error message?
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Aug 22, 2017 at 8:17 AM, Stephen O'hagan
<SOhagan at manchester.ac.uk> wrote:
> I'm trying to use boot.stepAIC for
2009 Feb 18
1
using stepAIC with negative binomial regression - error message help
Dear List,
I am having problems running stepAIC with a negative binomial regression model. I am working with data on manta ray abundance, using 20 predictor variables. Predictors include variables for location (site), time (year, cos and sin of calendar day, length of day, percent lunar illumination), oceanography (sea surface temp mean and std, sea surface height mean and std), weather (cos
2003 Jun 16
1
stop criterion for stepAIC
Hello,
I am using the function stepAIC (library MASS) to run a backward
elimination on my linear regression. The new model stepAIC calculates
contains coefficients that have a Pr(>|t|) value below 0.1, but I'd
like to have only coefficients with 0.001 or below.
How can I change the stop criterion for stepAIC, so that it is more
strict? There is a parameter "steps", but it is
2007 Jun 27
1
stepAIC on lm() where response is a matrix..
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 implemented. What is
the way out to use stepAIC in such cases.
regards,