Displaying 20 results from an estimated 11000 matches similar to: "sorting by name"
2008 Jul 06
1
interpreting mixed model anova results
Hi, I am trying to do a repeated measures ANOVA to determine if there is a
significant difference between two sets of timecourse data. Each individual
was given a single treatment and then measured for one variable for 10 days.
Here is made-up example of what my data would look like:
2007 Sep 14
2
unbalanced effects in aov
Hi, I have been having some trouble using aov to do an anova, probably because I'm not understanding how to use this function correctly. For some reason it always tells me that "Estimated effects may be unbalanced", though I'm not sure what this means. Is the formula I am using written incorrectly? Below is the code I am using along with the data:
> my.data
response
2008 Dec 10
1
Stepwise regression
Hi,
I have the response variable 'Y' and four predictors say X1, X2, X3 and X4. Assuming all the assmptions like Y follows normal distribution etc. hold and I want to run linear multiple regression. How do I run the stepwise regression (forward as well as the backward regression).
>From other software (i.e. minitab), I know only X1 and X2 are significant so my regression equation
2013 Jun 04
1
How to write a loop in R to select multiple regression model and validate it ?
I would like to run a loop in R. I have never done this before, so I would be
very grateful for your help !
1. I have a sample set: 25 objects. I would like to draw 1 object from it
and use it as a test set for my future external validation. The remaining 24
objects I would like to use as a training set (to select a model). I would
like to repeat this process until all 25 objects are used as a
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 Nov 02
1
for parameter 'keep' in 'step'
Hello Lady or Sir,
I want to do model selection with 'step' function. But there is a trouble to
me.
For example, there are 5 independent variables, X0,X1,X2,X3 and X4; and 1
dependent variable y.
I want to run stepwise regression y ~ X0 + X1 + X2 + X3 + X4, and I want to
keep X0 always in the
model. Every time when I run command 'step' with 'keep', error information
2010 Apr 01
1
Factorial regression with multiple features: how to remove non-significant features?
Hello all,
I am trying to do factorial regression using lm() like this (example):
model<-lm(y ~ x1 + x2 + x3 + x4 + x1*x2*x3*x4)
The final term 'x1*x2*x3*x4' adds all possible interactions between
explanatory variables to the model. i.e. x1:x2, x1:x2:x3, etc, etc. Now, the
issue is that some of the interactions are significant and some are not.
I can manually remove
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 <-
2011 Nov 09
2
algorithm that iteratively drops columns of a data-frame
Dear R-Users,
I have a problem with an algorithm that iteratively goes over a data.frame and exclude n-columns each step based on a statistical criterion.
So that the 'column-space' gets smaller and smaller with each iteration (like when you do stepwise regression).
The problem is that in every round I use a new subset of my data.frame.
However, as soon as I "generate" this
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
2011 Apr 07
1
Automated Fixed Order Stepwise Regression Function
Greetings,
I am interested in creating a stepwise fixed order regression function. There's a function for this already called add1( ). The F statistics are calculated using type 2 anova (the SS and the F changes don't match SPSS's). You can see my use of this at the very end of the email.
What I want: a function to make an anova table with f changes and delt R^2.
I ran into
2007 Sep 27
1
SAS proc reg stepwise procedure in R
I try to reproduce the SAS proc reg stepwise model selection procedure in R, but the only function I found was "step" which select new variables based on AIC. The SAS procedure I use add a new variable to the model based on F statistics and a pre defined significant level. Then before any new variables are added variables in the model that not meet F statistics at the significant level
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
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
2011 Mar 22
1
Backward elimination in regression
Dear all
I want to run a simple multiple linear regression model, say:
mod <- lm(y~x1+x2+x3+x4)
I have programmed a custom algorithm to calculate the p-values, because
there is clustering present.
I ordered the variables according to their p-value and want to stepwise
eliminate the variables with the highest p-values.
My question: How can I use "update" when I have only the
2012 Jun 16
0
Selecting correlated predictors with LASSO
I'm using the package 'lars' in R with the following code:
> library(lars)
> set.seed(3)
> n <- 1000
> x1 <- rnorm(n)
> x2 <- x1+rnorm(n)*0.5
> x3 <- rnorm(n)
> x4 <- rnorm(n)
> x5 <- rexp(n)
> y <- 5*x1 + 4*x2 + 2*x3 + 7*x4 + rnorm(n)
> x <- cbind(x1,x2,x3,x4,x5)
> cor(cbind(y,x))
y x1 x2
2012 Aug 07
1
lm with a single X and step with several Xi-s, beta coef. quite different:
Hi, (R version 2.15.0)
I am running a pgm with 1 response (earlier standardized Y) and 44
independent vars (Xi) from the same data =a2:
When I run the 'lm' function on single Xi at a time, the beta
coefficient for let's say X1 is = -0.08 (se=0.03256)
But when I run the same Y with 44 Xi-s with the 'step' function (because
I left direction parameter empty, I assume a backward
2010 Apr 15
2
Regression w/ interactions
I have a project due in my Linear Regression class re: regression on a data
set & my professor gave us a hint that there were *exactly *2 sig
interactions. The data set is attached. We have to find which predictors are
significant, & which 2 interactions are sig. Also, I nedd some guidance for
this & selecting the best model. I tried the `full' model, that being:
2009 Aug 24
2
Formulas in gam function of mgcv package
Dear R-experts,
I have a question on the formulas used in the gam function of the mgcv
package.
I am trying to understand the relationships between:
y~s(x1)+s(x2)+s(x3)+s(x4)
and
y~s(x1,x2,x3,x4)
Does the latter contain the former? what about the smoothers of all
interaction terms?
I have (tried to) read the manual pages of gam, formula.gam, smooth.terms,
linear.functional.terms but
2009 Aug 24
2
Formulas in gam function of mgcv package
Dear R-experts,
I have a question on the formulas used in the gam function of the mgcv
package.
I am trying to understand the relationships between:
y~s(x1)+s(x2)+s(x3)+s(x4)
and
y~s(x1,x2,x3,x4)
Does the latter contain the former? what about the smoothers of all
interaction terms?
I have (tried to) read the manual pages of gam, formula.gam, smooth.terms,
linear.functional.terms but