search for: fixef

Displaying 20 results from an estimated 129 matches for "fixef".

Did you mean: fixed
2010 Jan 18
2
Problem extracting from mer objects
I am having a problem extracting from "mer" objects.    I have constructed my problem using existing datasets.   Using the following commands:   require(lme4) fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff) fixef(fm1) I get the following error message: "Error in UseMethod("fixef") : no applicable method for "fixef""   I know that "fixef" is in lme4 and UseMethod is in "base", so I am stuck trying to sort out this problem.  This problem applies to all extrac...
2012 Apr 12
1
Problem with lmer and fixef
Hello, I am trying to do contrasts after applying a binomial mixed effect model with the function lmer. I have to extract the fix effect values, but as I write fixef(model), I get this error message: Error in UseMethod("fixef") : no method for 'fixef' with objects of class "mer" Has anybody some ideas why? And how can I then post-hoc testing my data if I cannot do the contrasts? Thank you very much -- View this message in con...
2007 Sep 25
0
R lmer with problem of 'sd slot has negative entries'
...for most data sets it works well, but for some I get an error message (Error in if (any(sd < 0)) return("'sd' slot has negative entries") : missing value where TRUE/FALSE needed) In these cases I get an estimate for the fixed effect but do not get an estimate for se.fixef. If I change the method to PQL or change control = list (usePQL = TRUE) then I get estimates for both fixed effect and se.fixef, but in the example below the estimates of fixed effects are different for 3 of 4 cases. Could someone please help me? Which, if any, of the estimates for the i...
2007 Sep 28
0
lmer giving negative, or no, estimated standard errors
.... For most data sets it works well, but for some we get an error message (Error in if (any(sd < 0)) return("'sd' slot has negative entries") : missing value where TRUE/FALSE needed) In these cases we get an estimate for the fixed effect but do not get an estimate for se.fixef (its negative). If we change the method to PQL or change control = list (usePQL = TRUE) then we get estimates for both fixed effect and se.fixef, but in the example below the estimates of fixed effects are different for 3 of 4 cases - and the standard errors. Could someone please help us?...
2009 May 06
1
Duplicating meta-regression results from PROC MIXED with lmer
...# Fixed and random effects models, no covariates f0 <- metabin(bcg[,3], bcg[,4], bcg[,5], bcg[,6], sm='OR', method='Inverse') summary(f0) library(lme4) # Fixed effects model, no covariates f1 <- lmer(tb ~ bcg + (1 | study), family=binomial, data=bcg.long) summary(f1) exp(fixef(f1)[2]) # OR exp(f1 at fixef[2] - (1.96*sqrt(vcov(f1)[2,2]))) # lci exp(f1 at fixef[2] + (1.96*sqrt(vcov(f1)[2,2]))) # uci # Random effects model, no covariates. f2 <- lmer(tb ~ bcg + (bcg | study), family=binomial, data=bcg.long) # Random effects, no covariates...
2013 Mar 18
1
try/tryCatch
...d1", "tp", "fn", "fp", "fn", "detect", "d0", "outcome") lm1<-try(lmer(outcome~0+d1+d0+(0+d1+d0 | persons), family=binomial, data=tmp1, nAGQ=3), silent=T) if(class(lm1)[1]!='try-error'){ a[ii,1]=lm1@fixef[1] a[ii,2]=lm1@fixef[2] a[ii,3]=vcov(lm1)[1,2]/prod(sqrt(diag(vcov(lm1)))) a[ii,4:5]=sqrt(diag(vcov(lm1))) } } #k=k+1 #a[ii,6]=k return(a) } ######################################### ######### try / try catch ############### ########################...
2008 Sep 19
0
Error message in lmer
....boot <- ECON_MN[id] SHDI.boot <- SHDI[id] city.boot <- city[id] lmer.5 <-lmer(y.boot ~ cut.boot + cut2.boot + rV.rGb.boot + age_insects.boot + ECON_MN.boot + SHDI.boot + (1|city.boot),family="quasipoisson") for (i in 1:length(cut.pred)){ pred[j,i] <- exp (lmer.5@fixef[1] + lmer.5@fixef[2]*cut.pred[i] + lmer.5@fixef[3]*cut2.pred[i] + lmer.5@fixef[4]* mean(rV.rGb)+lmer.5@fixef[5]*mean(age_insects) + lmer.5@fixef[6]*mean(ECON_MN) + lmer.5@fixef[7]*mean(SHDI)) } } >sessionInfo() R version 2.6.0 (2007-10-03) i386-pc-mingw32 attached base packages: [1]...
2006 May 17
1
nlme model specification
...## this works data(Orange) mod.lis <- nlsList(circumference ~ SSlogis(age, Asymp, xmid, scal), data=Orange ) ### This works mod <- nlme(circumference ~ SSlogis(age, Asymp, xmid, scal), data=Orange, fixed = Asymp + xmid + scal ~ 1, start = fixef(mod.lis) ) ### I try a slightly different model specification for the fixed effects, and it does not work. ### fixed = list(Asymp ~ 1, xmid ~ 1, scal ~ 1) ### I tried following the example on page 355. mod <- nlme(circumference ~ SSlogis(age, Asymp, xmid, scal), data=Orange,...
2011 Dec 30
0
New version of coxme / lmekin
.... This is a major update with three features of note: 1. A non-upwardly compatable change: Extractor functions: beta= fixed effects, b=random effects nlme lme4 coxme <2.2 coxme 2.2 lmekin 2.2 ------------------------------------------------------ beta fixef fixef fixef fixef fixef b ranef ranef ---- ranef ranef var(beta) vcov vcov ---- vcov vcov var(b) VarCorr VarCorr ranef VarCorr VarCorr Notice that "ranef" in the prior release was out of...
2006 Jan 30
1
predict.lme / nlmmPQL: "non-conformable arguments"
...) | target.utt ... Fixed effects: primed ~ log(distance) * role * source - log (distance):source ... > x=10:500*0.1 > new <- data.frame(distance=x, role="r", source="m" ) > yp = predict(model, newdata=new, type="response", level=0) Error in X %*% fixef(object) : non-conformable arguments > traceback() 4: predict.lme(object, newdata, level = level, na.action = na.action) 3: predict(object, newdata, level = level, na.action = na.action) 2: predict.glmmPQL(model, newdata = new, type = "response", level = 0) 1: predict(model, newdata...
2008 Nov 24
1
lme4 and false convergence
...work consistently. -The most updated version of lme4 --------------------------------------------------------------------- PROBLEM #2: In addition, I am interested in visualizing the predicted probabilities from this output using the fixed effect function, but receive the following message: fixef(mix.1) Error in UseMethod("fixef") : no applicable method for "fixef" Any suggestions would be greatly appreciated!
2015 Feb 15
2
Imports problem
I'm testing out a new version of coxme and R CMD check fails with "could not find function ranef" (or random.effects or fixef, or anything from nlme). The NAMESPACE file has the line below importFrom(nlme, ranef, random.effects, fixef, fixed.effects, VarCorr) and nlme is declared in the DESCRIPTION file as an import. I feel that I must be staring at some obvious (but invisible to me) mistake. Users are very like...
2011 Apr 15
1
no solution yet, please help: extract p-value from mixed model in kinship package
...", length = 1000) > > P[i] <- lmekin(yvar~ mydata[,i] , data= mydata, random = ~1|id, > varlist=list(kmat)) $coefficients[2,4] > > } > > Same errors: I tried lme4 conventioned but did not work ! > I can extract fixed effects as well as I do in lme4 > b <- fixef(fit1) > > Error in UseMethod("fixef") : > no applicable method for 'fixef' applied to an object of class "lmekin" > > > -- > > Ram H > -- Ram H [[alternative HTML version deleted]]
2012 Apr 29
2
Xy plot help
...39;(Intercept)' > -4.1) cc1 <- as.data.frame(coef(fm1)$Subject) names(cc1) <- c("A", "B","C","D","E","F","G","H","I","K","L","M") df <- cbind(df, cc1) ff <- fixef(fm1) SubjectBDat<-as.factor(Behavdat$Subject) print(xyplot(Response ~ time | SubjectBDat, Behavdat,               type = c("g", "p", "r"),              coef.list = df[,3:14],              panel = function(..., coef.list) {                  panel.xyplot(...)    ...
2007 Oct 15
2
coef se in lme
Hi all! How is it possible to estimate standard errors for coef obtained from lme? Is there sth like se.coef() for lmer or what is the anaytical solution? Thank you!
2006 Mar 17
1
nlme predict with se?
...Meat 1.00 1 AksToKa > kew11.nlme$call nlme.formula(model = lw ~ SSasympOff(ageyr2, mw, lgr, age0), data = kew, fixed = list(mw + lgr + age0 ~ Season * MBreed + ecoreg + ecoreg:Season), random = list(farm = list(mw ~ 1, lgr ~ 1), sheep = list(mw ~ 1)), start = c(fixef (kew8.nlme)[1:15], 0, 0, 0, 0, 0, 0, 0, 0, 0, fixef(kew8.nlme)[16:30], 0, 0, 0, 0, 0, 0, 0, 0, 0, fixef(kew8.nlme)[31:45], 0, 0, 0, 0, 0, 0, 0, 0, 0), correlation = corSymm()) > levels(kew$Season)==levels(x.for.lw.pred$Season) [1] TRUE TRUE TRUE TRUE > kew[1:...
2008 May 28
1
extracting information from lmer objects
Hi, I wish to extract a subset of the information of given by summary(lmer.object) as a dataframe. In particular, I wish to extract just a table listing the Estimate, Std Error, and t-values rounded to 3 decimal places. I have learned how to extract the coefficients with "round(fixef(lmer.object),3)" and the standard errors with "round(sqrt(diag(vcov(a.lmer))),3)" but I do not know how to extract the t-values; the extractor methods do not seem to help in this regard. I inspected the structure of the summary with "str(summary(lmer.object))" but unfortuna...
2012 Jun 24
2
Defining multiple variables in a loop
...e much appreciated. Thanks, Taylor White UCLA ######Bootstrapping panel data by hand. ?Create 4 variables from 3 subsets of the original data. Resample each variable and recombine into one matrix. plmcoef <- array(0, c(1000, 4)) #creates an empty array to store regression coefficients plmfixef <- array(0, c(1000, 3)) #creates an empty array to store fixed effects intercepts from regressions for (i in 1:1000) { country1 <- as.data.frame(subset(OECDFiscal2, Country == 1)) country2 <- as.data.frame(subset(OECDFiscal2, Country == 2)) country3 <- as.data.frame(subset(OECDFiscal2...
2015 Apr 30
2
predict nlme
..."Factor", "Insu") datos # modelo m2 <- lme(Peso ~ poly(Tiempo,2, raw = TRUE)+ Factor + Dieta + Insu-1 ,random=~poly(Tiempo,2, raw = TRUE)|Ave , datos, na.action="na.exclude" ,control=lmeControl(opt='optim', msVerbose = TRUE)) res2 <-fixef(m2) res2 ##### preguntas ######################################################## # una pregunta nueva Insu-1, porque deseo que me exprese el valor para casa Insu y no # mu + un valor de diferencia entre algunos y este # si tengo un solo efecto fijo (quito factor y dieta) no hay problelas, s...
2006 May 27
1
Recommended package nlme: bug in predict.lme when an independent variable is a polynomial (PR#8905)
...t; > # "correct" model matrix for predictions > p <- poly(Orthodont$age, 3) > mm2 <- model.matrix(~ poly(age, 3, coefs = attr(p, "coefs")) + Sex, data = Newdata) > > data.frame(pred1 = predict(fm, level = 0, newdata = Newdata), + pred2 = mm1 %*% fixef(fm), + pred3 = head(predict(fm, level = 0)), + pred4 = mm2 %*% fixef(fm)) pred1 pred2 pred3 pred4 1 18.61469 18.61469 23.13079 23.13079 2 23.23968 23.23968 24.11227 24.11227 3 29.90620 29.90620 25.59375 25.59375 4 36.19756 36.19756 27.03819 27.03819 5 18.61469 18...