[R] build Mac distribution for R package
Dear R users, can somebody give me some suggestions about how to build Mac distribution on my own Mac OS Thanks -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] package nlme
Hi R Users, When I use package nlme for linear model with random effects, there exists errors and I don't know the data structure of lme. Here is my data: Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), Variety=rep(rep(c("A1","A2","A3"),each=3),3), Stand=rep(c("B1","B2","B3"),9), Block=rep(1:3,each=9)) Rice.lme<-lme(Yield ~ Variety + Stand + Block,data=Rice) And error will be like below: Wrong at getGroups.data.frame(dataMix, groups) : Invalid formula for groups can you give me some advice and you will be appreciated. Thanks. Wenjun. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] package lme4
Hi R Users, When I use package lme4 for mixed model analysis, I can't distinguish the significant and insignificant variables from all random independent variables. Here is my data and result: Data: Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), Variety=rep(rep(c("A1","A2","A3"),each=3),3), Stand=rep(c("B1","B2","B3"),9), Block=rep(1:3,each=9)) Rice.lmer<-lmer(Yield ~ (1|Variety) + (1|Stand) + (1|Block) + (1|Variety:Stand), data = Rice) Result: Linear mixed model fit by REML Formula: Yield ~ (1 | Variety) + (1 | Stand) + (1 | Block) + (1 | Variety:Stand) Data: Rice AIC BIC logLik deviance REMLdev 96.25 104.0 -42.1285.33 84.25 Random effects: GroupsNameVariance Std.Dev. Variety:Stand (Intercept) 1.345679 1.16003 Block (Intercept) 0.00 0.0 Stand (Intercept) 0.89 0.94281 Variety (Intercept) 0.024691 0.15714 Residual 0.67 0.81650 Number of obs: 27, groups: Variety:Stand, 9; Block, 3; Stand, 3; Variety, 3 Fixed effects: Estimate Std. Error t value (Intercept) 7.1852 0.6919 10.38 Can you give me some advice for recognizing the significant variables among random effects above without other calculating. Any suggestions will be appreciated. Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] package lme4
Thanks,Douglas, It really helps me a lot, but is there any other way if I want to show whether a random effect is significant in text file, like P value or other index. Thanks very much again. Wenjun. 2009/11/2 Douglas Bates > On Sun, Nov 1, 2009 at 9:01 AM, wenjun zheng wrote: > > Hi R Users, > > When I use package lme4 for mixed model analysis, I can't distinguish > > the significant and insignificant variables from all random independent > > variables. > > Here is my data and result: > > Data: > > > > > > Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), > > Variety=rep(rep(c("A1","A2","A3"),each=3),3), > > Stand=rep(c("B1","B2","B3"),9), > > Block=rep(1:3,each=9)) > >Rice.lmer<-lmer(Yield ~ (1|Variety) + (1|Stand) + (1|Block) + > > (1|Variety:Stand), data = Rice) > > > > Result: > > > > Linear mixed model fit by REML > > Formula: Yield ~ (1 | Variety) + (1 | Stand) + (1 | Block) + (1 | > > Variety:Stand) > > Data: Rice > > AIC BIC logLik deviance REMLdev > > 96.25 104.0 -42.1285.33 84.25 > > Random effects: > > GroupsNameVariance Std.Dev. > > Variety:Stand (Intercept) 1.345679 1.16003 > > Block (Intercept) 0.00 0.0 > > Stand (Intercept) 0.89 0.94281 > > Variety (Intercept) 0.024691 0.15714 > > Residual 0.67 0.81650 > > Number of obs: 27, groups: Variety:Stand, 9; Block, 3; Stand, 3; Variety, > 3 > > > Fixed effects: > >Estimate Std. Error t value > > (Intercept) 7.1852 0.6919 10.38 > > > Can you give me some advice for recognizing the significant variables > among > > random effects above without other calculating. > > Well, since the estimate of the variance due to Block is zero, that's > probably not one of the significant random effects. > > Why do you want to do this without other calculations? In olden days > when each model fit involved substantial calculations by hand one did > try to avoid fitting multiple models but now that is not a problem. > You can get a hint of which random effects will be significant by > looking at their precision in a "caterpillar plot" and then fit the > reduced model and use anova to compare models. See the enclosed > > >Any suggestions will be appreciated. > > Wenjun > > > >[[alternative HTML version deleted]] > > > > __ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] package lme4
May be I can calculate p value by t testing approximately: 1-qnorm(Variance/Std.Dev.) But which function can help me to extract Variance and Std.Dev values from the results below: >print(fm2 <- lmer(Yield ~ 1 + (1|Stand) + (1|Variety) + (1|Variety:Stand),Rice)) Linear mixed model fit by REML Formula: Yield ~ 1 + (1 | Stand) + (1 | Variety) + (1 | Variety:Stand) Data: Rice AIC BIC logLik deviance REMLdev 94.25 100.7 -42.1285.33 84.25 Random effects: GroupsNameVariance Std.Dev. Variety:Stand (Intercept) 1.345679 1.16003 Variety (Intercept) 0.024692 0.15714 Stand (Intercept) 0.88 0.94281 Residual 0.67 0.81650 Number of obs: 27, groups: Variety:Stand, 9; Variety, 3; Stand, 3 Fixed effects: Estimate Std. Error t value (Intercept) 7.1852 0.6919 10.38 2009/11/2 Douglas Bates > On Sun, Nov 1, 2009 at 9:01 AM, wenjun zheng wrote: > > Hi R Users, > > When I use package lme4 for mixed model analysis, I can't distinguish > > the significant and insignificant variables from all random independent > > variables. > > Here is my data and result: > > Data: > > > > > > Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), > > Variety=rep(rep(c("A1","A2","A3"),each=3),3), > > Stand=rep(c("B1","B2","B3"),9), > > Block=rep(1:3,each=9)) > >Rice.lmer<-lmer(Yield ~ (1|Variety) + (1|Stand) + (1|Block) + > > (1|Variety:Stand), data = Rice) > > > > Result: > > > > Linear mixed model fit by REML > > Formula: Yield ~ (1 | Variety) + (1 | Stand) + (1 | Block) + (1 | > > Variety:Stand) > > Data: Rice > > AIC BIC logLik deviance REMLdev > > 96.25 104.0 -42.1285.33 84.25 > > Random effects: > > GroupsNameVariance Std.Dev. > > Variety:Stand (Intercept) 1.345679 1.16003 > > Block (Intercept) 0.00 0.0 > > Stand (Intercept) 0.89 0.94281 > > Variety (Intercept) 0.024691 0.15714 > > Residual 0.67 0.81650 > > Number of obs: 27, groups: Variety:Stand, 9; Block, 3; Stand, 3; Variety, > 3 > > > Fixed effects: > >Estimate Std. Error t value > > (Intercept) 7.1852 0.6919 10.38 > > > Can you give me some advice for recognizing the significant variables > among > > random effects above without other calculating. > > Well, since the estimate of the variance due to Block is zero, that's > probably not one of the significant random effects. > > Why do you want to do this without other calculations? In olden days > when each model fit involved substantial calculations by hand one did > try to avoid fitting multiple models but now that is not a problem. > You can get a hint of which random effects will be significant by > looking at their precision in a "caterpillar plot" and then fit the > reduced model and use anova to compare models. See the enclosed > > >Any suggestions will be appreciated. > > Wenjun > > > >[[alternative HTML version deleted]] > > > > __ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] levelplot
Hi, R Users When I use the default package "lattice", I found a problem about adjusting the Figure Margin that can be changed by par(mai or mar) in traditional plots. So it's hard for me to add top and right axis. Any suggestions will be appreciated. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to uninstall R packages
Dear all, I am puzzled that how can i uninstall a R package that have been installed earlier (especially in MacOS). Any suggestion will be appreciated. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] MacOS X binary of package cairoDevice
Dear Michael and all R users, I find that there's no MacOS X binary of package cairoDevice on CRAN now. Can you or anybody else give me an older MacOS X edition for cairoDevice. Thank you. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] extract R-squared and P-value from lm results
Hi, R Users I find a problem in extracting the R-squared and P-value from the lm results described below (in Italic), *Residual standard error: 2.25 on 17 degrees of freedom* *Multiple R-squared: 0.001069, Adjusted R-squared: -0.05769 * *F-statistic: 0.01819 on 1 and 17 DF, p-value: 0.8943 * * * Any suggestions will be appreciated. Thanks. Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] extract R-squared and P-value from lm results
Thanks, I get it. Wenjun, ZHENG 2010/1/29 Dennis Murphy > > x <- 1:10 > > y <- 2 + 1.5 * rnorm(10, x, 2) > > m <- lm(y ~ x) > > summary(m)$r.squared > [1] 0.6056889 > > anova(m)$'Pr(>F)' > [1] 0.0080142NA > > Components of the summary() and anova() methods of lm() can be extracted. > See > > names(summary(m)) > names(anova(m)) > > to see the components one can extract. > > HTH, Dennis > > > On Fri, Jan 29, 2010 at 6:04 AM, wenjun zheng wrote: > >> Hi, R Users >> >> I find a problem in extracting the R-squared and P-value from the lm >> results >> described below (in Italic), >> >> *Residual standard error: 2.25 on 17 degrees of freedom* >> *Multiple R-squared: 0.001069, Adjusted R-squared: -0.05769 * >> *F-statistic: 0.01819 on 1 and 17 DF, p-value: 0.8943 * >> * >> * >> Any suggestions will be appreciated. Thanks. >> >> Wenjun >> >>[[alternative HTML version deleted]] >> >> __ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Rename R package name on R-Forge
Hi, R Users, Can maintainer rename the package on F-Forge? Any suggestions will be appreciated. Wenjun -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to add example data to R package
Dear R Users, I want to add an data in raw type to my package, so it can not be loading by data(), and if I put it in the 'data' subdirectory, it will be missed after the package built. How to put a raw data into a package? Any suggestions will be appreciated. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Symbols in R
Hi R Users, I want to distinguish different condition by different symbols by pch in function grid.points, but the symbols needed should be with solid or hollow, in this way only 21 to 25 in pch worked, is there any other symbols could be used like this? or does it exist any other way to draw symbols? Any suggestions will be appreciated. Best regards. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.