search for: lmm

Displaying 20 results from an estimated 46 matches for "lmm".

Did you mean: lm
2007 Jun 04
3
Extracting lists in the dataframe $ format
...own below as are their df$out references. Reading the documentation for plot and lm hasn't helped yet. Thanks in advance - Stan. > df=data.frame(out=1:4*3,pred1=1:4,pred2=1:4*2) > regression=function(tble,a,b) + { + plot.new() + plot(tble[a]~tble[b]) + lmm=lm(tble[a]~tble[b]) + abline(lmm) + anova(lmm) + } > df[1] out 1 3 2 6 3 9 4 12 > df out pred1 pred2 1 3 1 2 2 6 2 4 3 9 3 6 4 12 4 8 > regression(df,1,3) Error in model.frame(formula, rownames, variables, varnames, ex...
2009 Aug 17
0
Model comparison with missing values
...enable the comparison, and to avoid subsetting the data (by removing all the NA values from all the variables before the analysis even begins) so that the reduced model can then make use of all the available data for the predictions? The error example: (say 'pairexp' has 23 missing values) lmm.1<-lmer(survival~Male+FemAge+pairexp+(1|ID),REML=FALSE,na.action=na.omit) summary(lmm.1) lmm.2<-update(lmm.1,.~.-pairexp) summary(lmm.2) anova(lmm.1,lmm.2) lmm.2: survival ~ Male + FemAge + (1 | ID) lmm.1: survival ~ Male + FemAge + pairexp + (1 | ID) Df AIC BIC logLik Ch...
2008 Oct 30
0
lme4/anova, error message: "Calculated PWRSS for a LMM is negative"
...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 reported but only when using "weights". As I did not use "weights" in my model, I was wondering what could cause this error message! Thanks in advance for any advice, Sebastien. R-Console...
2017 May 09
2
registering Fortran routines in R packages
...B(SOBOL), 11}, {NULL, NULL, 0} }; But the problem remains the same. Is there a way to have header file for Fortran codes? how to declare routines defined in my Fortran file src/LowDiscrepancy.f? Any help appreciated Regards, Christophe --------------------------------------- Christophe Dutang LMM, UdM, Le Mans, France web: http://dutangc.free.fr
2012 Nov 06
2
Column names containing ` in R
Hi, My data has column names which has ` character. For example , *> names(dataframe) [1] "`region" "farmsize`" "farmincome" "maincrop" "claimvalue"* If i use these objects in my function, the following error is thrown. *lmm<-lm(``region`~farmincome) Error: attempt to use zero-length variable name* Is there a way, say an escape sequence or something similar in which we can give these objects with the colnames to R functions? Thanks in advance. Regards, Raji -- View this message in context: http://r.789695.n4....
2015 Sep 17
1
names treatment in optim()
...) Running under: OS X 10.10.5 (Yosemite) locale: [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Kind regards, Christophe --------------------------------------- Christophe Dutang LMM, UdM, Le Mans, France web: http://dutangc.free.fr <http://dutangc.free.fr/> [[alternative HTML version deleted]]
2012 Nov 07
2
LMER vs PROC MIXED estimates
...PUT SOLUTIONF= FIXED_EFFECT; RUN; the equivalent code that I was writting in R is as follows: testdata <- read.csv("adstest.csv",header=TRUE,sep=",") attach(testdata) library(lme4) options(contrasts = c(factor = "contr.SAS",ordered = "contr.poly")) lmm.2=lmer(y~X1+X2+X3 + (X2|Geography),REML=TRUE,data=bigads) I am not sure if I have got the R script/options correct...but I seem to be getting different estimates from the same dataset.... any help on this would be highly appreciated!!!! -- View this message in context: http://r.789695.n4.nab...
2009 Apr 15
2
issue with L-BFGS-B in optim (optim just hangs)
Dear R-Help List, I am using optim, with method=L-BFGS-B, to maximize a likelihood inside a large simulation exercise. This runs fine for most simulated data sets, but for some reason, about 1 out of 100 times, optim will just hang. Using a dumb approach to the problem (i.e. printing the parameter values each time the function being maximized is evaluated), I tracked down when this happens,
2010 Nov 04
3
ANOVA table and lmer
...om of fixed. Or am I misinterpreting the ANOVA table from the lmer fit? I noticed that other people have asked similar questions in the past, but I haven't seen a satisfactory explanation. Jim Booth. > B=factor(block) > V=factor(variety) > N=factor(nitrogen) > Y=yield > lmm.split=lmer(Y~V+N+V:N+(1|B)+(1|B:V)+(1|B:N)) > anova(lmm.split) Analysis of Variance Table Df Sum Sq Mean Sq F value V 2 526.1 263.0 1.4853 N 3 20020.5 6673.5 37.6856 V:N 6 321.8 53.6 0.3028 > lm.split=lm(Y~B*V+B*N+V*N) > anova(lm.split) Analysis of Variance Tabl...
2005 Mar 28
1
mixed model question
...s not allow for different Vi (variance covariance matrix of the e_i vector) matrices for each cluster. Is there an easy way to fit this model in R or should I bite the bullet and code the likelihood functions ? Also, is there an easy way to fit a Bayesian version of this ? Again there is mgibbs.lmm but it also does not allow easily for a different Vi matrix for each cluster/. Thanks, Benn --------------------------------- [[alternative HTML version deleted]]
2012 May 06
2
Interaction plot between 2 continuous variables
I have two very strong fixed effects in a LMM (both continuous variables). model <- lmer( y ~ time + x1+x2 + (time|subject)) Once I fit an interaction of these variables, both main effects disappear and I get a strong interaction effect. model <- lmer( y ~ time + x1*x2 + (time|subject)) I would like to plot this effect now, but have no...
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at optim.c codes at R site...
2008 Sep 24
0
weights option in lmer
...R version 2.7.2 (2008-08-25) and lmer version in lme4_0.999375-26, which I think it is the latest version! I am getting and error message when I add the option "weights" in the lmer function. This is the error message I get "Error en mer_finalize(ans) : Calculated PWRSS for a LMM is negative". I have been reading in the last few weeks all the forum questions and answers about this issue. Certainly this has been discussed MANY times before especially with older versions of lmer (much less in the newer versions). I have been trying different things following peoples...
2018 Mar 22
1
adjusted values
...441 2.069 0.101 (Adjusted p values reported -- single-step method) The p-values of the coefficient estimates and those of the post-hoc tests differ because the latter are adjusted with Bonferroni correction. I wonder whether there is any form of correction in the coefficient estimated of the LMM, and which p-values are more appropriate to use. Thanks Cristiano [[alternative HTML version deleted]]
2006 Oct 17
2
Mixed effect model in R
Hi, I am analysing an experiment that has one fixed (6 conditions) and two random factors (11 subjects, 24 images in the conditions). I read somewhere else that you can also see such a design as a nested experiment with the hierarchy: subjects -> condition -> image. For some analysis I have one respond variable and for others I have more. The response variables are non-normally distributed.
2015 Jan 23
1
Programming Tools CTV
Dear Willem, Personally, I use the R-forge project for the distribution CTV : https://r-forge.r-project.org/projects/ctv/ It?s an alternative option to github. Regards, Christophe --------------------------------------- Christophe Dutang LMM, UdM, Le Mans, France web: http://dutangc.free.fr Le 23 janv. 2015 ? 12:49, Luca Braglia <lbraglia at gmail.com> a ?crit : > Hi Willem > > thanks for volounteering. > > To the best of my knowledge (regarding the machinery side), if you're > planning to use github (an...
2008 Nov 26
1
Problem with aovlmer.fnc in languageR
...nsquare.lmer, withMCMC = TRUE) aovlmer.fnc(latinsquare.lmer, mcmc = x$mcmc, which = c("SOAmedium", "SOAshort")) I get the following error message (German locale): Fehler in anova(object) : Calculated PWRSS for a LMM is negative Invoking traceback yields the following result: > traceback() 4: .Call(mer_update_projection, object) 3: anova(object) 2: anova(object) 1: aovlmer.fnc(latinsquare.lmer, mcmc = x$mcmc, which = c("SOAmedium", "SOAshort")) B...
2009 Aug 26
1
lme: how to nest a random factor in a fixed factor?
Dear all, I have an experimental setup in which a random variable is nested within a fixed variable; however I have troubles specifying the correct LMM with lme. I have searched the lists but haven't been able to find an example like my setup, which I unfortunately need to get this stuff right. Pinheiro & Bates is great but I still can't figure out how to do it. My experimental setup was as follows: 100 measurements per treatment...
2017 May 10
3
registering Fortran routines in R packages
...ou mean 'halton2'? {"halton", (DL_FUNC) &F77_SUB(halton), 7}, My current solution is to comment FortEntries array and use R_useDynamicSymbols(dll, TRUE) for a dynamic search of Fortran routines. Regards, Christophe --------------------------------------- Christophe Dutang LMM, UdM, Le Mans, France web: http://dutangc.free.fr <http://dutangc.free.fr/> > Le 9 mai 2017 ? 14:32, Berend Hasselman <bhh at xs4all.nl> a ?crit : > > >> On 9 May 2017, at 13:44, Christophe Dutang <dutangc at gmail.com> wrote: >> >> Dear list, >&gt...
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
.../ > Mixed-Effects Models in > > S and S-PLUS / (Springer, 2000), fits linear and nonlinear > > mixed-effects models, commonly used in the social sciences for > > hierarchical and longitudinal data. Generalized linear > mixed-effects > > models may be fit by the glmmPQL function in the MASS > package, and by > > the lmer function in the Matrix > > <http://cran.r-project.org/src/contrib/Descriptions/Matrix.html> > > package (related to the lme4 > > <http://cran.r-project.org/src/contrib/Descriptions/lme4.html> > &g...