similar to: Random effects and lme4

Displaying 20 results from an estimated 3000 matches similar to: "Random effects and lme4"

2013 Apr 09
0
[R-SIG-Finance] EM algorithm with R manually implemented?
Moved to R-help because there's no obvious financial content. Michael On Sat, Apr 6, 2013 at 10:56 AM, Stat Tistician <statisticiangermany at gmail.com> wrote: > Hi, > I want to implement the EM algorithm manually, with my own loops and so. > Afterwards, I want to compare it to the normalmixEM output of mixtools > package. > > Since the notation is very advanced, I
2013 Mar 31
0
Skewness of fitted mixture not correct?
I fitted a gaussian mixture to my financial data. The data can be found here: http://uploadeasy.net/upload/32xzq.rar I look at the density with plot(density(dat),col="red",lwd=2) this has a skew of library(e1071) skewness(dat) -0.1284311 Now, I fit a gaussian mixture according to: f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22) with:
2006 Sep 28
1
Nonlinear fitting - reparametrization help
Hi, I am trying to fit a function of the form: y = A0 + A1 * exp( -0.5* ( (X - Mu1) / Sigma1 )^2 ) - A2 * exp ( -0.5* ( (X-Mu2)/Sigma2 )^2 ) i.e. a mean term (A0) + a difference between two gaussians. The constraints are A1,A2 >0, Sigma1,Sigma2>0, and usually Sigma2>Sigma1. The plot looks like a "Mexican Hat". I had trouble (poor fits) fitting this function to toy data
2007 May 08
0
Question on bivariate GEE fit
Hi, I have a bivariate longitudinal dataset. As an example say, i have the data frame with column names var1 var2 Unit time trt (trt represents the treatment) Now suppose I want to fit a joint model of the form for the *i* th unit var1jk = alpha1 + beta1*timejk + gamma1* trtjk + delta1* timejk:trtjk + error1jk var2 = alpha2 + beta2*timejk + gamma2* trtjk + delta2* timejk:trtjk +
2013 Apr 22
0
Copula fitMdvc:
Hello, I am trying to do a fit a loglikelihood function with Multivariate distribution via copulas with fitMdvc. The problem is that it doesn't recognize that my beta is a vector of km parameter and when I try to run it it say that the length of my initial values is not the same as the parameter. Can somebody guide me where my mistake is. Thanks, Elisa. #################################
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a question which has been perplexing me. I have been working on doing a Bayesian calculating inserting studies sequentially after using a non-informative prior to get a meta-analysis type result. I created a function using three iterations of this, my code is below. I insert prior mean and precision (I add precision manually
2007 Jun 15
0
Question with nlm
Hi, I would really appreciate if I could get some help here. I'm using nlm to minimize my negative log likelihood function. What I did is as follows: My log likelihood function (it returns negative log likelihood) with 'gradient' attribute defined inside as follows: # ==========Method definition====================== logLikFunc3 <- function(sigma, object, totalTime) { y <-
2007 Aug 29
3
OT: distribution of a pathological random variate
Folks, I wonder if anything could be said about the distribution of a random variate x, where x = N(0,1)/N(0,1) Obviously x is pathological because it could be 0/0. If we exclude this point, so the set is {x/(0/0)}, does x have a well defined distribution? or does it exist a distribution that approximates x. (The case could be generalized of course to N(mu1, sigma1)/N(mu2, sigma2) and one
2009 Feb 02
0
emperical bayes estimates and standard error lme4
Dear all, I am trying to get the emperical bayes estimates together with their standard errors out of lme4. Up to now I have used MLwiN to get these estimates. I have fitted the following - very simple - model, just to find out how this works. test<-lmer(y~(1|subject),data,REML=F) ranef(test,postVar=T) str(ranef(test,postVar=T) If I use the formulation of the emperical bayes estimates and
2018 Jan 05
0
Calculating the correlations of nested random effects in lme4
I postulate the following model AC <- glmer(Accuracy ~ RT*Group + (1+RT|Group:subject) + (1+RT|Group:Trial), data = da, family = binomial, verbose = T) Here I predict Accuracy from RT, Group (which has values 0 or 1) and the interaction of Group and RT (those are the fixed effects). I also estimate the random effects for both intercepts and slopes for subjects and different trials.
2003 Nov 24
2
Questions on Random Forest
Hi, everyone, I am a newbie on R. Now I want to do image pixel classification by random forest. But I has not a clear understanding on random forest. Here is some question: As for an image, for example its size is 512x512 and has only one variable -- gray level. The histogram of the image looks like mixture Gaussian Model, say Gauss distribution (u1,sigma1), (u2,sigma2),(u3,sigma3). And a
2013 Mar 30
1
normal mixture EM not working?
Hi, I am currently working on fitting a mixture density to financial data. I have the following data: http://s000.tinyupload.com/?file_id=00083355432555420222 I want to fit a mixture density of two normal distributions. I have the formula: f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22) my R code is: normalmix<-normalmixEM(dat,k=2,fast=TRUE) pi<-normalmix$lambda[1] mu1<-normalmix$mu[1]
2008 Oct 30
0
a nlm() question
Dear R listers, I have a very annoying problem using nlm(). I want to find the minimizer of my target function, if written in \LaTeX is f(\mu1,\mu2,\sigma1,\sigma2) = \sum_i^n( w_ig_t(z_i) ), where g_t(z) is a pdf of bivariate normal distribution and z_i is my samples. I cannot get the estimation result generated by nlm(), and I got the following errors " Error in
2006 Aug 02
2
lme4 and lmeSplines
I'm trying to use the lmeSplines package together with lme4. Below is (1) an example of lmeSplines together with nlme (2) an attempt to use lmeSplines with lme4 (3) then a comparison of the random effects from the two different methods. (1) require(lmeSplines) data(smSplineEx1) dat <- smSplineEx1 dat.lo <- loess(y~time, data=dat) plot(dat.lo) dat$all <- rep(1,nrow(dat)) times20
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model: mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) # Here, cs and rtr are crossed random effects. cs 1-5 are of type TRUE, cs 6-10 are of type FALSE, so cs is nested in trth, which is fixed. So for cs I should get a fit for 1-5 and 6-10. This appears to be the case from the random effects: > mean( ranef(mod1)$cs[[1]][1:5] ) [1] -2.498002e-16 > var(
2017 Aug 24
1
Problem in optimization of Gaussian Mixture model
Hello, I am facing a problem with optimization in R from 2-3 weeks. I have some Gaussian mixtures parameters and I want to find the maximum in that *Parameters are in the form * mean1 mean2 mean3 sigma1 sigma2 sigma3 c1 c2 c3 506.8644 672.8448 829.902 61.02859 9.149168 74.84682 0.1241933 0.6329082 0.2428986 I have used optima and optimx to find the
2006 Apr 23
2
distribution of the product of two correlated normal
Hi, Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. yu [[alternative HTML version deleted]]
2006 Dec 31
0
(no subject)
> > If one compares the random effect estimates, in fact, one sees that > > they are in the correct proportion, with the expected signs. They are > > just approximately eight orders of magnitude too small. Is this a bug? > > BLUPs are essentially shrinkage estimates, where shrinkage is > determined with magnitude of variance. Lower variance more > shrinkage towards
2013 Apr 30
1
Mixed Modeling in lme4
Hi All, I am trying to shift from running mixed models in SAS using PROC MIXED to using lme4 package in R. In trying to match the coefficients of R output to that of SAS output, I came across this problem. The dataset I am using is this one: http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect034.htm If I run the following code: proc mixed data=rc
2010 Feb 24
1
lme4 exactitud
Tengo una duda, hay unos modelos mixtos que se resuelven con lme4, no tengo problemas con esto, pero necesito tener el resultado para cada uno de los factores, lo expreso con este ejemplo aunque no es código r creo que se entendería Factores como ser casa y auto, tengo casa 1, casa 2, casa 3, y auto 1, auto2, auto 3. Con lme4 y utilizando ranef obtengo por ejemplo Casa 1