Displaying 20 results from an estimated 400 matches similar to: "lmer error confusion"
2006 Feb 20
1
Extracting variance components from lmer
Hi All.
I need a bit of help extracting the residual error variance from the VarCorr
structure from lmer.
#Here's a 2-way random effects model
lmer.1 <- lmer(rating ~ (1|person)+(1|rater), data = dat)
#Get the structure
vc.fit <- VarCorr(lmer.1)
#results in.....
$person
1 x 1 Matrix of class "dpoMatrix"
(Intercept)
(Intercept) 0.7755392
$rater
1 x 1 Matrix
2007 May 11
1
Create an AR(1) covariance matrix
Hi All.
I need to create a first-order autoregressive covariance matrix
(AR(1)) for a longitudinal mixed-model simulation. I can do this
using nested "for" loops but I'm trying to improve my R coding
proficiency and am curious how it might be done in a more elegant
manner.
To be clear, if there are 5 time points then the AR(1) matrix is 5x5
where the diagonal is a constant
2007 Sep 14
2
How to remove index from list after split?
In the following example, how can I drop the group index from the list after
I perform a split?
n <- 3
nn <- 10
g <- factor(round(n * runif(n * nn)))
x <- rnorm(n * nn) + sqrt(as.numeric(g))
df <- data.frame(g,x)
df.s <- split(df,g)
Thanks!
Rick DeShon
[[alternative HTML version deleted]]
2008 May 06
2
NLS plinear question
Hi All.
I've run into a problem with the plinear algorithm in nls that is confusing
me.
Assume the following reaction time data over 15 trials for a single unit.
Trials are coded from 0-14 so that the intercept represents reaction time in
the first trial.
trl RT
0 1132.0
1 630.5
2 1371.5
3 704.0
4 488.5
5 575.5
6 613.0
7 824.5
8 509.0
9
2006 Feb 01
1
Scatterplot color options in CAR package?
Hi All.
I'd like to change the default plotting colors used to construct a
scatterplot with regression line in the CAR package.
So,
scatterplot(y~pred,smooth=FALSE, xlab="X", ylab="Y", lwd=2)
If I change the palette (e.g., palette(ranbow(6)), I can change the color of
the lines and points.
However, the axes and labels remain in black (i.e., the first color in the
2008 Jan 25
1
nlsList (nlme) error
Hi All.
I'm trying to run nlsList an getting an error that makes no sense to
me. I have accuracy and reaction time data over many trials for each
person (id)
When I use nlsList code that is virtually identical to the example in
the doc file I get the following error. I've tried everything I could
think of and can't get around it. Any ideas what I'm doing wrong?
**************
2009 Feb 24
1
replace zeros in a block diagonal matrix with small random values?
Hi All.
Imagine you have a large block diagonal matrix. I'd like to replace
the zeros in this matrix with small random (runif) numbers. Any ideas
for a simple and efficient way to do this?
Best regards,
Rick DeShon
2011 Feb 09
2
Generate multivariate normal data with a random correlation matrix
Hi All.
I'd like to generate a sample of n observations from a k dimensional
multivariate normal distribution with a random correlation matrix.
My solution:
The lower (or upper) triangle of the correlation matrix has
n.tri=(d/2)(d+1)-d entries.
Take a uniform sample of n.tri possible correlations (runi(n.tr,-.99,.99)
Populate a triangle of the matrix with the sampled correlations
Mirror the
2007 Jun 19
1
Matrix library error: "should never happen; please report"
Hi,
I got the following error. Sorry but this time I couldn't reproduce it
with a simple chunk of code:
.TM.repl.i.2col(): drop 'matrix' case ...
Error in .nextMethod(x = x, i = i, j = j) :
'i' has no integer column number should never happen; please report
In addition: Warning messages:
1: Ambiguous method selection for "%*%", target
2007 Dec 03
1
Efficient computation of average covariance matrix over a list
Hi All.
I would like to compute a separate covariance matrix for a set of variables
for each of the levels of a factor and then compute the average covariance
matrix over the factor levels. I can loop through this computation but I
need to perform the calculation for a large number of levels and am looking
for something more elegant. To be concrete....
u <- 3
n <- 10
x <-
2018 Nov 15
2
Question about libopusfile downloading the last 64K when duration is not needed
Thanks for the quick response.
That makes sense. I just wanted to make sure it wasn't an easy fix, or
that I wasn't overlooking something.
My scenario calls for very low latency playback with a user being able
to jump between many files quickly, or seek quickly.
This means I am priming the pump by downloading the first chunk of many
files that are likely to be started soon.
I was
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
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
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]
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
2003 Feb 07
1
Bug in socketConnection (PR#2535)
Platform: Windows
Version: 1.6.2
When first called, socketConnection gives an error. On subsequent calls it
performs correctly. Thus the first call has the effect of "priming" the
connection. Eg
> socketConnection(port=50)
Error in socketConnection(port = 50) : unable to open connection In
addition: Warning message:
localhost:50 cannot be opened
> MIM <-
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
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
2019 Dec 20
5
Upgrading from Debian Stretch to Buster, Van Belle package
Hello,
> Looks like your in the middle of the dist-upgrade in buster.
Yes indeed.
> looks like bind is upgrading and samba-libs is not yet installed.
Indeed, I think it is not:
# dpkg -L samba-libs
dpkg-query: package 'samba-libs' is not installed
Also the following directories no longer exist:
- /usr/lib/x86_64-linux-gnu/samba/
- /var/lib/samba/bind-dns/
> apt-get update
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