Displaying 20 results from an estimated 20000 matches similar to: "model comparison + use of offset in glmmPQL"
2005 Oct 19
1
anova with models from glmmPQL
Hi !
I try to compare some models obtained from glmmPQL.
model1 <-
glmmPQL(y~red*yellow+I(red^2)+I(yellow^2)+densite8+I(densite8^2)+freq8_4
+I(freq8_4^2), random=~1|num, binomial);
model2 <-
glmmPQL(y~red*yellow+I(red^2)+I(yellow^2)+densite8+I(densite8^2)+freq8_4
, random=~1|num, binomial);
anova(model1, model2)
here is the answer :
Erreur dans anova.lme(model1, model2) : Objects must
2008 Feb 20
1
p-value for fixed effect in generalized linear mixed model
Dear R-users,
I am currently trying to switch from SAS to R, and am not very familiar with R yet, so forgive me if this question is irrelevant.
If I try to find the significance of the fixed factor "spikes" in a generalized linear mixed model, with "site" nested within "zone" as a random factor, I compare following two models with the anova function:
2006 Mar 24
1
predict.glmmPQL Problem
Dear all,
for a cross-validation I have to use predict.glmmPQL() , where the
formula of
the corresponding glmmPQL call is not given explicitly, but constructed
using as.formula.
However, this does not work as expected:
x1<-rnorm(100); x2<-rbinom(100,3,0.5); y<-rpois(100,2)
mydata<-data.frame(x1,x2,y)
library(MASS)
# works as expected
model1<-glmmPQL(y~x1, ~1 | factor(x2),
2005 Oct 10
1
interpretation output glmmPQL
Hi !
We study the effect of several variables on fruit set for 44 individuals
(plants). For each individual, we have the number of fruits, the number
of flowers and a value for each variable.
Here is our first model in R :
y <- cbind(indnbfruits,indnbflowers);
model1
<-glm(y~red*yellow+I(red^2)+I(yellow^2)+densite8+I(densite8^2)+freq8_4+I
(freq8_4^2), quasibinomial);
- We have
2010 Sep 10
0
covariance matrix structure for random effect in glmmPQL
Dear all,
I'm using R function "glmmPQL" in "MASS" package for generalized linear mixed model considering the temporal correlations in random effect. There are 1825 observations in my data, in which the random effect is called "Date", and there are five levels in "Date", each repeats 365 times.
When I tried
2010 Mar 25
1
Selecting Best Model in an anova.
Hello,
I have a simple theorical question about regresion...
Let's suppose I have this:
Model 1:
Y = B0 + B1*X1 + B2*X2 + B3*X3
and
Model 2:
Y = B0 + B2*X2 + B3*X3
I.E.
Model1 = lm(Y~X1+X2+X3)
Model2 = lm(Y~X2+X3)
The Ajusted R-Square for Model1 is 0.9 and the Ajusted R-Square for Model2 is 0.99, among many other significant improvements.
And I want to do the anova test to choose the best
2008 Jun 03
1
Model simplification using anova()
Hello all,
I've become confused by the output produced by a call to
anova(model1,model2). First a brief background. My model used to predict
final tree height is summarised here:
Df Sum Sq Mean Sq F value Pr(>F)
Treatment 2 748.35 374.17 21.3096 7.123e-06 ***
HeightInitial 1 0.31 0.31 0.0178 0.89519
2007 Feb 28
0
no df to test the effect of an interaccion on a lmer mixed model
Dear useRs,
I am fitting a mixed model using the function lmer from the package lme4,
but I have some problems when I try to test the effect of my factors of
interest.
First let me explain the structure of the model:
I'm measuring animal movements. Explicitly, I am interested in displacement
(straight-line distance from an initial point). Displacements are measured
longitudinally, with one
2017 Aug 15
1
ANOVA test to decide whether to use multiple linear regression or linear mixed effects model
R-help:
I am trying to decide between using a multiple linear regression or a linear mixed effects model for my data:
model1 <- lm (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, data= data)
model2 <- lme (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, random = ~1 | site, data= data)
anova (model1, model2)
but I keep getting the
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users,
i'm using a custom function to fit ancova models to a dataset. The data are
divided into 12 groups, with one dependent variable and one covariate. When
plotting the data, i'd like to add separate regression lines for each group
(so, 12 lines, each with their respective individual slopes). My 'model1'
uses the group*covariate interaction term, and so the coefficients
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova
function.
A GLM is performed for example:
model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial",
na.action = na.exclude)
A second nested model could be:
model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action =
na.exclude)
To compare these two GLM
2012 Mar 20
2
anova.lm F test confusion
I am using anova.lm to compare 3 linear models. Model 1 has 1 variable,
model 2 has 2 variables and model 3 has 3 variables. All models are fitted
to the same data set.
anova.lm(model1,model2) gives me:
Res.Df RSS Df Sum of Sq F Pr(>F)
1 135 245.38
2 134 184.36 1 61.022 44.354 6.467e-10 ***
anova.lm(model1,model2,model3) gives
2001 Sep 08
1
t.test (PR#1086)
Full_Name: Menelaos Stavrinides
Version: 1.3. 1
OS: Windows 98
Submission from: (NULL) (193.129.76.90)
When model simplification is used in glm (binomial errors) and anova is used two
compare two competitive models one can use either an "F" or a "Chi" test.
R always performs an F test (Although when test="Chi" the test is labeled as
Chi, there isn't any
2013 Oct 14
1
Extracting elements of model output
I am having difficulty extracting specific results from the model
object. The following code shows where I am stuck.
I want to run resamplings of a data set. For each I want to extract a
particular F for the contrasts. If I run a very simple model
(e.g. model1 <- aov(time~group) ) I can get the relevant coefficients,
for example, by using "model1$coefficients". That's fine.
2011 Apr 14
1
mixed model random interaction term log likelihood ratio test
Hello,
I am using the following model
model1=lmer(PairFrequency~MatingPair+(1|DrugPair)+(1|DrugPair:MatingPair),
data=MateChoice, REML=F)
1. After reading around through the R help, I have learned that the above
code is the right way to analyze a mixed model with the MatingPair as the
fixed effect, DrugPair as the random effect and the interaction between
these two as the random effect as well.
2009 Mar 10
1
help structuring mixed model using lmer()
Hi all,
This is partly a statistical question as well as a question about R, but I am stumped!
I have count data from various sites across years. (Not all of the sites in the study appear in all years). Each site has its own habitat score "habitat" that remains constant across all years.
I want to know if counts declined faster on sites with high "habitat" scores.
I can
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers,
Spencer Graves and Manual Morales proposed the following methods to
simulate p-values in lme4:
************preliminary************
require(lme4)
require(MASS)
summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data =
epil), cor = FALSE)
epil2 <- epil[epil$period == 1, ]
epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2011 Mar 01
1
Pairwise T-Tests and Dunnett's Test (possibly using multcomp)
Hello Everyone,
I've been learning to use R in my spare time over the past several months. I've read about 7-8 books on the subject. Lately I've been testing what I've learned by trying to replicate the analyses from some of my SAS books. This helps me make sure I know how to use R properly and also helps me to understand how the two programs are similar and different.
Below is
2009 Jan 29
1
Inconsistency in F values from dropterm and anova
Hi,
I'm working on fitting a glm model to my data using Gamma error structure
and reciprocal link. I've been using dropterm (MASS) in the model
simplification process, but the F values from analysis of deviance tables
reported by dropterm and anova functions are different - sometimes
significantly so. However, the reported residual deviances, degrees of
freedom, etc. are not different.
2010 Nov 27
1
d.f. in F test of nested glm models
Dear all,
I am fitting a glm to count data using poison errors with the log link. My
goal is to test for the significance of model terms by calling the anova
function on two nested models following the recommendation in Michael
Crawley's guide to Statistical Computing.
Without going into too much detail, essentially, I have a small
overdispersion problem (errors do not fit the poisson