Displaying 20 results from an estimated 500 matches similar to: "AIC values with lmer and anova function"
2010 Dec 29
2
as.object: function doesn't exist but I wish it did
I seem to come to this problem alot, and I can find my way out of it with a
loop, but I wish, and wonder if there is a better way. Here's an example
(lmer1-5 are a series of lmer objects):
bs=data.frame(bic=BIC(lmer1,lmer2,lmer3,lmer4,lmer5)$BIC)
rownames(bs)=c('lmer1','lmer2','lmer3','lmer4','lmer5')
best=rownames(bs)[bs==min(bs)]
> best
[1]
2006 Apr 28
1
variance using lmer
Dear R help
I have a question on the variance of the binomial probit model.
I have fitted the following model :
> lmer1<-lmer(mp ~ l + op + l*op+ us_lev + bw_lev +(1|tatu) ,
+ family = binomial(link="probit"),
+ method = 'Laplace',
+ data = matings,
+ msVerbose= True)
> summary(lmer1)
Generalized linear
2010 Feb 01
2
Missing names in LMER and GLM
I'm having trouble with 'lmer' and would really appreciate it if anybody
could help.
I am trying to run generalized linear mixed effect model, and am using
'lmer', but some of the names inside the data do not show up in the summary
after I compute the 'lmer'. As a close example of the data I have, the
objects are
Calls = MM, MB, MM, MM, MN, MNX, MNX, ...
-this
2005 Sep 19
1
How to mimic pdMat of lme under lmer?
Dear members,
I would like to switch from nlme to lme4 and try to translate some of my
models that worked fine with lme.
I have problems with the pdMat classes.
Below a toy dataset with a fixed effect F and a random effect R. I gave
also 2 similar lme models.
The one containing pdLogChol (lme1) is easy to translate (as it is an
explicit notation of the default model)
The more parsimonious
2008 Feb 13
1
lmer: Estimated variance-covariance is singular, false convergence
Dear R Community!
We analyse the impact of climbing activity on cliff vegetation. During
our fieldwork, we recorded 90 Transects in 3 climbing sites. The aim is
to see, if the plant cover (response: Cover) is influenced only by
crevice availability (predictor: Cracs), or, additional, by the distance
to the climbing route (predictor: Distance). Six plots are nested within
one Transect
2007 Oct 08
0
Residuals for binomial lmer fits
Dear all,
I would like to use the residuals in a general linear mixed effect model
to diagnose model fit.
I know that the resid function has been implemented for linear mixed
models but not yet for general linear mixed effects. Is there a way to
get them out of lmer fit objects?
I tried searching the r-help archive and found nothing.
I tried and failed to replicate what (I guessed would be
2007 May 16
1
lmer error confusion
Hi All.
I'm trying to run a simple model from Baayan, Davidson, & Bates and getting
a confusing error message. Any ideas what I'm doing wrong here?
# Here's the data.....
Subj <- factor(rep(1:3,each=6))
Item <- factor(rep(1:3,6))
SOA <- factor(rep(0:1,3,each=3))
RT <-
c(466,520,502,475,494,490,516,566,577,491,544,526,484,529,539,470,511,528)
priming
2006 Feb 12
1
Mathematical typesetting of column heads using the latex (Hmisc) function
Dear r-helpers,
I would very much appreciate help with the following problem:
The following command (in a .Rnw file)
latex(anova(e7.lmer3, e7.lmer4), file = 'e7lmer34.tex', rowname = c
('nonlinear', 'linear'), longtable = FALSE, dcolumn = T, booktabs =
T, table.env = F)
produces the following output after running Sweave:
% latex.default(anova(e7.lmer1, e7.lmer2),
2007 Aug 13
0
R^2 for multilevel models
Hi there,
In multiple regression one way to view R^2 is as (the square of) the
correlation between original y's and the estimated y's.
Suppose you fit a multilevel model with random intercept for each
cluster. Would it be valid to compute an R^2 by using fixed effects
plus the group intercepts to reduce the residuals?
I suspect this has been done and, given its absence from the lmer
2008 Oct 30
0
lme4/anova, error message: "Calculated PWRSS for a LMM is negative"
Dear all,
I'm using the latest version of the package lme4 and R version 2.7.2
(2008-08-25).
After I run the model, I get the results of the model (cf. below). Then, I
run an ANOVA using the "anova" function and I get the following message
"Error in anova(lmer1) : Calculated PWRSS for a LMM is negative".
I went trough the R-mailing list and a similar error message was
2007 Jan 26
0
R crash with modified lmer code
Hi all,
I've now got a problem with some modified lmer code (function lmer1
pasted at end) - I've made only three changes to the lmer code (marked),
and I'm not really looking for comments on this function, but would like
to know why execution of the following commands that use it almost
invariably (but not quite predictably) leads to the R session
terminating.
Here's the command
2012 May 08
2
mgcv: inclusion of random intercept in model - based on p-value of smooth or anova?
Dear useRs,
I am using mgcv version 1.7-16. When I create a model with a few
non-linear terms and a random intercept for (in my case) country using
s(Country,bs="re"), the representative line in my model (i.e.
approximate significance of smooth terms) for the random intercept
reads:
edf Ref.df F p-value
s(Country) 36.127 58.551 0.644
2007 Dec 02
0
error messgage in lmer for random intercept and slope model
Greetings,
I am trying to run a logistic regression model for binary data with a random
intercept and slope in R 2.6.1. When I use the code:
lmer1<-lmer(infect ~ time+gender + (1+time|id), family=binomial, data=ichs,
method="Laplace")
Then from:
summary(lmer1)
I get the message:
Error in if (any(sd < 0)) return("'sd' slot has negative entries") :
missing
2013 Mar 02
3
if value is in vector, perform this function
Hi,
I'm trying to set up R to run a simulation of two populations in which every 3.5 days, the initial value of one of the populations is reset to 1.5. I'm simulation an experiment we did in which we fed Daphnia populations twice a week with algae, so I want the initial value of the algal population to reset to 1.5 twice a week to simulate that feeding. I've use for loops and if/else
2004 Mar 29
0
Error term in aov
Hi,
I'm trying to analyse a hierachical design and am running into some
trouble. Clearly I don't fully understand "Error" and I was hoping someone
could set me straight.
We measure percentage algal cover in each of 5 quadrats from each of 16
patches where 4 treatments are randomly allocated to a patch.
First suppose patches are coded 1 to 16. then the following gives the
2012 Jul 24
1
Linear mixed-effect models and model selection
Hi,
I am looking at the effect of allelochemicals produced by two freshwater macrophyte species on two different algal species at different days. I am comparing the effect of each macrophyte on each algae at each day. I received help from someone doing the LMEM (Linear mixed-effect models) and he told me to do ANOVA to analyse the LMEM. However, I received these feedback from my examinor;
1. An
2007 Mar 30
0
problem using mcmcsamp() with glmer models containing interaction terms in fixed effects
Dear All,
I've been using mcmcsamp() successfully with a few different mixed models
but I can't get it to work with the following. Is there an obvious reason
why it shouldn't work with a model of this structure ?
*brief summary of objective:
I want to test the effect of no-fishing marine reserves on the abundance of
a target species.
I have samples at coral reef sites inside and
2007 Jul 22
1
summary of linear fixed effects model is different than the HSAUR book
Running R 2.5.1 and a newly downloaded lme4 package on WinXP
I'm trying to work my way through Everitt and Hothorn's "Handbook of
Statistical Analyses Using R," c 2006. (No, it's not homework.)
Chapter 10 discusses linear mixed effects models for longitudinal data.
I've called my long data frame BtheB.long
Here's the model from the book, which I run.
lmer1 <-
2007 Oct 03
0
datasets
Hi, my name is Luis, and I have a problem with a dataset.
Its name is algae and count the collection of data in a lake and respective
proliferation of algae.
The parameters that it has are: "mxPH", "mnO2", "Cl", "NO3" "NH4", "oPO4",
"PO4", "Chla" and "a1" all numerics.
a1 - algae1
If I try to do SVM with
2013 May 01
1
Multiple Paired T test from large Data Set with multiple pairs
Hi,
Assuming that your dataset is similar to the one below:
set.seed(25)
dat1<- data.frame(Algae.Mass=sample(40:50,10,replace=TRUE),Seagrass.Mass=sample(30:70,10,replace=TRUE),Terrestrial.Mass=sample(80:100,10,replace=TRUE),Other.Mass=sample(40:60,10,replace=TRUE),Site.X.Treatment=rep(c("ALA1A","ALA1U"),each=5),stringsAsFactors=FALSE)
library(reshape2)