Displaying 20 results from an estimated 300 matches similar to: "fixed effects constant in mcmcsamp"
2002 Mar 29
1
help with lme function
Hi all,
I have some difficulties with the lme function and so this is my problem.
Supoose i have the following model
y_(ijk)=beta_j + e_i + epsilon_(ijk)
where beta_j are fixed effects, e_i is a random effect and
epsilon_(ijk) is the error.
If i want to estimate a such model, i execute
>lme(y~vec.J , random~1 |vec .I )
where y is the vector of my data, vec.J is a factor object
2010 Jun 12
2
Logic with regexps
Greetings,
The following question has come up in an off-list discussion.
Is it possible to construct a regular expression 'rex' out of
two given regular expressions 'rex1' and 'rex2', such that a
character string X matches 'rex' if and only if X matches 'rex1'
AND X does not match 'rex2'?
The desired end result can be achieved by logically combining
2006 Apr 11
1
type II and III Sum square whit empty cells
Dear all
I need to run an anova from a factorial model
y_{ijk}=\alpha_i+\beta_j+(\alpha\beta)_{ij}+e_{ijk}
and calculate type II and III sums of square, but I have an empty
cells, so anova function from package car fail. (I believe)
y<-c(7,13,6,10,8,11,8,3,7,5,65)
a<-as.factor(c(1,1,2,2,3,3,3,1,1,1,2))
b<-as.factor( c(rep(1,7),rep(2,4)) )
table(b,a) # cell (2,3) is empty
2010 Oct 13
5
Poisson Regression
Hello everyone,
I wanted to ask if there is an R-package to fit the following Poisson
regression model
log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k}
i=1,\cdots,N (subjects)
j=0,1 (two levels)
k=0,1 (two levels)
treating the \phi_{i} as nuinsance parameters.
Thank you very much
--
-Tony
[[alternative HTML version deleted]]
2013 Mar 06
1
aov() and anova() making faulty F-tests
Dear useRs,
I've just encountered a serious problem involving the F-test being carried
out in aov() and anova(). In the provided example, aov() is not making the
correct F-test for an hypothesis involving the expected mean square (EMS) of
a factor divided by the EMS of another factor (i.e., instead of the error
EMS).
Here is the example:
Expected Mean Square
2005 Apr 27
0
Fitting a kind of Proportional Odds Modell using nlme, polr, lrm or ordgee
Hello,
I'm trying to fit a special kind of proportional odds model from:
Whitehead et al. (2001). Meta-analysis of ordinal outcome using
individual patient data. Statistics in medicine 20: 2243-2260. (model 2)
The data are as follows:
library(nlme)
library(geepack)
library(Design)
library(MASS)
options(contrasts=c("contr.SAS","contr.poly"))
counts <-
2004 Apr 17
0
about lme
Dear R users:
I've a problem with lme function, when I want
to model an unbalanced two-way anova, with 2 random factors say t and b.
My two models are:
model1- y(ijk) = beta+b(i)+t(j)+epsilon(ijk)
model2- y(ijk)= beta+b(i)+t(j)+b:t(ij)+epsilon(ijk)
beta overall mean effect
The data.frame is X
t b med celda
1 1 10 1
1 1 12 1
1 1 11 1
1 2 13 2
1
2009 Feb 11
2
generalized mixed model + mcmcsamp
Hi,
I have fitted a generalized linear mixed effects model using lmer
(library lme4), and the family = quasibinomial. I have tried to obtain a
MCMC sample, but on calling mcmcsamp(model1, 1000) I get the following
error which I don't understand at all:
Error in .local(object, n, verbose, ...) : Update not yet written
traceback() delivers:
4: .Call(mer_MCMCsamp, ans, object)
3:
2006 Oct 20
1
mcmcsamp - How does it work?
Hello,
I am a chemical student and I make use of 'lme/lmer function'
to handle experiments in split-plot structures.
I know about the mcmcsamp and I think that it's very promissory.
I would like knowing "the concept behind" of the mcmcsamp function.
I do not want the C code of the MCMCSAMP function.
I would like to get the "pseudo-algorithm" to understanding
that
2008 Oct 08
1
Suspicious output from lme4-mcmcsamp
Hello, R community,
I have been using the lmer and mcmcsamp functions in R with some difficulty. I do not believe this is my code or data, however, because my attempts to use the sample code and 'sleepstudy' data provided with the lme4 packaged (and used on several R-Wiki pages) do not return the same results as those indicated in the help pages. For instance:
> sessionInfo()
R
2010 Jan 31
2
lmer, mcmcsamp, coda, HPDinterval
Hi,
I've got a linear mixed model created using lmer:
A6mlm <- lmer(Score ~ division + (1|school), data=Age6m)
(To those of you to whom this model looks familiar, thanks for your patience
with this & my other questions.) Anyway, I was trying this to look at the
significance of my fixed effects:
A6post <- mcmcsamp(A6mlm, 50000)
library(coda)
HPDinterval(A6post)
..but I got this
2006 Feb 10
1
mcmcsamp shortening variable names; how can i turn this feature off?
I have written a function called mcsamp() that is a wrapper that runs
mcmcsamp() and automatically monitors convergence and structures the
inferences into vectors and arrays as appropriate.
But I have run into a very little problem, which is that mcmcsamp()
shortens the variable names. For example:
> set.seed (1)
> group <- rep (1:5,10)
> a <- rnorm (5,-3,3)
> y <-
2007 Mar 30
0
problem using mcmcsamp() with glmer models containing interaction terms in fixed effects
Dear All,
I've been using mcmcsamp() successfully with a few different mixed models
but I can't get it to work with the following. Is there an obvious reason
why it shouldn't work with a model of this structure ?
*brief summary of objective:
I want to test the effect of no-fishing marine reserves on the abundance of
a target species.
I have samples at coral reef sites inside and
2008 Sep 27
1
Using the mcmcsamp function
Hello,
I'm building a couple of mixed models using the lmer function.
The actual modelling is going well, but doing some reading on the use of
crossed random effects and the comparison of models with and without
random effects it is clear that I need to generate some Markov Chain Monte
Carlo samples. However, I'm struggling because everyone time I go to
generate a sample I get the
2008 Jan 24
0
(lme4: lmer) mcmcsamp: Error in if (var(y) == 0)
I've got a problem with "mcmcsamp" used with glmer objects produced
with "lmer" from the lme4 package.
When calling mcmcsamp, I get the error
Error in if (var(y) == 0) { : missing value where TRUE/FALSE needed
This does not occur with all models, but I can't find anything wrong
with the dataset.
If the error is in my data, can someone tell me what I am looking
2011 Feb 19
0
lmer, MCMCsamp and ranef samples?
I really hope sombody could help me with the following,
I'm having problems accessing the random effect samples following the
example on MCMCsamp:
(fm1 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
set.seed(101); samp0 <- mcmcsamp(fm1, n = 1000, saveb=TRUE)
str(samp0)
Formal class 'merMCMC' [package "lme4"] with 9 slots
..@ Gp :
2007 Jan 03
1
mcmcsamp and variance ratios
Hi folks,
I have assumed that ratios of variance components (Fst and Qst in
population genetics) could be estimated using the output of mcmcsamp
(the series on mcmc sample estimates of variance components).
What I have started to do is to use the matrix output that included
the log(variances), exponentiate, calculate the relevant ratio, and
apply either quantile or or HPDinterval to get
2009 Mar 17
0
update on mcmcsamp for glmer
I've searched the help archives of both lists and apologize if I missed the answer 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)
2007 Apr 27
1
Example of mcmcsamp() failing with lmer() output
Hi,
I would appreciate help with the following model
<<1>>=
gunload <- read.table(hh('datasets/gunload.dat'), header = T)
gunload$method <- factor(gunload$method, labels = c('new', 'old'))
gunload$physique <- factor(gunload$group, labels = c('slight',
'average', 'heavy'))
gunload$team9 <- factor(rep(1:9, each = 2))
@
This
2006 Aug 08
1
fixed effects following lmer and mcmcsamp - which to present?
Dear all,
I am running a mixed model using lmer. In order to obtain CI of
individual coefficients I use mcmcsamp. However, I need advice which
values that are most appropriate to present in result section of a
paper. I have not used mixed models and lmer so much before so my
question is probably very naive. However, to avoid to much problems with
journal editors and referees addicted to