search for: cbpp

Displaying 19 results from an estimated 19 matches for "cbpp".

Did you mean: bpp
2019 Feb 21
2
model.matrix.default() silently ignores bad contrasts.arg
...//github.com/wch/r-source/blob/trunk/src/library/stats/R/models.R#L578-L603 > > The following code shows the problem: a plain-vanilla model.matrix() > call with no contrasts argument, followed by two wrong contrasts > arguments, followed by a correct contrasts argument. > > data(cbpp, package="lme4") > mf1 <- model.matrix(~period, data=cbpp) > mf2 <- model.matrix(~period, contrasts.arg="contr.sum", data=cbpp) > all.equal(mf1,mf2) ## TRUE > mf3 <- model.matrix(~period, contrasts.arg=contr.sum, data=cbpp) > all.equal(mf1,mf3) ## TRUE &...
2019 Feb 22
2
model.matrix.default() silently ignores bad contrasts.arg
...>> > >> > The following code shows the problem: a plain-vanilla model.matrix() >> > call with no contrasts argument, followed by two wrong contrasts >> > arguments, followed by a correct contrasts argument. >> > >> > data(cbpp, package="lme4") >> > mf1 <- model.matrix(~period, data=cbpp) >> > mf2 <- model.matrix(~period, contrasts.arg="contr.sum", data=cbpp) >> > all.equal(mf1,mf2) ## TRUE >> > mf3 <- model.matrix(~period, contrasts.arg=cont...
2008 Aug 20
3
bug in lme4?
...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 = cbpp)) install.packages("aod") library(aod) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data = cbpp)) Taking into account that this package is used to perform simila...
2019 Feb 23
1
model.matrix.default() silently ignores bad contrasts.arg
...code shows the problem: a >> plain-vanilla model.matrix() >> > call with no contrasts >> argument, followed by two wrong contrasts >> > arguments, >> followed by a correct contrasts argument. >> >> > >> >> > data(cbpp, package="lme4") >> > mf1 <- >> model.matrix(~period, data=cbpp) >> > mf2 <- >> model.matrix(~period, contrasts.arg="contr.sum", >> data=cbpp) >> > all.equal(mf1,mf2) ## TRUE >> > mf3 <- >> mode...
2008 Jul 16
4
Likelihood ratio test between glm and glmer fits
Dear list, I am fitting a logistic multi-level regression model and need to test the difference between the ordinary logistic regression from a glm() fit and the mixed effects fit from glmer(), basically I want to do a likelihood ratio test between the two fits. The data are like this: My outcome is a (1,0) for health status, I have several (1,0) dummy variables RURAL, SMOKE, DRINK, EMPLOYED,
2019 Feb 21
0
model.matrix.default() silently ignores bad contrasts.arg
...relevant code is here: https://github.com/wch/r-source/blob/trunk/src/library/stats/R/models.R#L578-L603 The following code shows the problem: a plain-vanilla model.matrix() call with no contrasts argument, followed by two wrong contrasts arguments, followed by a correct contrasts argument. data(cbpp, package="lme4") mf1 <- model.matrix(~period, data=cbpp) mf2 <- model.matrix(~period, contrasts.arg="contr.sum", data=cbpp) all.equal(mf1,mf2) ## TRUE mf3 <- model.matrix(~period, contrasts.arg=contr.sum, data=cbpp) all.equal(mf1,mf3) ## TRUE mf4 <- model.matrix(~pe...
2019 Feb 21
0
model.matrix.default() silently ignores bad contrasts.arg
...ob/trunk/src/library/stats/R/models.R#L578-L603 > > > > The following code shows the problem: a plain-vanilla model.matrix() > > call with no contrasts argument, followed by two wrong contrasts > > arguments, followed by a correct contrasts argument. > > > > data(cbpp, package="lme4") > > mf1 <- model.matrix(~period, data=cbpp) > > mf2 <- model.matrix(~period, contrasts.arg="contr.sum", data=cbpp) > > all.equal(mf1,mf2) ## TRUE > > mf3 <- model.matrix(~period, contrasts.arg=contr.sum, data=cbpp) > > all....
2009 Nov 20
1
different results across versions for glmer/lmer with the quasi-poisson or quasi-binomial families: the lattest version might not be accurate...
...& Researcher (PhD) in Forest Ecology Cemagref Domaine des Barres F-45290 Nogent sur Vernisson France ############### 1- EXAMPLE FROM LMER HELP ############# here are the commands for the quasipoisson: library(lme4) gm1 <- lmer(incidence ~ period + (1 | herd), family = quasipoisson, data = cbpp) summary(gm1) ########## here is the result under R2.5.1 and Package lme4 version 0.99875-9: Generalized linear mixed model fit using Laplace Formula: incidence ~ period + (1 | herd) Data: cbpp Family: quasipoisson(log link) AIC BIC logLik deviance 112.2 122.3 -51.11 102.2 Random eff...
2019 Feb 22
0
model.matrix.default() silently ignores bad contrasts.arg
...>> > The following code shows the problem: a plain-vanilla model.matrix() > >> > call with no contrasts argument, followed by two wrong contrasts > >> > arguments, followed by a correct contrasts argument. > >> > > >> > data(cbpp, package="lme4") > >> > mf1 <- model.matrix(~period, data=cbpp) > >> > mf2 <- model.matrix(~period, contrasts.arg="contr.sum", data=cbpp) > >> > all.equal(mf1,mf2) ## TRUE > >> > mf3 <- model.matrix(~period...
2008 Nov 30
1
methods not found inside function?
...Ben Bolker ## before loading the lme4 package: > summary function (object, ...) UseMethod("summary") <environment: namespace:base> ## now load lme4: library(lme4) gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data = cbpp) ## examine "summary": > summary standardGeneric for "summary" defined from package "base" function (object, ...) standardGeneric("summary") <environment: 0xa2aa760> Methods may be defined for arguments: object Use showMethods("summary")...
2011 Mar 26
1
another import puzzle
...or variations (e.g. import()ing all of lme4, changing the order of the directive, ...). Help ... ? sincerely Ben Bolker ===== test.R ===== library(coefsumtest) library(lme4) gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data = cbpp) coef(summary(gm1)) ## works f <- function(g) { coef(summary(g)) } f(gm1) ## works coeftab.default(gm1) ##
2008 Sep 08
4
mixed model MANCOVA
Hello, I need to perform a mixed-model (with nesting) MANCOVA, using Type III sums of squares. I know how to perform each of these types of tests individually, but I am not sure if performing a mixed-model MANCOVA is possible. Please let me know. Erika <>< <>< <>< <>< <>< <>< <>< Erika Crispo, PhD candidate
2008 Sep 21
1
glmer -- extracting standard errors and other statistics
Hello, I am using glmer() from lmer(lme4) to run generalized linear mixed models. However, I am having a problem extracting the standard errors for the fixed effects. I have used: summary(model)$coef fixed.effects(model) coef(model) to get out the parameter estimates, but do not seem able to extract the se's. Anybody have a solution? Thanks, John
2009 Mar 17
0
update on mcmcsamp for glmer
...to my question: Is there an update on developing mcmcsamp for glmer? I'm using R v. 2.7.2 (on our Unix server - will hopefully be updated soon) and 2.8.1 on my PC and get the message for both: gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),family = binomial, data = cbpp) temp<-mcmcsamp(gm1, 1000) Error in .local(object, n, verbose, ...) : Update not yet written Here is the session info if that's helpful: PC: > sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC...
2011 Dec 04
1
Logistic Regression with genetic component
Greetings, I have a question that I'd like to get input on. I have a classic toxicology study where I artificially fertilized and exposed embryos to a chemical and counted defects. In addition, I kept track of male-female pairs that I used to artificially fertilize and generate embryos with. I need to use logistic regression to model the response, but also check that the genetics of the
2009 Oct 05
1
interpreting glmer results
Hi all, I am trying to run a glm with mixed effects. My response variable is number of seedlings emerging; my fixed effects are the tree species and distance from the tree (in two classes - near and far).; my random effect is the individual tree itself (here called Plot). The command I've used is: mod <- glmer(number ~ Species + distance + offset(area) + (1|Plot), family = poisson)
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,
2006 Nov 16
4
lme4 package: Fitted values and residuals
Dear all, I have three concerns: 1) I am running models with the lme4 package. I cannot find a way to pull out a vector of the fitted values and the residuals. Does anybody know how to do it? 2) How can I nest a random effect variable into a "two-level" fixed effect variable? 3) Suppose I have the following model: y = a + b|c + d + error, where 'a' is a fixed effect, 'c'
2008 Sep 22
1
R-help Digest, Vol 67, Issue 23
...e parameter estimates, but do not seem able to extract the > se's. > > Anybody have a solution? > You need to extract the variance-covariance matrix: library(lme4) gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data = cbpp)) sqrt(diag(vcov(gm1))) HTH, Bernd ------------------------------ Message: 35 Date: Sun, 21 Sep 2008 18:01:57 -0700 (PDT) From: Ted Byers <r.ted.byers@gmail.com> Subject: [R] Why isn't R recognising integers as numbers? To: r-help@r-project.org Message-ID: <19600308.post@talk....