Displaying 20 results from an estimated 10000 matches similar to: "Restrict AIC comparison to succesful models?"
2013 Feb 23
1
anova comparisons
I have several linear models on the same data:
m1 <- lm(y ~ poly(x,1))
m2 <- lm(y ~ poly(x,2))
m3 <- lm(y ~ poly(x,3))
What I don't understand is why
anova(m1, m2, m3, test="F")
- yields the same RSS and SS values, but a different p-value from anova(m1,
m2, test="F")
- when it also yields the SAME as anova(m2, m3, test="F")
What am I missing?
Rob
2019 Aug 31
2
inconsistent handling of factor, character, and logical predictors in lm()
Dear Abby,
> On Aug 30, 2019, at 8:20 PM, Abby Spurdle <spurdle.a at gmail.com> wrote:
>
>> I think that it would be better to handle factors, character predictors, and logical predictors consistently.
>
> "logical predictors" can be regarded as categorical or continuous (i.e. 0 or 1).
> And the model matrix should be the same, either way.
I think that
2006 May 11
2
greco-latin square
Hi,
I am analyzing a repeated-measures Greco-Latin Square with the aov command.
I am using aov to calculate the MSs and then picking by hand the appropriate
neumerator and denominator terms for the F tests.
The data are the following:
responseFinger
mapping.code Subject.n index middle ring
little
----------------------------------------------------------------------------
1 1
2005 Sep 05
2
model comparison and Wald-tests (e.g. in lmer)
Dear expeRts,
there is obviously a general trend to use model comparisons, LRT and AIC
instead of Wald-test-based significance, at least in the R community.
I personally like this approach. And, when using LME's, it seems to be
the preferred way (concluded from postings of Brian Ripley and Douglas
Bates' article in R-News 5(2005)1), esp. because of problems with the
d.f. approximation.
2013 Oct 17
1
pamer.fnc y la nueva versión de R
Hola buenas noches,
tengo un problema bastante gordo. ¿A alguno le ha dejado de funcionar las
funciones pamer.fnc y mcp.fnc con la nueva versión de R? La semana pasada
formatee el ordenador y ahora scripts antiguos no funcionan. La cuestión es
que me precupa que no funcione el ejemplo de tutorial del autor.
Os dejo un script que debería de funcionar y no lo hace
2012 Mar 21
2
Type II and III sum of squares (R and SPSS)
To whom it may concern
I made some analysis with R using the command Anova. However, I found
some problmes with the output obtained by selecting type II o type III
sum of squares.
Briefly, I have to do a 2x3 mixed model anova, wherein the first factor
is a between factor and the second factor is a within factor. I use the
command Anova in the list below, because I want to obtain also the sum
2002 Nov 07
2
Qualitative factors
Hi,
I have some doubt about how qualitative factors are coded in R. For
instance, I consider a response y, a quantitative factor x and a qualitative
factor m at 3 levels, generated as follow :
y_c(6,4,2.3,5,3.5,4,1.,8.5,4.3,5.6,2.3,4.1,2.5,8.4,7.4)
x_c(3,1,3,1,2,1,4,5,1,3,4,2,5,4,3)
m_gl(3,5)
lm(y~x+m)
Coefficients:
(Intercept) x m2 m3
3.96364 0.09818
2019 Aug 30
3
inconsistent handling of factor, character, and logical predictors in lm()
Dear R-devel list members,
I've discovered an inconsistency in how lm() and similar functions handle logical predictors as opposed to factor or character predictors. An "lm" object for a model that includes factor or character predictors includes the levels of a factor or unique values of a character predictor in the $xlevels component of the object, but not the FALSE/TRUE values
2011 Apr 13
2
setting pairwise comparisons of columns
Hi,
I have a number of genes (columns) for which I want to examine pairwise
associations of genotypes (each row is an individual)...For example (see
data below), I would like to compare M1 to M2, M2 to M3, and M1 to M3 (i.e.
does ac from M1 tend to be found with bc from M2 more often than expected.)
Down stream I will be performing chi square tests for each pair.
But I am looking for a way to
2012 Sep 25
1
REML - quasipoisson
hi
I'm puzzled as to the relation between the REML score computed by gam and
the formula (4) on p.4 here:
http://opus.bath.ac.uk/22707/1/Wood_JRSSB_2011_73_1_3.pdf
I'm ok with this for poisson, or for quasipoisson when phi=1.
However, when phi differs from 1, I'm stuck.
#simulate some data
library(mgcv)
set.seed(1)
x1<-runif(500)
x2<-rnorm(500)
2007 Feb 11
3
merge words=data name
I would like to merge two parts of words to get a name of the data. First
M3$N (invariable) and second is a number from 0001 to 3003 -
M3$N0001,M3$N0002,...,M3$N3003. For example if I do it like this:
my.data <- paste("M3$N",2456,sep="")
I get
> my.data
[1] "M3$N2456"
But I want to get something equivalent to
my.data<- M3$N2456
Is there any way to do it?
2009 Aug 17
1
[Fwd: Re: R code to reproduce (while studying) Bates & Watts 1988]]]
Kevin Wright wrote:
> library(nlme)
> m2 <- gnls(conc ~ t1*(1-t2*exp(-k*time)),
> data = df.Chloride,
> start = list(
> t1 = 35,
> t2 = 0.91,
> k = 0.22))
So my error was to use nls instead that gnls. Thanks a lot, Kevin.
> summary(m2)
> plot(m2)
> lag.plot(resid(m2), do.lines=FALSE)
>
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA.
This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error.
is it possible to perform this test in ecodist?
many thanks
2007 Jul 26
3
substituting dots in the names of the columns (sub, gsub, regexpr)
Dear R users,
I have the following two problems, related to the function sub, grep,
regexpr and similia.
The header of the file(s) I have to import is like this.
c("y (m)", "BD (g/cm3)", "PR (Mpa)", "Ks (m/s)", "SP g./g.", "P
(m3/m3)", "theta1 (g/g)", "theta2 (g/g)", "AWC (g/g)")
To get rid of spaces and
2011 Mar 08
1
SEM error
Dear All,
I am new for R and SEM. I try to fit the model with Y (ordinal outcome), X
(4 categorical data), M1-M3 (continuous), and 2 covariates (Age&sex) as a
diagram.
library(polycor)
model.ly <-specify.model()
1: x -> m1, gam11, NA
2: x -> m2, gam12, NA
3: x -> m3, gam13, NA
4: age -> m1, gam14, NA
5: age -> m2, gam15, NA
6: age -> m3, gam16, NA
7: sex -> m1,
2010 Oct 24
1
Optimize parameters of ODE Problem which is solved numeric
Hi,
I have a data-matrix:
> PID
sato hrs fim health
214 3 4.376430 6.582958 5
193 6 4.361825 3.138525 6
8441 6 4.205771 3.835886 7
7525 6 4.284489 3.245139 6
6806 7 4.168926 2.821833 7
5682 7 1.788707 1.212653 7
5225 6 1.651463 1.436980 7
4845 6 1.692710 1.267359 4
4552 5 1.686448 1.220539 6
2013 Oct 11
3
[LLVMdev] Generate code for ARM Cortex m0, m3, and m4.
Hi,
I am trying to cross compile code for ARM Cortex m0, m3, and m4.
For m0, I use:
-target armv6--eabi -mcpu=cortex-m0
That seems to work. For m3 and m4, I use the following which does not work
(fatal error: error in backend: CPU: 'cortex-m3' does not support ARM mode):
-target armv7m--eabi -mcpu=cortex-m3
and
-target armv7em--eabi -mcpu=cortex-m4
Who can help me with the
2012 Nov 06
1
Filling matrix elements with a function
Hi all,
I have a matrix simulating migration in a spatial model. I want to be
able to define movement (the values of m1, m2 and m3) as only != 0
between adjacent patches and contingent on certain conditions as
defined in the function.
Here is the code:
WET<-function(t) {everglades$precipitation[t]} #simply reads
precipitation data from a csv, value is numeric
AB<-function(WET,t)
2013 Apr 18
1
find lowest AIC of a LM
hello all,
I have a simple linear model with 4/5 variables that I am trying to fit.
I would like to find the lowest AIC value with any combination of all
the variables. I would like to implement this with a while/for loop.
Possibly I would like to generalize this so then I can use it when I
have many more variables. I do not want to use step AIC. At the moment I
am doing it manually but I
2008 Nov 15
1
how to join these two models?
Dear R users,
I have this 2 models that fit to my data:
M3varI <- update (M3, weights=varIdent(form= ~ 1|SITE))
M3AR1<-update(M3,correlation=corAR1())
The first one, updates my M3 so that I can account for the variance
structure of random erros.
The second one, updates my M3 so that I can account for the
correlation structure of random errors.
How can I put them toghether in one