similar to: Try reproduce glmm by hand

Displaying 20 results from an estimated 2000 matches similar to: "Try reproduce glmm by hand"

2011 Apr 20
2
survexp with weights
Hello, I probably have a syntax error in trying to generate an expected survival curve from a weighted cox model, but I can't see it. I used the help sample code to generate a weighted model, with the addition of a "weights=albumin" argument (I only chose albumin because it had no missing values, not because of any real relevance). Below are my code with the resulting error
2007 Nov 07
3
Can I replace NA by 0 (if yes, how) ?
Hello, I'm trying to fit some points with a 8-degrees polynom (result of lm is stored in pfit). In most of the case, it is ok but for some others, some coefficients are "NA". I don't really understand the meaning of these "NA". And the problem is that I can't perform a derivation (pderiv<-as.function((deriv(polynomial(pfit$coefficients))))) on pfit due to the
2007 Nov 06
1
How to find the zero (only the real solution) with the package polynom ?
Hello, I have 3 columns : a, b and a*b I would like to find the pair (a,b) so that a*b is the minimum but not from the points I measured but from the fit of the curve (I have more points that the ones given below but I fit only on this part because I know that the minimum a*b is in this interval). I thought doing it this way : - to fit a*b=f(a) abfit<-lm(ab ~ poly(a,8,raw=T)) - to use the
2012 Aug 11
1
unsued argument
It is a complex function, functions are quoted frequently, you may read from bottom up The independent variable for final fit is q %%Rg0 is a function of L and b Rg0sq<-function(L,b)L*b/6*(1-3/2*b/L+3/2*(b/L)^2-3/4*(b/L)^3*(1-exp(-2*L/b))) %%alpha is a defined function alpha<-function(x)(1+(x/3.12)^2+(x/8.67)^3)^(0.176/3) %%w is a defined function
2010 Feb 04
0
GLMM and false convergence (8) warnings
Hi, I am doing a binomial GLMM with a random intercept using the formula below, but I always get the same warning message. > m01 <- lmer(pres~ HT + DN + dtree + DNm + cmnhi + cmxes + cplan + craan + lfphal0100 + lfov0100 + lfop0100 + (1|plot), family=binomial, data=vphal, verbose=TRUE) 0: 6309.9448: 0.459924 -5.20747 -0.378722 0.558779 -0.200922 -0.0488451 -0.397844 0.367916 -2.09820
2009 Aug 21
1
applying summary() to an object created with ols()
Hello R-list, I am trying to calculate a ridge regression using first the *lm.ridge()* function from the MASS package and then applying the obtained Hoerl Kennard Baldwin (HKB) estimator as a penalty scalar to the *ols()* function provided by Frank Harrell in his Design package. It looks like this: > rrk1<-lm.ridge(lnbcpc ~ lntex + lnbeerp + lnwinep + lntemp + pop, subset(aa,
2009 Feb 15
1
GLMM, ML, PQL, lmer
Dear R community, I have two questions regarding fitting GLMM using maximum likelihood method. The first one arises from trying repeat an analysis in the Breslow and Clayton 1993 JASA paper. Model 3 of the epileptic dataset has two random effects, one subject specific, and one observation specific. Thus if we count random effects, there are more parameters than observations. When I try to run the
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called directly by users. rms uses generic functions defined in other packages. For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use:
2013 Jan 14
1
Confidence intervel for regression line
Hi all, For the simple linear regression, I want to find the input "x" value so that the lower confidnece limit is a specific number, say 0.2. In other words, I want to find the value of x so that the lower confidence bound crosses the horizontal line 0.2. Is there a simple way (an R function) that can do this? Thanks. Hanna [[alternative HTML version deleted]]
2006 Jun 23
1
How to use mle or similar with integrate?
Hi I have the following formula (I hope it is clear - if no, I can try to do better the next time) h(x, a, b) = integral(0 to pi/2) ( ( integral(D/sin(alpha) to Inf) ( ( f(x, a, b) ) dx ) dalpha ) and I want to do an mle with it. I know how to use mle() and I also know about integrate(). My problem is to give the parameter values a and b to the
2013 Jan 14
2
One sided confidence limits for the regression line
Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits? Thank you very much in advance. Hannah [[alternative HTML version deleted]]
2008 Jun 01
2
optim error
I saw a similar question but I still don't fully understand how to implement optim. Can someone help me out with this? Thanks. Keun-Hyung > vol<-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) > time<-rep(c(2,4,8),each=7) > p.mated<-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, "null", 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, + 0.24, 0.8, 0.79, 0.71, 0.56, 0.74, 0.8, 0.47) >
2004 May 29
1
GLMM error in ..1?
I'm trying to use GLMM in library(lme4), R 1.9.0pat, updated just now. I get an error message I can't decipher: library(lme4) set.seed(1) n <- 10 N <- 1000 DF <- data.frame(yield=rbinom(n, N, .99)/N, nest=1:n) fit <- GLMM(yield~1, random=~1|nest, family=binomial, data=DF, weights=rep(N, n)) Error in eval(expr, envir, enclos) : ..1 used in an incorrect
2004 Nov 01
1
GLMM
Hello, I have a problem concerning estimation of GLMM. I used methods from 3 different packages (see program). I would expect similar results for glmm and glmmML. The result differ in the estimated standard errors, however. I compared the results to MASS, 4th ed., p. 297. The results from glmmML resemble the given result for 'Numerical integration', but glmm output differs. For the
2005 Apr 30
2
formula in fixed-effects part of GLMM
Can GLMM take formula derived from another object? foo <- glm (OVEN ~ h + h2, poisson, dataset) # ok bar <- GLMM (OVEN ~ h + h2, poisson, dataset, random = list (yr = ~1)) #error bar <- GLMM (foo$formula, poisson, dataset, random = list (yr = ~1)) #Error in foo$("formula" + yr + 1) : invalid subscript type I am using R2.1.0, lme4 0.8-2, windows xp. Below is a dataset if you
2004 May 31
1
glmm?
Is there an easy way to get confidence intervals from "glmm" in Jim Lindsey's library(repeated)? Consider the following slight modification of an example from the help page: > df <- data.frame(r=rbinom(10,10,0.5), n=rep(10,10), x=c(rep(0,5), + rep(1,5)), nest=1:10) > fit <- glmm(cbind(r,n-r)~x, family=binomial, nest=nest, data=df) > summary(fit)
2005 Oct 12
0
Mixed model for negative binomial distribution (glmm.ADMB)
Dear R-list, I thought that I would let some of you know of a free R package, glmm.ADMB, that can handle mixed models for overdispersed and zero-inflated count data (negativebinomial and poisson). It was built using AD Model Builder software (Otter Research) for random effects modeling and is available (for free and runs in R) at: http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html I
2010 Aug 22
1
R Package about Variable Selection for GLMM (Generalized Linear Mixed Model)?
Hi all, I have searched for a long time to find out R program about V ariable S election for GLMM (Generalized Linear Mixed Model). I saw several great R packages for V ariable S election. I  also found several R packages for GLMM. But, I did not find yet R package about V ariable S election for GLMM even though sevel  papers about it have been published.   In fact,  I need V ariable 
2006 Feb 08
1
nested random effects in glmm.admb
Hello all, In a previous posting regarding glmm.admb it is stated that glmm.admb can handle 2 nested random effects. I can only fit a single random term at the moment, and wondered if anyone could provide me with some information on how to specify a model with 2 (nested or cross-classified) random terms? Thanks, Jarrod.
2006 Feb 24
1
SE of parameter estimates in glmm.admb
Dear R users, Does anyone know how to get standard errors of the parameter estimates in glmm.admb? Thanks, Istvan