Displaying 20 results from an estimated 500 matches similar to: "Using at.level() with a MCMCglmm zero-inflated poisson model"
2017 Aug 23
0
MCMCglmm issue
When I try to use the following code, I get the error message shown. This
is quite confusing to me, insofar as family is a recognized argument for
MCMCglmm. Can anyone spot an obvious glitch?
model1 <-MCMCglmm(fixed = NoRRVpos ~ Year, random = ~County,
family="zipoisson", data=Rabies_Project_Init)Error in MCMCglmm(fixed =
NoRRVpos ~ Year, random = ~County, family =
2006 Jan 18
4
negative predicted values in poisson glm
Dear R helpers,
running the following code of a glm model of the family poisson, gives
predicted values < 0. Why?
library(MASS)
library(stats)
library(mvtnorm)
library(pscl)
data(bioChemists)
poisson_glm <- glm(art ~ fem + mar + kid5 + phd + ment, data = bioChemists,
family = poisson)
predicted.values = predict(poisson_glm)
range(predicted.values)
Thank you in advance for any hints.
2011 Jun 01
1
How to write random effect in MCMCglmm
Hi All,
The data set that I have is a cluster data, and I want to run a HLM mixed
model with multi-level response. Here is my data set:
response:
- Level (num: 1, 2, 3, 4, 5 - 5 levels)
Covariates:
- Type (Factor: A, B, C - 3 levels)
- yr (num: 2006, 2007, ...)
- Male (num: 0=not Male, 1=Male - 2 levels)
- Ethnicity (Factor: A, B, H, ..., - 7 levels)
- ELL (num: 0, 1, - 2
2010 Nov 26
0
Question about random interactions in MCMCglmm
Hi,
I've been a bit confused by different wyas we specify random effects
in lmer and MCMCglmm i just want to clear something. When I want to
look for intersexual genetic correlations in the trait, is it
equivalent to treat this trait for opposite sexes as separate traits
and include the term idh(trait):animal - to treating this as a single
trait and fitting idh(sex):animal? Do these two ways
2012 Nov 06
1
Multinomial MCMCglmm
Thanks for your answers Stephen and Ben,
I hope I am posting on the correct list now.
I managed so far to run the multinomial model with random effect with the
following command:
MCMCglmm(fixed=cbind(Apsy,Mygl,Crle,Crru,Miag,empty) ~
habitat:trait,random=~idh(trait):mesh,family="multinomial12",
data=dataA,rcov=~trait:units)
(where multiple responses are different species,
Habitat
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
Dear all,
I'm using zeroinfl() from the pscl-package for zero inflated Poisson
regression. I would like to calculate (aproximate) prediction intervals
for the fitted values. The package itself does not provide them. Can
this be calculated analyticaly? Or do I have to use bootstrap?
What I tried until now is to use bootstrap to estimate these intervals.
Any comments on the code are welcome.
2011 Feb 14
1
MCMC glmm
Hi to all the people,
I'm working with abundance data of some species, but containing too zero
values, and the factors are the ones typical in a BACI experiment
(Before-and-After-Control-Impact). Thus, these are two fixed factors. As the
data does not holds the normality and homogeneity of variances assumptions
of clasiccal ANOVA, I'm trying to fit a zero-altered model using the MCMC
glmm
2011 Feb 17
0
Multi-response MCMCglmm (gaussian and zapoisson)
Dear MCMCglmm users,
I am currently struggling with the specification of a proper prior and model formula for a multi-response MCMCglmm with two of the three response variables being Gaussian and the third being za-poisson. The model includes several fixed effects and three nested random effects.
In general, I would prefer to fit a model with a fixed effect of trait and suppressed intercept for
2012 Feb 08
0
MCMCglmm
Dear Jarrod,
I have a data set where residual have a heavy-tailed distribution with
some extreme residual values and consequently the distribution deviates
from the Gaussian one.
Is it possible to include an skewed-normal density for the residual in
MCMCglmm package?
I have done the analysis of this data with both ASReml & MCMCglmm. The
results are similar and outcome from MCMCglmm
2012 Feb 13
1
MCMCglmm with cross-classified random effects
Dear R-users,
I would like to fit a glmm with cross-classified random effects with
the function MCMCglmm. Something along the lines:
model1<-MCMCglmm(response~pred1, random=~re1+re2, data=data)
where re1 and re2 should be crossed random effects. I was wondering
whether you could tell me specifying cross-classified random effects
in MCMCglmm requires a particular syntax? Are there any
2012 May 02
0
MCMCglmm priors including phylogeny
Hi all,
I'm hoping I might be able to get some help with some issues specifying priors for MCMCglmm.
I'm trying to fit a gaussian glmm using MCMCglmm to a data set with two (correlated) response variables. The response variables are both logit-transformed proportions (there are a few reasons why I've chosen these with gaussian error over binomal glmm, which I won't go into).
2012 May 03
0
LME4 to MCMCglmm
Hi all,
I am trying to run an lme4 model (logistic regression with mixed effects) in
MCMCglmm but am unsure how to implement it properly.
Currently, my lme4 model formula looks as follows: "outcome ~ (1 + var1 +
var2 | study) + var1 + var2"
In English, this means that I am fitting a random effects model, where the
intercept, var1 and var2 are jointly distributed according to study.
2018 Mar 23
0
MCMCglmm multinomial model results
> On Mar 22, 2018, at 1:31 PM, Michelle Kline <michelle.ann.kline at gmail.com> wrote:
>
> Hi,
>
> Thanks in advance for any help on this question. I'm running multinomial
> models using the MCMCglmm package. The models have 5 outcome variables
> (each with count data), and an additional two random effects built into the
> models. The issue is that when I use
2009 Dec 20
1
Problems in installing MCMCglmm package
Dear R-Helpers,
I am having troubles with installing with MCMCglmm package and I get the
following error with a package "Matrix"
Warning in library(pkg, character.only = TRUE, logical.return = TRUE,
lib.loc = lib.loc) :
there is no package called 'Matrix'
Error: package 'Matrix' could not be loaded
Execution halted
ERROR: lazy loading failed for package
2018 Mar 24
1
MCMCglmm multinomial model results
Hi David,
Thanks for your comment. I haven't posted the data because they are
unpublished and include human subjects so there are issues with sharing on
a list serv, but I thought perhaps someone had encountered a similar
problem and would already know the answer.
I will reconsider whether my University's ethics approval would allow me to
post the data and update the question if I think
2018 May 01
2
Specifying priors in a multi-response MCMCglmm
Hi Bert,
That was distinctly unhelpful, and your outward hostility to a field you
obviously don't understand reveals a regrettable level of ignorance.
By the way, my research is Anthropology despite my job title.
Michelle
On Tue, May 1, 2018 at 2:48 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> 1. (Mainly) Statistical issues are generally off topic on this list.
> You
2018 Mar 22
2
MCMCglmm multinomial model results
Hi,
Thanks in advance for any help on this question. I'm running multinomial
models using the MCMCglmm package. The models have 5 outcome variables
(each with count data), and an additional two random effects built into the
models. The issue is that when I use the following code, the summary only
gives me results for four of the outcome variables.
Here is the code for my model:
m3.random
2018 May 01
0
Specifying priors in a multi-response MCMCglmm
1. (Mainly) Statistical issues are generally off topic on this list.
You might want to try the r-sig-mixed-models list instead.
2. However, I think a better answer is to seek local statistical
expertise in order to have an extended discussion about your research
intent in order to avoid producing yet more irreproducible
psychological research.
Cheers,
Bert
Bert Gunter
"The trouble with
2010 Mar 29
2
mcmcglmm starting value example
Hi R-users:
Can anyone give an example of giving starting values for MCMCglmm?
I can't find any anywhere.
I have 1 random effect (physicians, and there are 50 of them)
and family="ordinal"?
How can I specify starting values for my fixed effects? It doesn't seem to have the option to do so.
Thanks, Ping
2012 Sep 12
7
multinomial MCMCglmm
Dear all,
I would like to add mixed effects in a multinomial model and I am trying
to use MCMCglmm for that.
The main problem I face: my data set consits of a trapping data set,
where the observation at eah trap (1 or 0 for each species) have been
aggregated per traplines. Therefore we have a proportion of
presence/absence for each species per trapline.
ex:
ID_line mesh habitat Apsy Mygl