search for: varcomp

Displaying 20 results from an estimated 29 matches for "varcomp".

2018 Jan 22
1
what does the within component of varcomp (ape library) output indicate?
I am trying to use varcomp to obtain the variance partitioning across different nested levels of random effects (say x,y and z). I get the three variance components (for each of my along with an additional one called 'within' from varcomp output. I am using the 'scale total variance to 1' option and though th...
2017 Aug 08
2
how to extract individual values from varcomp?
Hello, I am trying to use varcomp to decompose the variance across multiple nested levels on a lme object. I am able to successfully do this and when I view the varcomp object I can see the individual values / estimates for the variance at different levels. However, I want to be able to extract each of them separately, as I need t...
2012 May 14
1
Extract Variance Components
...m each model (one per gene) put in to a data frame, this works for one gene: /## SUCCESS! for one gene... alpha<-as.matrix(lme4::VarCorr(rg.lmer[[1]])) beta<-data.frame(c(alpha,attr(alpha,"sc")^2)) colnames(beta)<-c("sexline","line","residual") beta$varcomp<-beta$residual/sum(beta$sexline,beta$line,beta$residual) rownames(beta)<-gene.list[[1]] #gene.list is just a list of all my focal genes/ Produces this: row.names # sexline #line #residual #varcomp #gene 1 (Intercept) #0.005087154 #0.0...
2003 Nov 27
2
lme v. aov?
I am trying to understand better an analysis mean RT in various conditions in a within subjects design with the overall mean RT / subject as one of the factors. LME seems to be the right way to do this. using something like m<- lme(rt~ a *b *subjectRT, random= ~1|subject) and then anova(m,type = "marginal"). My understanding is that lme is an easy interface for dummy coding
2017 Aug 08
0
how to extract individual values from varcomp?
Hi try str(varcompobject) to see structure of this object. You can extract parts by standard R means. Cheers Petr > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Sharada > Ramadass > Sent: Tuesday, August 8, 2017 3:33 PM > To: r-help at r-project.org...
1999 Apr 21
0
varcomp?
Hello R experts, I haven't found anything like the S function 'varcomp' as described in W.N. Venables & B.D. Ripley's 'Modern Applied Statistics ...' for R; does something comparable exist for R, or is planned for future releases? More generally, are there libraries with post-anova test procedures, like Student-Newman-Keuls? Or do those of you wh...
2008 Jan 28
0
(no subject)
...t H0:mu=0 (intercept of the model Yij = mu + Bi + Eij). I am using the following program all.fix.coef.lme <- rep(NA,R) all.fix.coef.lm <- rep(NA,R) all.fix.coef.glm <- rep(NA,R) all.se.fix.coef <- rep(NA,R) all.fix.coef.glmm <- rep(NA,R) all.se.fix.coef.glmm <- rep(NA,R) all.varcomp.g <- rep(NA,R) all.se.varcomp.g2 <- rep(NA,R) all.se.varcomp.gD <- rep(NA,R) all.se.fix.coef.adapt <- rep(NA,R) vb<-rep(NA,R) yb<-rep(NA,R) va<-rep(NA,R) mse<-rep(NA,R) msa<-rep(NA,R) maxH0<-rep(NA,R) maxH1<-rep(NA,R) tstat1 <- rep(NA,R) tstat2 <- rep(NA,R) ts...
2012 Jan 30
1
Linear Mixed Model set-up
...1.59 50 Walleye 1982 1.61 51 Walleye 1982 1.55 52 Walleye 1984 1.25 53 Walleye 1984 1.41 54 Walleye 1984 1.50 55 Walleye 1984 1.39 > contaminant<-fish$CONTAMINANT > year<-fish$YEAR > mod<-lme(contaminant~year,random=~1|year,data=data) > varcomp(mod,cum=FALSE) year Within 0.02695566 0.05758531 attr(,"class") [1] "varcomp" Thanks in advance for your help - I very new to formula-building in R. [[alternative HTML version deleted]]
2006 Aug 10
5
Variance Components in R
Hi, I'm trying to fit a model using variance components in R, but if very new on it, so I'm asking for your help. I have imported the SPSS database onto R, but I don't know how to convert the commands... the SPSS commands I'm trying to convert are: VARCOMP RATING BY CHAIN SECTOR RESP ASPECT ITEM /RANDOM = CHAIN SECTOR RESP ASPECT ITEM /METHOD = MINQUE (1) /DESIGN = CHAIN SECTOR RESP ASPECT ITEM SECTOR*RESP SECTOR*ASPECT SECTOR*ITEM CHAIN*RESP CHAIN*ASPECT CHAIN*ITEM RESP*ASPECT RESP*ITEM SECTOR*RESP*ASPECT...
2005 Oct 27
2
Extracting Variance Components
Dear List, Is there a way to extract variance components from lmeObjects or summary.lme objects without using intervals()? For my purposes I don't need the confidence intervals which I'm obtaining using parametric bootstrap. Thanks, Mike [[alternative HTML version deleted]]
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
...) newdata <- cbind(newdata, ci) newdata$model <- "Poisson" library(pscl) #aproximate prediction intervals with zero inflated poisson regression fm_zip <- zeroinfl(art ~ fem | 1, data = bioChemists) fit <- predict(fm_zip) Pearson <- resid(fm_zip, type = "pearson") VarComp <- resid(fm_zip, type = "response") / Pearson fem <- bioChemists$fem bootstrap <- replicate(999, { yStar <- pmax(round(fit + sample(Pearson) * VarComp, 0), 0) predict(zeroinfl(yStar ~ fem | 1), newdata = newdata) }) newdata0 <- newdata newdata0$fit <- predict(fm_...
2003 May 23
1
variance components
Dear All, I need to calculate the variance components in a mixed effect model (one fixed and one random effect) with REML (maximizing the proportion of the likelihood that does not depend on the fixed effects). In S+ there is the varcomp function, but I would like to do it in R. Is there a way to do that? Thanks! Katalin ___ Katalin Csillery Division of Biological Sciences University of Montana, Missoula MT 59801 Phone: 406 243 6106, E-mail: csillery at selway.umt.edu
2004 Apr 17
0
about lme
...1 1 1 12 1 1 1 11 1 1 2 13 2 1 2 15 2 1 3 21 3 1 3 19 3 2 1 16 4 2 1 18 4 2 2 13 5 2 2 19 5 2 2 14 5 2 3 11 6 2 3 13 6 I try with lme to obtain the variance estimates like with varcomp, for model1 model-2, sum and interaction effects. varcomp gives me: variance estimates: t 0 b 0 t:b 7.407 residuals 3.8429 I try with lme: x <- lme(med~ 1, data = X;random = ~ 1 | t+b or random = ~t+b | celda random = ~t*b | celda...
2006 Dec 13
1
Obtaining Estimates of the Random Effects Parameters
I'm running simulation using lme and sometimes the estimated variance-covariance matrix is not positive definite so that the intervals function won't work for the random effect coefficients. I've tried varcomp from the ape package but this does not return all the coefficients. How can I extract the random effect coefficients without using intervals? Rick B.
2013 Jan 15
1
Histogram plot spacing
...tion 0 (or the lowest value of y) after making the histogram. Unfortunately, it doesn't work in my case as I want to use it with a histogram with a ylim starting above 0, so that the x-axis ends up superposing the histogram bars. Any suggestion? For info, I've been using: hist(univariateCV$varcomp, ylim=c(10300,11100), xlim=c(-0.002,0.40), breaks=seq(0,1,0.004), axes=FALSE, main="", ylab="", xlab="",col='blue', xaxt="n") axis(1, at=seq(0,0.40,0.05), labels=seq(0,0.40,0.05), pos=10300) which gives the x axis superposed with the histogram bars....
2018 May 23
1
coef does not work for my ASReml model
Hi Everyone, I am using ASReml to fit a spatial model. I do not have all the components of ASReml when I call; names(summary()) e.g. names(summary(fcov.asr2)) [1] "call" "loglik" "nedf" "sigma" "varcomp" I am trying to get the coefs but I get "NULL". Does anybody know the reason? Any help would be much appreciated. Regards Mehrshad -- Mehrshad Barary Senior Lecturer in Crop Ecophysiology Department of Agronomy and Plant Breeding Faculty of Agriculture Ilam University Tel: (+98)...
2005 Apr 16
1
help on extract variance components from the fitted model by lm
Hey, all: Do we have a convenient command(s) to extract the variance components from a fitted model by lm (actually it's a nexted model)? e.g.: using the following codes we could get MSA,MSB(A) and MSE. How to get the variance component estimates by command in R rather than calculations by hand? A<-as.vector(rep(c(rep(1,5), rep(2,5), rep(3,5), rep(4,5), rep(5,5)),2))
2003 Apr 02
2
replication of latin squares --- again
Dear all, this is a newbie's question. I have a 4x4 latin square replicated 3 times. That is: operators batches 1 2 3 4 1 A B C D 2 B C D A 3 C D A B 4 D A B C operators batches 1 2 3 4 5 A B C D 6 B C D A 7 C D A B 8 D A B C operators batches 1 2 3 4 9 A B C D
2007 Jun 12
1
Cause of error message in cov function?
.... Below is her error message followed by the version of R she's using. Can anyone help me out here? I can't recreate her error message. Does anyone know what this might have to do with? Is it a version issue (she's using R 2.1)? I'd appreciate any help!! Matt ERROR MESSAGE: cov.varcomp <- cov(t(effects.cur[c("A","AA","D","F","S","E","AGE","AGE.by.A"),]*beta2)) there is an argument mssing. error message: Error in mean((a - mean(a)) * (b - mean(b))) : argument "b" is missing, with...
2006 Mar 16
2
Using of LME function in non-replicate data
...EML approach to variance component estimation http://tolstoy.newcastle.edu.au/R/help/05/06/6498.html Someone expose the follow problem: # non-replicate data y <- c(2.2, -1.4, -0.5, -0.3, -2.1, 1.5, 1.3, -0.3, 0.5, -1.4, -0.2, 1.8) ID <- factor( 1:12 ) library(ape) library(nlme) varcomp(lme(y ~ 1, random = ~ 1 | ID)) # RESULTS: # ID Within # 1.6712661 0.2350218 Prof. Dr. Douglas Bates reply this: > It's a spurious convergence in lme. There is no check in lme for the > number of observations exceeding the number of groups. There should > be. I'll add thi...