similar to: R vs Stata on generalized linear mixed models: glmer and xtmelogit

Displaying 20 results from an estimated 1000 matches similar to: "R vs Stata on generalized linear mixed models: glmer and xtmelogit"

2008 Aug 20
3
bug in lme4?
Dear all, I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore: library(lme4) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data
2010 Jan 04
1
glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)
Dear R users, I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions. My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random effects for linear splines components (see Durban et al, Stat Med 2005, or " Semiparametric regression" by Ruppert et al,
2007 Dec 20
3
mle
Dear all, I'm trying to estimate the parameters of a special case of a poisson model, where the specified equation has an integral and several fixed parameters. I think that the MLE command in STATS4 package could be a good choice, but it's a little complicated. I've got some problems with the offset and I don't understand some of the functions. Do you know where can I find some
2009 Feb 02
2
logLik for poisson models
Dear all, I have a very basic question: how does the logLik function work for poisson models? Example: I simulate 20 observations from a Poisson distribution with mean 800. y <- rpois(20,800) model <- glm(y ~ 1, family=poisson()) logLik(model) I would like to know what's the exact formula the function logLik uses. I looked at ?extractAIC but I cannot sort it out. Can you please
2008 May 28
1
postscript
Hello, I'm trying to save a graph as a .ps file to include it in a LaTex presentation, but R replies: Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font database 2: font family not found in PostScript font database If I load the package grDevices and type "postscript()" then I can save it, but it creates also a text file saying:
2009 Nov 13
1
multivariate meta-analysis with the metafor package
Dear Wolfgang Viechtbauer and R users, I have few questions regarding the development of the package 'metafor. As you suggested , I post to the R-help mailing list. I read you're planning an extension of this method to the multivariate case. I think it would be a useful tool. I'm currently performing some analyses with R on multiple outcomes, using the Stata command mvmeta to get
2008 Jun 08
1
exponential distribution
Dear all, I've tried to solve the Es. 12, cap 4 of "Introduction to GLM" by Annette Dobson. It's about the relationship between survival time of leukemia patients and blood cell count. I tried to fit a model with exponential distribution, first by glm (family gamma and then dispersion parameter fixed to 1) and then with survreg. They gave me the same point estimates but the
2009 Nov 05
2
new help pages in R 2.10.0
Dear R-users, I've just installed the last version of R (2.10.0) in Windows and found a completely new version of the help pages. Basically, they now appear as a simple (even if slightly embellished) text file. I tried to install it with a customized startup and realized that the old CHM files (the default for Windows up to 2.9.2) are not included anymore as a possible choice. I don't
2009 Jul 06
2
problem with internal functions in Windows
Dear R users, I included 2 internal functions in the package 'dlnm', called 'mkbasis' and 'mklagbasis'. Despite they are not meant to be called by the users, I included them in the namespace in order to make them available, keeping the process more transparent and giving the opportunity to change or improve them. I included an help page 'dlnm-internal.Rd' to
2009 Jul 06
2
problem with internal functions in Windows
Dear R users, I included 2 internal functions in the package 'dlnm', called 'mkbasis' and 'mklagbasis'. Despite they are not meant to be called by the users, I included them in the namespace in order to make them available, keeping the process more transparent and giving the opportunity to change or improve them. I included an help page 'dlnm-internal.Rd' to
2009 Jun 01
1
problem with package creation under Windows and R 2.9.0
Dear R users, I found a small problem with the package creation procedure in R 2.9.0 under Windows. Basically, I input in the command prompt; Rcmd BUILD --binary --use-zip namepackage The procedure works, but the titles in the help pages of the created package lose the usual colours and font. Conversely, the result is perfect using R 2.8.1 (changing the path) and the same version of Rtools
2008 Oct 31
1
AIC for quasipoisson link
Dear fellows, I'm trying to extract the AIC statistic from a GLM model with quasipoisson link. The formula I'm referring to is AIC = -2(maximum loglik) + 2df * phi with phi the overdispersion parameter, as reported in: Peng et al., Model choice in time series studies os air pollution and mortality. J R Stat Soc A, 2006; 162: pag 190. Unfortunately, the function logLik
2009 Feb 09
1
gee with auto-regressive correlation structure (AR-M)
Dear all, I need to fit a gee model with an auto-regressive correlation structure and I faced some problems. I attach a simple example: ####################################################### library(gee) library(geepack) # I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROUPS set.seed(1) y <- rpois(500,50) x <- rnorm(500) id <- rep(1:50,each=10) # EXAMPLES FOR
2009 Apr 19
1
creating a package in R
Dear R users, I created some functions I want to convert in a package under Windows (Vista or XP). I carefully read both "Writing R extensions" by the R Development Core Team and "Creating R packages: a tutorial" by Friedrich Leisch. I've also installed Rtools as suggested. These tutorials are very useful, but I'm struggling with the last step of the installation
2013 May 18
1
glmer.nb: function not in downloaded lme4 package?
Dear R Help, I would like to use the glmer.nb function for mixed modelling using negative binomial distribution please. On the CRAN website apparently this function is called from the lme4 package (version 0.99999911-1). I have downloaded the latest version of the lme4 package (version 0.999999-2) and have recently reinstalled the latest version of 64-bit R (version 3.0.1) but after
2009 Jan 16
2
glmer documentation
Hello, I am fitting a gmler using poisson, and I was looking for a documentation to interpret correctly the output. I'm quite a beginner with these kind of models. I couldn't find something in the lme4 package manual. and on the internet neither... Thank you, Raphaelle -- View this message in context: http://www.nabble.com/glmer-documentation-tp21506036p21506036.html Sent from the R
2010 Feb 09
2
step and glmer
Is it possible to use the step() function with a glmer() as an object? I obtain the following error message when I try to do it: "Error in x$terms : $ operator not defined for this S4 class". I perform the glmer correctly but I can't do the step. Thank you so much. -- View this message in context: http://n4.nabble.com/step-and-glmer-tp1474390p1474390.html Sent from the R help
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to longitudinal data with a gamma distribution with unknown shape and scale parameters. I've tried the 'lmer4' package's glmer() function, which fits the Poisson regression using: library('lme4') fit5<- glmer(seizures ~ time + progabide + timeXprog + offset(lnPeriod) + (1|id), data=pdata,
2013 Nov 07
2
Error running MuMIn dredge function using glmer models
Dear list, I am trying to use MuMIn to compare all possible mixed models using the dredge function on binomial data but I am getting an error message that I cannot decode. This error only occurs when I use glmer. When I use an lmer analysis on a different response variable every works great. Example using a simplified glmer model global model: mod<- glmer(cbind(st$X2.REP.LIVE,
2008 Aug 07
1
incorrect usage of glmer crashes R (PR#12375)
Full_Name: susscorfa Version: 2.7.1 OS: ubuntu Submission from: (NULL) (129.125.177.31) Incorrect implementation of the grouping variable in the function glmer crashes R a small example: require(lme4); a<-data.frame(b=rpois(1000,10), c=gl(20,50), d=rnorm(1000,3), e=rnorm(1000,5), f=rnorm(1000,2)+5); glmer(b~d+f|c+(e), family=poisson, data=a) It crashes R on debian linux (2 independant