Displaying 20 results from an estimated 400 matches similar to: "2 lme questions"
2011 Feb 01
1
using SNOW and clusterApplyLB to run jobs parallel
I have this function and want to run it parallel with different sets of data.
Using SNOW and clusterApplyLB.
system.time(out <- mclapply(cData, plotGraph)) #each cData contains 100X6000
doubles
system.time(out <- mclapply(cData2, plotGraph))
system.time(out <- mclapply(cData3, plotGraph))
system.time(out <- mclapply(cData4, plotGraph))
system.time(out <- mclapply(cData5,
2008 Aug 29
3
extract variance components
HI,
I would like to extract the variance components estimation in lme function
like
a.fit<-lme(distance~age, data=aaa, random=~day/subject)
There should be three variances \sigma_day, \sigma_{day %in% subject } and
\sigma_e.
I can extract the \sigma_e using something like a.fit$var. However, I cannot
manage to extract the first two variance components. I can only see the
results in
2009 Apr 21
4
search through a matrix
Hi. I have a 925 by 925 correlation matrix corM. I want to identify all
variables that have correlation greater than 0.9. Can anyone suggest an "R
way" of doing this?
Thank you.
--
View this message in context: http://www.nabble.com/search-through-a-matrix-tp23153538p23153538.html
Sent from the R help mailing list archive at Nabble.com.
2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi,
I'm analyzing a large number of large simulation datasets, and I've
isolated one of the bottlenecks. Any help in speeding it up would be
appreciated.
`dat` is a dataframe of samples from a regular grid. The first two
columns are the spatial coordinates of the samples, the remaining 20
columns are the abundances of species in each cell. I need to calculate
the species richness in
2009 Jul 07
3
Numbering sequences of non-NAs in a vector
Greetings, I have a vector of the form:
[10,8,1,3,0,8,NA,NA,NA,NA,2,1,6,NA,NA,NA,0,5,1,9...] That is, a combination
of sequences of non-missing values and missing values, with each sequence
possibly of a different length.
I'd like to create another vector which will help me pick out the sequences
of non-missing values. For the example above, this would be:
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers,
Spencer Graves and Manual Morales proposed the following methods to
simulate p-values in lme4:
************preliminary************
require(lme4)
require(MASS)
summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data =
epil), cor = FALSE)
epil2 <- epil[epil$period == 1, ]
epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem:
We would like to explain the spatial
distribution of juvenile fish. We have 2135 records, from 75 vessels
(code_tripnr) and 7 to 39 observations for each vessel, hence the random effect
for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and
sub sampling factor. There are no extreme outliers in lat/lon. The model
2016 Apr 08
3
Generating Hotelling's T squared statistic with hclust
I am doing a cluster analysis with hclust. I want to get hclust to output the Hotelling's T squared statistic for each cluster so I can evaluate is data points should be in a cluster or not. My research to answer this question has been unsuccessful. Does anyone know how to get hclust to output the Hotelling's T squared statistic for each cluster?
Mike
[[alternative HTML version
2011 Jan 20
2
circular reference lines in splom
Hello everyone,
I'm stumped. I'd like to create a scatterplot matrix with circular
reference lines. Here is an example in 2d:
library(ellipse)
set.seed(1)
dat <- matrix(rnorm(300), ncol = 3)
colnames(dat) <- c("X1", "X2", "X3")
dat <- as.data.frame(dat)
grps <- factor(rep(letters[1:4], 25))
panel.circ <- function(x, y, ...)
{
circ1
2004 Jun 22
2
function not in load table
Hi,
I apologize for this often/old question. I found some hints but couldn't
solve the problem so far.
I have C functions (incl. the header files) as well as the R wrapper
functions which I want to use for faster calculations. These functions
are included in a R package.
The installation process seems to be ok (no errors). I also can load the
package without errors. But when I call the
2017 May 10
2
bug report: nlme model-fitting crashes with R 3.4.0
lme() and gls() models from the nlme package are all crashing with R.3.4.0. Identical code ran correctly, without error in R 3.3.3 and earlier versions. The behavior is easily demonstrated using one of the examples form the lme() help file, along with two simple variants. I have commented the errors generated by these calls, as well as the lines of code generating them, in the code example below.
2003 Nov 29
3
performance gap between R 1.7.1 and 1.8.0
Dear R-help,
A colleague of mine was running some code on two of our boxes, and noticed a
rather large difference in running time. We've so far isolated the problem
to the difference between R 1.7.1 and 1.8.0, but not more than that. The
exact same code took 933.5 seconds in 1.7.1, and 3594.4 seconds in 1.8.1, on
the same box.
Basically, the code calls boot() to bootstrap fitting mixture
2008 Nov 06
2
need help in plotting barchart
Df contains
Session_Setup DCT RevDataVols_bin counts
comp
1 Session_Setup RLL 1 NA
Session_Setup+RLL+1
2 Session_Setup RLL 2 NA
Session_Setup+RLL+2
3 Session_Setup RLL 3 NA
Session_Setup+RLL+3
4 Session_Setup RLL 4 NA
Session_Setup+RLL+4
5 Session_Setup RLL 5
2009 Sep 08
2
CallerID app for Symbian?
Hi,
we're using a GSM-Gateway on asterisk to forward incoming calls to the
cellphones, but, of course, the cellphones always display the callerid from
the gateway. Does anyone know a symbian app that could (on an incoming call)
connect via grps/3G to a database behind the asterisk and fetch the real
callerid and do a calleridname-lookup on a number?
-------------- next part --------------
An
2011 Mar 17
2
fitting gamm with interaction term
Hi all,
I would like to fit a gamm model of the form:
Y~X+X*f(z)
Where f is the smooth function and
With random effects on X and on the intercept.
So, I try to write it like this:
gam.lme<- gamm(Y~ s(z, by=X) +X, random=list(groups=pdDiag(~1+X)) )
but I get the error message :
Error in MEestimate(lmeSt, grps) :
Singularity in backsolve at level 0, block 1
2008 Oct 16
3
how to count unique observations by variables
Dear R-helpers,
I have a data frame with 3 variables, each record is a unique combination of
the three variables. I would like to count the number of unique values of v3
in each v1, and save it as a new variable v4 in the same data frame.
e.g.
df1
[v1] [v2] [v3]
[1,] "a" "C" "1"
[2,] "b" "C" "2"
[3,] "c" "B"
2000 Jun 04
2
mle (PR#560)
Full_Name: Per Broberg
Version: 1.00
OS: Windows 98
Submission from: (NULL) (62.20.231.229)
I tested my installation with the following:
> library(lme)
Loading required package: nls
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"C:\PROGRAM\R\RW1000/library/nls/libs/nls.dll":
LoadLibrary failure
> data(Orthodont)
> fm1
2004 Oct 03
1
creating new varFunc classes in nlme .. error: "Don't know how to get coefficients for .. object"
Hello. I am trying my hand at modifying the varFunc
class varExp, but I must be missing a step. All I
want to do right now is make a working copy of varExp,
call it varExp2, and then later change it.
coef.varExp2, coef<-.varExp2, and Initialize.varExp2
all seem to work properly after I construct them. I
can successfully use the commands:
v2 <- varExp2(form = ~age|Sex,fixed =
2010 Feb 17
1
Package or function for selecting matched pairs?
Hi all,
I am designing a study in which I am selecting a subset of college
courses to be randomly assigned to one of two conditions. I would like
to create matched pairs of courses, and then randomly assign them to
condition within each pair. I would like to identify, for each course,
the one that best matches it, and quantify how well it matches. Here
is a much simpler data set for purposes of
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello,
Any advice or pointers for implementing Sobel's test for mediation in
2-level model setting? For fitting the hierarchical models, I am using
"lme4" but could also revert to "nlme" since it is a relatively simple
varying intercept model and they yield identical estimates. I apologize for
this is an R question with an embedded statistical question.
I noticed that a