Displaying 20 results from an estimated 200 matches similar to: "Multilevel analysis with package lme"
2004 Sep 05
1
Question to NLME, ML vs. REML
Dear all,
I am planning to use nlme library for analysis of experiments in semiconductor
industry. Currently I am using "lm" but plan to move to "lme" to handle
within wafer / wafer-to-wafer and lot-to-lot variation correctly.
So far everything is working well, but I have a fundamentel question:
NLME offers "maximum likelihood" and "restricted maximum
2004 Sep 13
6
Spare some CPU cycles for testing lme?
If anyone has a few extra CPU cycles to spare,
I'd appreciate it if you could verify a problem that I
have encountered. Run the code
below and tell me if it crashes your R before
completion.
library(lme4)
data(bdf)
dump<-sapply( 1:50000, function(i) {
fm <- lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf,
random = ~ IQ.ver.cen | schoolNR);
cat("
2005 Jan 11
1
lme4 print and summary errror
Hi all - (this is posted to r-help and R-SIG-MAC)
OSX 10.3.7, R 2.0.1, lme4/Matrix/latticeExtra latest, fresh install of
R. MASS loaded (or not).
I am getting an error message for the print() and summary() commands
with all lme models I try and run in lme4 (GLMM's work fine). Using
the example from the lme help, summary and print produce the following
errors, despite the model being
2012 Aug 10
2
Function definition: where is the error in the "for" loop?
Dear all,
The following function code fails with errors (see below):
RegPlots <- function (data, ContrVar, RespVar){
intNmbrRows<-length(RespVar);intNmbrCols<-lenght(ContrVar)
par(mfrow=c(intNmbrRows,intNmbrCols))
For(i in 1:intNmbrRows){
For (j in 1:intNmbrCols){
RegGraf(data,ContrVar[i],RespVar[j])
}
}
2007 May 21
1
can I get same results using lme and gls?
Hi All
I was wondering how to get the same results with gls and lme. In my lme, the
design matrix for the random effects is (should be) a identity matrix and
therefore G should add up with R to produce the R matrix that gls would report
(V=ZGZ'+R). Added complexity is that I have 3 levels, so I have R, G and say H
(V=WHW'+ZGZ'+R). The lme is giving me the correct results, I am
2004 May 15
1
Again some questions about multilevelanalysis
Dear list,
I asked some questions about multilevelanalysis a couple of months ago. In the
meantime I did some reading about the subject. Now I'd like to check, if I
understood it all correctly. If you think my questions are not appropriate
for this list, please tell me so and i will immediatly stop asking them.
I have a dataset with one predicted variable (y), two explanatory variables
2004 May 28
1
dotchart questions
I am trying to put 3 dotcharts side-by-side with minimal space between
each. Each chart is for a different variable, but the vertical axes are
the same.
I want to have vertical axis labels on the lefthand chart but no
vertical axis labels on the other two. Plus, I would like very little
space between charts 1 & 2 and between charts 2 & 3.
I have one approach but am not too happy with
2007 Jun 15
2
Problem with workspace loading after languageR use
Hello R,
To analyze multi-level data, I started learning and using lmer. So far
so wonderful. I then found some useful functions in package languageR.
But then the following problem ocurred: Whenever I load and use the
languageR package, then save the workspace - or quit R with saving the
workspace - I am unable to reload that workspace in a later session.
That is, R doesn't start at all
2010 Feb 11
2
Unexpected output in first iteration of for-loop
Dear r-helpers,
why do I get an output in the first iteration of the for-loop
which contains the string values of the input vector,
and how can I avoid that?
Here's the output (only line 1 is wrong)
latentVariable Indiv Group
1 rPlanning rIterat rTDD
2 rPlanning 0.79 0.84
3 rIterat 0.79 0.83
4 rTDD 0.9 0.96
5 rStandup 0.83 0.82
6
2008 Jun 18
2
randomForest outlier
I try to use ?randomForest to find variables that are the most important to
divide my dataset (continuous, categorical variables) in two given groups.
But when I plot the outliers:
plot(outlier(FemMalSex_NAavoid88.rf33, cls=FemMalSex_NAavoid88$Sex),
type="h",col=c("red","green")[as.numeric(FemMalSex_NAavoid88$Sex)])
it seems to me that all my values appear as
2012 Apr 16
1
R: Help; error in optim
Hello,
When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that
Error in optim(start, fn = z, data = q, hessian = T) :?
? objective function in optim evaluates to length 25 not 1
can somebody?help me remove this error. Is my censoring approach correct.
n=25;rr=1000
p=1.5;b=1.2
for (i in 1:rr){
q<-c(t,cen)
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
2006 Jun 14
3
A question about stepwise procedures: step function
Dear all,
I tried to use "step" function to do model selection, but I got an error massage. What I don't understand is that data as data.frame worked well for my other programs, how come I cannot make it run this time. Could you please tell me how I can fix it?
***************************************************************************************************
2017 Jun 20
2
Problem with shortestPath in igraph and qgraph
hello,
I have a graph and i use qgraph package to calculate centrality parameters.
Now I want to know the maximum value of shortest path for each vertex with
discarding the Inf value in short pathes. For this I use the
ShortestPathLengths of centrality function in qgraph. but when I want to
get the maximum the result is wrong. here is my code:
cen<-centrality(Q)
2007 Aug 16
1
Question about sm.options & sm.survival
Hi, there:
It's my first time to post question in this forum, so thanks for your
tolerance if my question is too naive. I am using a nonparametric smoothing
procedure in sm package to generate smoothed survival curves for continuous
covariate. I want to truncate the suvival curve and only display the part
with covariate value between 0 and 7. The following is the code I wrote:
2005 Oct 24
1
Error in step() (or stepAIC) for Cox model
Hello all,
I am trying to use stepwise procedure to select covariates in Cox model
and use bootstrap to repeat stepwise selection, then record how many
times variables are chosen by step() in bootstrap replications. When I
use step() (or stepAIC) to do model selection, I got errors. Here is the
part of my code
for (j in 1:mm){ #<--mm=10
for (b in 1:nrow(reg.bs)){ #<--bootstrap 10
2017 Jun 21
0
Problem with shortestPath in igraph and qgraph
Hard to follow data analysis without data. Try making your example reproducible [1][2][3] and post in plain text (a setting in your emailer). Read the Posting Guide mentioned in the footer to avoid other posting pitfalls.
[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
[2] http://adv-r.had.co.nz/Reproducibility.html
[3]
2012 Aug 31
3
fitting lognormal censored data
Hi ,
I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2012 Sep 20
3
Problem with Newton_Raphson
Hello,
I have being trying to estimate the parameters of the?generalized?exponential distribution. The random number generation for the GE distribution is?x<-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated to estimate the parameters is right censored and the code is given below; The problem is that, the newton-Raphson approach isnt working and i do not know what
2013 Apr 15
2
regression with paired left-censored data
HI
I am trying to analyse data which is left-censored (i.e. has values below the detection limit). I have been using the NADA package of R to derive summary statistics and do some regression. I am now trying to carry out regression on paired data where both my X and Y have left-censored data within them.
I have tried various commands in R:
rega = cenreg(Cen(conc, cens_ind) ~ Gp_ident))?
with