Displaying 20 results from an estimated 2000 matches similar to: "3-way Interactions w/ stepAIC"
2003 Jun 18
2
Forward stepwise procedure w/ stepAIC
I'm attempting to select a model using stepAIC. I want to use a forward
selection procedure. I have specified a "scope" option, but must not be
understanding how this works. My results indicate that the procedure begins
and ends with the "full" model (i.e., all 17 independent variables)...not
what I expected. Could someone please point out what I'm not
2003 Sep 30
1
Stepwise procedures
Is there a function in R which performs stepwise estimation in ways similar
to SAS/STATA (i.e., allows the analyst to specify the significance levels
for removal/addition of terms).
I've been asked to evaluate two final models: one resulting from a
backwards selection in R (stepAIC) and one resulting from a backwards
selection using PROC LOGISTIC in SAS. The final terms are slightly
2003 May 07
2
"Program" files
Is there any such thing as a program file in R? That is, is it possible to
compile and save code for performing data management and analytic tasks for
a given project into a single/multiple file(s) (i.e., like a script file
(S-Plus), a do file (STATA), or a *.sas file (SAS))?
Any words of wisdom or a point in the direction of some documentation would
be helpful. If it is not possible to work
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will
display counts, row, column, and cell percentages in the same
tables....anything similar to crosstabs in S?
Marc W. Zodet, MS
Health Statistician
Center for Cost and Financing Studies
Division of Statistical Research and Methods
2101 East Jefferson Street, Suite 500
Rockville, Maryland 20852
Phone: 301-594-7072
Fax:
2004 Apr 14
1
Variable Descriptors
Is there a way to associate text descriptions with variables in a
data.frame?
For example...
Let's say that in my data.frame I have a variable named var1. var1
represents the responses to the question "When was the last time you saw
your physician?" When I tabulate the variable var1 I'd like the output to
be a bit more descriptive and contain the more descriptive
2003 Nov 25
3
weighted mean
How do I go about generating a WEIGHTED mean (and standard error) of a
variable (e.g., expenditures) for each level of a categorical variable
(e.g., geographic region)? I'm looking for something comparable to PROC
MEANS in SAS with both a class and weight statement.
Thanks.
Marc
[[alternative HTML version deleted]]
2004 Jul 23
2
Complex Surveys...Specifying Design
I need some guidance from someone who is familiar/has some experience with
the survey package.
The data that I am using is from the Medical Expenditure Panel Survey
(www.meps.ahrq.gov <http://www.meps.ahrq.gov/> ). The STRATA and PSU
variables are varstr01 and varpsu01 respectively. When I try to specify
them with the svydesign function I get an error message. An excerpt of my
session
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
2003 Sep 11
2
Sorting
What is the best way to sort a dataframe?
For example, how would I go about sorting a dataframe (with variables V1-V5)
by ascending V1, V2 and descending V3 while retaining V4 and V5.
Also, is there a relatively easy way by which to re-order my columns?
Thank you for your time.
Marc
Marc Zodet
[[alternative HTML version deleted]]
2003 Sep 17
3
3D plot/surface rotation
How do I rotate 3D plots/surfaces generated by either cloud or wireframe?
Thanks.
Marc
Marc W. Zodet, MS
Health Statistician
Agency for Healthcare Research and Quality
[[alternative HTML version deleted]]
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
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 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]
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 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
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
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
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
0
boot.stepAIC fails with computed formula
The error is "the model fit failed in 50 bootstrap samples
Error: non-character argument"
Cheers,
SOH.
On 22/08/2017 17:52, Bert Gunter wrote:
> 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
2017 Aug 22
1
boot.stepAIC fails with computed formula
SImplify your call to lm using the "." argument instead of
manipulating formulas.
> strt <- lm(y1 ~ ., data = dat)
and you do not need to explicitly specify the "1+" on the rhs for lm, so
> frm2<-as.formula(paste(trg," ~ ", paste(xvars,collapse = "+")))
works fine, too.
Anyway, doing this gives (but see end of output)"
bst <-