Hi,
If the beta's are drawn from a normal distribution with the same variance
then the idv(Z) model is appropriate. I thought you would get an error
message with your code because Z was not in the data.frame. If this was not
the case could you send me your sessionInfo()?
Cheers,
JArrod
Quoting Boby Mathew <bobyboby at gmail.com> on Mon, 20 Oct 2014 17:09:52
+0200:
Hello Jarrod Hadfield,
Thank you so much for your help. I have the winbugs code for estimation
of
my marker effect but the problem is winbugs is too slow and cannot handle
large datasets.
my models is "y(observation) =Z%*%beta + noise"
here 'Z is the markers matrix coded 0 and 1 and beta is marker effect I
used MCMCglmm for this model and included the marker matrix(Z) as random
(random=~idv(Z)).
I simulated some data and MCMCglmm was giving good results when the number
of markers were less than the number of observation. Does MCMCglmm can
handle this type of models?
I have attached the winbugs code here for the reference.
model{
for(i in 1:n){
y[i]~dnorm(mu[i],prec)
mu[i]<- inprod(x[i,], beta[])
}
for (j in 1: p){
beta[j]~dnorm(0,tau[j])
tau[j]<-1/var[j]
var[j]~dgamma(0.1,0.1)
}
sd~dunif(0,10)
sigma2<-sd*sd
prec<-1/sigma2
}
Once again thanks for the help
regards,
Boby
On Mon, Oct 20, 2014 at 4:17 PM, Jarrod Hadfield <j.hadfield at ed.ac.uk>
wrote:
Hi Boby,
If you mean a common t-prior (with estimated scale) for the random
effects
then you cannot. All that you can do is place a fixed t-prior on the
`fixed' effects.
Cheers,
Jarrod
Quoting Boby Mathew <bobyboby at gmail.com> on Mon, 20 Oct 2014 15:52:24
+0200:
Dear jarrod hadfield,
How can I pace individual variances with a t-prior for the random
effects?
Could you please provide me an example?
thanks for the help.
regards,
Boby
On Mon, Oct 20, 2014 at 2:58 PM, Jarrod Hadfield <j.hadfield at ed.ac.uk>
wrote:
Hi,
This gives the b's a common variance. There is no point giving them
individual variances unless you want to treat them as `fixed' but
place a
t-prior rather than a normal prior on each effect.
Jarrod
Quoting Boby Mathew <bobyboby at gmail.com> on Mon, 20 Oct 2014 14:42:02
+0200:
Dear Jarrod Hadfield,
Here I have attached a small code with the simulation code. I want to
estimate the effect of 'b' here. As you suggested I treated fixed
effect
as
random and gave own variance. But I am not sure this is the right way.
Could you please check whether the implementation is right?
regards,
Boby
mark=100; line=150
x=round(matrix(runif(mark*line),nrow=mark))
b=rep(0,mark)
b[8]=3; b[80]=5;b[90]=5;
noise=rnorm(line,0,sqrt(1))
Line=1:line
y = b%*%x + noise
Z=t(x)
library(MCMCglmm)
data=data.frame(Phe=t(y),animal=Line)
data$animal=as.factor(data$animal)
prior2.2 <- list(G = list(G1 = list(V = 1, n = 0.002)), R = list(V =
1,
n
=
0.002))
mod_mcmc=MCMCglmm(Phe~1,random=~idv(Z),pr=T,data=data,
nitt=50000,thin=500,burnin=10000,prior=prior2.2)
val=colMeans (mod_mcmc$Sol)
On Thu, Oct 16, 2014 at 5:51 PM, Jarrod Hadfield <j.hadfield at ed.ac.uk
In short - no. I haven't tried this (or thought about it much), but
you
could treat each fixed effect as a single random effect with its own
associated variance component. Presumably, you could then specify the
prior
for the variance component in a way that induces a prior
t-distribution
on
the effect. Like the Laplace it has fatter tails than the Normal, but
it
lacks the peakiness and won't give some of the nice features of the
LASSO.
Cheers,
Jarrod
Quoting Boby Mathew <bobyboby at gmail.com> on Thu, 16 Oct 2014
16:06:13
+0200:
Dear MCMCglmm users,
Is it possible to use double exponential priors(Laplace) in
MCMCglmm?
Thanks for the helps.
regards,
Boby
--
Dr. Boby Mathew
INRES, University of Bonn
Katzenburgweg 5
Phone: 0228732031
53115, Bonn,Germany.
[[alternative HTML version deleted]]