similar to: monte carlo simulations/lmer

Displaying 20 results from an estimated 500 matches similar to: "monte carlo simulations/lmer"

2006 Mar 16
1
lme4/Matrix: Call to .Call("mer_update_y"...) and LMEoptimize gives unexpected side effect...
Dear all I want to compute Monte Carlo p-values in lmer-models based on sampled data sets. To speed up calculations, I've tried to use internal functions from the Matrix package (as suggested ealier on the list by Doug Bates). So I did: fm2 <- lmer(resistance ~ ET + position + (1|Grp), Semiconductor,method='ML') simdata<-simulate(fm2,nsim=1) ynew <- simdata[,1] mer
2005 Jun 13
1
Warning messages in lmer function (package lme4)
Hi: I'm using function lmer from package lme4, and I get this message: " There were 12 warnings (use warnings() to see them)" So I checked them: Warnings 1 to 11 said: 1: optim returned message ERROR: ABNORMAL_TERMINATION_IN_LNSRCH in: "LMEoptimize<-"(`*tmp*`, value = structure(list(maxIter = 50, ... and Warning 12 said: 12: IRLS iterations for glmm did
2005 Dec 29
1
'last.warning' problem at startup; package Matrix (PR#8453)
On starting an R session, I get the messages: Fatal errir: unable to restore save data in .RData Error in fun(...): couldn't find function "assignInNamespace" Error: .onLoad failed in 'loadNamespace' for 'Matrix' The only object in my .RData is last.warning, thus: > last.warning $"optim or nlminb returned message false convergence (8)"
2011 Aug 14
2
Scaling problem in optim()
I am using the function optim and I get the error message ABNORMAL_TERMINATION_IN_LNSRCH. Reason for this could be a scaling problem. Thus, I used parscale in order to scale the parameters. But I still have the error message. For example, with parscale=c(rep(1,n), 0.01,1,0.01): return(optim(c(mu1,b,k,phi), neg2loglikelihood, method = "L-BFGS-B",
2009 Oct 29
1
singular variance-covariance warning in lmer
Dear R Users, I was hoping for some help with a recurrent error message in lmer. I am trying to model the effect of temperature on metabolic rate in animals (response = int.length) at different temperatures (mean.sst), with repeated measurements on the same individuals (random effect = female). Ideally I would make a random slope and intercept model where the rate can change differently with
2010 Jan 12
3
optim: abnormal termination in lnsrch (resend)
[sorry, forgot some details...] I'm using optim(param, fun, method='L-BFGS-B', lower=lo, upper=up) to minimize a certain function. Often the minimization ends with the message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH What is optim() trying to say? What have I to change in my function to make the minimization succeed? Do you think using BBoptim() instead of optim() changes anything?
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 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf # see PP5-6 factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005, control = NULL, ...) { FAfn <- function(Psi, S, q) { Sstar <- S - diag(Psi) E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE) e <- E$values[-(1:q)] e <-
2004 Sep 28
3
slow loops in Monte Carlo Simulations
Hi there, I am running Monte Carlo Simulations in R using ordinary "while (condition)" loops. Since the number of iterations is something like 100.000 and within each iteration a given subsample is extended sequentially it takes hours to run the simulation. Does anyone know if there is either a way to avoid using loops in Monte Carlo Simulations or how to include possible faster
2007 Feb 23
1
optim(method="L-BFGS-B") abnormal termination
Hi, my call of optim() with the L-BFGS-B method ended with the following error message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH Further tracing shows: Line search cannot locate an adequate point after 20 function and gradient evaluations final value 0.086627 stopped after 7 iterations Could someone pls tell me whether it is possible to increase the limit of 20 evaluations? Is it even worth
2005 Aug 18
1
Error messages using LMER
Dear All, After playing with lmer for couple of days, I have to say that I am amazed! I've been using quite some multilevel/mixed modeling packages, lme4 is a strong candidate for the overall winner, especially for multilevel generzlized linear models. Now go back to my two-level poisson model with cross-classified model. I've been testing various different model specificatios for the
2006 May 26
2
lme, best model without convergence
Dear R-help list readers, I am fitting mixed models with the lme function of the nlme package. If I get convergence depends on how the method (ML/REM) and which (and how much) parameters will depend randomly on the cluster-variable. How get the bist fit without convergence? I set the parameters msVerbose and returnObject to TRUE: lmeControl(maxIter=50000, msMaxIter=200, tolerance=1e-4,
2010 Nov 23
2
Question about list function
Dear List I'm a newbie R user. I'm utilizing the list function in order to make a var like this: clusters<-list(a=var1,b=var2....) My problem is that the total numer of variables that I need to include in my list is up to 200. I've the text string with the complete list of my variables but is too long to cut and paste in my bash shell. So is there a way too import the list from a
2006 Jun 28
3
lme convergence
Dear R-Users, Is it possible to get the covariance matrix from an lme model that did not converge ? I am doing a simulation which entails fitting linear mixed models, using a "for loop". Within each loop, i generate a new data set and analyze it using a mixed model. The loop stops When the "lme function" does not converge for a simulated dataset. I want to
2003 Sep 16
2
gnls( ) question
Last week (Wed 9/10/2003, "regression questions") I posted a question regarding the use of gnls( ) and its dissimilarity to the syntax that nls( ) will accept. No one replied, so I partly answered my own question by constructing indicator variables for use in gnls( ). The code I used to construct the indicators is at the end of this email. I do have a nagging, unanswered
2006 Feb 15
1
no convergence using lme
Hi. I was wondering if anyone might have some suggestions about how I can overcome a problem of "iteration limit reached without convergence" when fitting a mixed effects model. In this study: Outcome is a measure of heart action Age is continuous (in weeks) Gender is Male or Female (0 or 1) Genotype is Wild type or knockout (0 or 1) Animal is the Animal ID as a factor
2009 Jan 08
2
VaR-Monte carlo Simulation, Historic simulation, Variance-Covariance Simulation
Dear R helpers Suppose I have a portfolio of securities with exposure to Equity, Bonds and Forex (say $ 1000000 each). Is there any fucntion in R that will help me calculate Value at Risk (VaR) using Monte carlo Simulation , Historic simulation and Variance - Covariance Simulation. With regards Maithili
2009 Mar 03
0
Monte carlo simulation in fGARCH
I use fGarch package to estimate AR(1)-ARCH(1) process for a vector of returns. Then, using the estimated parameters I want to simulate 10 000 sample paths where each path has the same length as the vector of returns. So the first line of the code is: spec=garchSpec(model=list(ar= 0.440270860, omega=0.000374365,alpha=0.475446583 , mu=0, beta=0))---- The only way I can think of generating 10 000
2005 Oct 12
0
monte carlo simulation
Dear R user: I wonder if it is possible to run monte carlo simulation with dse2 package(MonteCarloSimulations function) using ordinary differential equation. How do I define the model? Or if there are any functions which can run monte carlo simulation using ordinary differential equation. Please give me some comments. Thanks in advance!!
2009 Nov 10
1
Monte Carlo Simulation in R...
Hi, Dear R users, I'm wondering if I can do Monte Carlo Simulation in R. My problem is like this: I know variable X follows Gamma distribution with shape parameter 0.067 and scale parameter 0.008. The sum of the X is 2000. I need R help me to simulate a vector of X that satisfies both the probability distribution and the sum. Anyone has a clue to this? Much appreciated. Regards Garry