similar to: help with glmmPQL

Displaying 20 results from an estimated 1000 matches similar to: "help with glmmPQL"

2004 Nov 25
1
Error in anova(): objects must inherit from classes
Hello: Let me rephrase my question to attract interest in the problem I'm having. When I appply anova() to two equations estimated using glmmPQL, I get a complaint, > anova(fm1, fm2) Error in anova.lme(fm1, fm2) : Objects must inherit from classes "gls", "gnls" "lm","lmList", "lme","nlme","nlsList", or "nls"
2004 Nov 24
0
problem with anova and glmmPQL
Hello: I am getting an error message when appplying anova() to two equations estimated using glmmPQL. I did look through the archives but didn't finding anything relevant to my problem. The R-code and results follow. Hope someone can help. ANDREW ____________________________ > fm1 <- glmmPQL(choice ~ day + stereotypy, + random = ~ 1 | bear, data = learning, family =
2004 Nov 25
0
MASS problem -- glmmPQL and anova
Hello: I am really stuck on this problem. Why do I get an error message with anova() when I compare these two equations? Hope someone can help. ANDREW ____________________________ > fm1 <- glmmPQL(choice ~ day + stereotypy, + random = ~ 1 | bear, data = learning, family = binomial) > fm2 <- glmmPQL(choice ~ day + envir + stereotypy, + random = ~ 1 |
2006 Oct 18
1
lmer- why do AIC, BIC, loglik change?
Hi all, I am having issues comparing models with lmer. As an example, when I run the code below the model summaries (AIC, BIC, loglik) differ between the summary() and anova() commands. Can anyone clear up what's wrong? Thank you! Darren Ward library(lme4) data(sleepstudy) fm1<-lmer(Reaction ~ Days + (1|Subject), sleepstudy) summary(fm1) fm2<-lmer(Reaction ~ Days +
2002 Dec 15
2
Interpretation of hypothesis tests for mixed models
My question concerns the logic behind hypothesis tests for fixed-effect terms in models fitted with lme. Suppose the levels of Subj indicate a grouping structure (k subjects) and Trt is a two-level factor (two treatments) for which there are several (n) responses y from each treatment and subject combination. If one suspects a subject by treatment interaction, either of the following models seem
2009 Sep 06
3
linear mixed model question
Hello, I wanted to fit a linear mixed model to a data that is similar in terms of design to the 'Machines' data in 'nlme' package except that each worker (with triplicates) only operates one machine. I created a subset of observations from 'Machines' data such that it looks the same as the data I wanted to fit the model with (see code below). I fitted a model in
2012 Mar 20
1
Remove quotes from a string to use in a variable call
Hi, I have a string that I want to use in a variable call. How can I remove the quotes and/or the string properties of the string to use it in a variable call? Here's an example: library(lme) fm2 <- lme(distance ~ age, data = Orthodont, random = ~ 1) summary(fm2) I want to update the above regression to include new predictors according to what is in a string: predictors <-
2012 Jan 17
1
MuMIn package, problem using model selection table from manually created list of models
The subject says it all really. Question 1. Here is some code created to illustrate my problem, can anyone spot where I'm going wrong? Question 2. The reason I'm following a manual specification of models relates to the fact that in reality I am using mgcv::gam, and I'm not aware that dredge is able to separate individual smooth terms out of say s(a,b). Hence an additional request,
2006 Mar 29
1
Lmer BLUPS: was(lmer multilevel)
Paul: I may have found the issue (which is similar to your conclusion). I checked using egsingle in the mlmRev package as these individuals are strictly nested in this case: library(mlmRev) library(nlme) fm1 <- lme(math ~ year, random=~1|schoolid/childid, egsingle) fm2 <- lmer(math ~ year +(1|schoolid:childid) + (1|schoolid), egsingle) Checking the summary of both models, the output is
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
2003 Jan 30
1
as.formula(string) and augPred in lme
Using formulas constructed from strings only partially works for me in lme: library(nlme) data(Orthodont) fm2<-lme(as.formula("distance~age"),data=Orthodont,random=~1|Subject) summary(fm2) # works augPred(fm2) # fails #Error in inherits(object, "formula") : #Argument "object" is missing, with no default I assume that my use of as.formula is wrong, but
2011 Feb 06
1
anova() interpretation and error message
Hi there, I have a data frame as listed below: > Ca.P.Biomass.A P Biomass 1 334.5567 0.2870000 2 737.5400 0.5713333 3 894.5300 0.6393333 4 782.3800 0.5836667 5 857.5900 0.6003333 6 829.2700 0.5883333 I have fit the data using logistic, Michaelis?Menten, and linear model, they all give significance. > fm1 <- nls(Biomass~SSlogis(P, phi1, phi2, phi3), data=Ca.P.Biomass.A)
2005 Nov 17
1
anova.gls from nlme on multiple arguments within a function fails
Dear All -- I am trying to use within a little table producing code an anova comparison of two gls fitted objects, contained in a list of such object, obtained using nlme function gls. The anova procedure fails to locate the second of the objects. The following code, borrowed from the help page of anova.gls, exemplifies: --------------- start example code --------------- library(nlme) ##
2005 Sep 25
2
summary nls output
Dear R user: I bulid a package, and in the package I use the function "nls" to solve some questions. If I have two sets of data, and I want to summary these two data's nls output, I write the command in the package source code like: { .......... summary(fm1) summary(fm2) } then i compiler the package and use "Install package(s) from local zip files" to install my
2002 Jul 16
2
scale parameter and parameter vac-cov matrix in GEE
Dear all, It looks like the parameters var-cov matrix returned by gee() is not adjusted for the scale parameter: > fm1 <- gee(nbtrp ~ strate * saison + offset(log(surf)), family = poisson, data = Eff2001, + id = loc, tol = 1e-10, corstr = "exchangeable") [1] "Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27" [1] "running glm to get initial
2009 Jun 25
2
Problems with subsets in NLME
I am trying to estimate models with subsets using the NLME package. However, I am getting an error in the case below (among others): > subset <- c(rep(TRUE, 107), FALSE) > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1, subset=subset) Error in xj[i] : invalid subscript type 'closure' > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1,
2004 Apr 22
1
lme correlation structure error
Hi there fellow R-users, I am trying to follow an example of modelling a serial correlation structure in the textbook "Mixed Effects Model in S and Splus". However, I am getting some very odd results. Here is what I am trying to run: library(nlme) data(Ovary) fm1<-lme(follicles~sin(2*pi*Time)+cos(2*pi*Time),data=Ovary,random=pdDiag(~s in(2*pi*Time))) ### The example is fine up
2012 Oct 03
1
Difficulties in trying to do a mixed effects model using the lmer function
Dear people of the help list I am drying to analyze my data using the 'lmer' function and I keep having problems. This is the model: > fm1<-lmer(dbh~spec+scheme+(1|Plot),data=d, REML=FALSE). I analyse tree size (dbh) of 3 different species (spec) and 3 planting schemes (scheme). I have 5 plots, which I hope to model as a random factor. (However, the subsequent output is based on
2010 Jan 13
1
Rollapply
Hi I would like to understand how to extend the function (FUN) I am using in rollapply below. ###################################### With the following simplified data, test1 yields parameters for a rolling regression data = data.frame(Xvar=c(70.67,70.54,69.87,69.51,70.69,72.66,72.65,73.36), Yvar =c(78.01,77.07,77.35,76.72,77.49,78.70,77.78,79.58)) data.z = zoo(d) test1 =
1999 Apr 04
2
deparsing lhs of formula in print.anova.lm (PR#157)
Full_Name: Douglas Bates Version: Version 0.64.0 Unstable (April 3, 1999) OS: Debian GNU/Linux 2.1 Submission from: (NULL) (128.105.5.97) R> fm2 <- lm( 1/Surv ~ Poison + Antidote + Poison:Antidote, data = BC ) R> anova( fm2 ) Analysis of Variance Table Response: / Response: 1 Response: Surv Df Sum Sq Mean Sq F value Pr(>F) Poison 2 34.9 17.4