Displaying 20 results from an estimated 1000 matches similar to: "error messgage in lmer for random intercept and slope model"
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
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
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
2012 Dec 29
1
AIC values with lmer and anova function
Dear colleagues,
I have a data from a repeated measures design that I'm analysing through a
mixed model. Nine independent sampling units (flasks with culture medium
with algae) were randomly divided into 3 groups ("c", "t1", "t2"). There is
no need for inclusion of the random effect of the intercept, because the
nine sample units are homogeneous among each other
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
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]
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
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
2011 Feb 04
1
read.table error
R experts,
I am working with a fairly large data set comprised of 563 rows by 116 columns including several
different modes. I have been unable to read in the data set completely using the read.table
function and the RGui (i.e. nearly half the total number of rows are missing from the data set
along with the column names). The data does read in fully using Tinn-R's Rterm;
however, at several
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
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 <-
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
2012 Oct 26
0
Problems getting slope and intercept to change when do multiple reps.
library(ROCR)
n <- 1000
fitglm <- function(iteration,intercept,sigma,tau,beta){
x <- rnorm(n,0,sigma)
ystar <- intercept+beta*x
z <- rbinom(n,1,plogis(ystar))
xerr <- x + rnorm(n,0,tau)
model<-glm(z ~ xerr, family=binomial(logit))
*int*<-coef(model)[1]
*slope*<-coef(model)[2] # when add error you are suppose to get slightly
bias slope. However when I change
2017 Aug 09
0
Random slope random intercept plot after clmm regression
0down votefavorite
<https://stats.stackexchange.com/questions/296569/how-to-obtain-random-slope-random-intercept-plots-for-categorical-response-varia#>
I'm trying to generate a random slope random intercept plot after ordinal
regression using the clmmfunction from the ordinal package in R. I have
aggression levels which are categorical with six levels. Earlier, I made
random intercept
2012 Apr 05
0
Normalizing linear regression slope to intercept
I am wondering if it possible to normalize the slope of a linear regression to its intercept to allow for valid between-group comparisons.
Here is the scenario:
I need to compare the slopes of biomass increase among NAFO divisions of Northwest Atlantic cod. However, the initial division biomass is a confounding factor that may influence the slope of the regression model. How can I normalize the
2010 Sep 10
1
lme, groupedData, random intercept and slope
Windows Vista
R 2.10.1
Does the following use of groupedData and lme produce an analysis with both random intercept and slope, or only random slope?
zz<-groupedData(y~time | Subject,data=data.frame(data),
labels = list( x = "Time",
y = "y" ),
units = list( x = "(yr)", y = "(mm)")
)
plot(zz)
2013 Oct 26
2
Problems with lme random slope+intercept model
Dear all,
I'm trying to fit a model on ecological data in which I have measured a few
biotic and abiotic factors over the course of a few days in several
individuals. Specifically, I'm interested in modelling y ~ x1, with x2, x3,
and 'factor' as independent variables. Because data suggests both slope and
intercept (for y ~x1) might differ between individuals, I'd want to
2006 Oct 30
1
Random intercept-slope correlation (nlme)
Dear list members,
I am working with a multilevel growth curve, that in its simplest form goes
like follows:
Yit = Ai + Bi t + eit (the error term is assumed to follow an AR(1)
autorregressive process)
One major topic in my research is the convergence in the values of Y over
time. Thus, I am interested in the relationship between the random effects
for the intercept and the slope, and I