Re: [R] model non-integer count outcomes

2015-07-21 Thread Don McKenzie
Sorry. Central limit theorem. Enough averaging and you get a normal distribution (simply stated, perhaps too simply). If so others will correct me before long. :-( Sent from my iPad > On Jul 21, 2015, at 8:52 PM, Wensui Liu wrote: > > what does CLT stand for? > >> On Tue, Jul 21, 2015 at 11

Re: [R] model non-integer count outcomes

2015-07-21 Thread Don McKenzie
Or if there are enough averages of enough counts, the CLT provides another option. > On Jul 21, 2015, at 8:38 PM, David Winsemius wrote: > > > On Jul 21, 2015, at 8:21 PM, Wensui Liu wrote: > >> Dear Lister >> When the count outcomes are integers, we could use either Poisson or >> NB regressi

Re: [R] glm help - final predictor variable NA

2015-07-21 Thread Don McKenzie
> On Jul 21, 2015, at 7:30 PM, Rolf Turner wrote: > > > Psigh! Why do people think that it is perfectly OK to undertake statistical > analyses without knowing or understanding any statistics? > (I guess it's slightly less dangerous than undertaking to do your own wiring > without knowing any

Re: [R] model non-integer count outcomes

2015-07-21 Thread David Winsemius
On Jul 21, 2015, at 8:21 PM, Wensui Liu wrote: > Dear Lister > When the count outcomes are integers, we could use either Poisson or > NB regression to model them. However, there are cases that the count > outcomes are non-integers, e.g. average counts. > I am wondering if it still makes sense to

[R] model non-integer count outcomes

2015-07-21 Thread Wensui Liu
Dear Lister When the count outcomes are integers, we could use either Poisson or NB regression to model them. However, there are cases that the count outcomes are non-integers, e.g. average counts. I am wondering if it still makes sense to use Poisson or NB regression to model these non-integer out

Re: [R] How to make a persistence landscape in R?

2015-07-21 Thread David Winsemius
On Jul 21, 2015, at 10:39 AM, lstat wrote: > Hi there, > I am trying to construct a persistence landscape in R that shows all of the > overlapping triangles -- not just the overall silhouette-- how can you do > this? > Everytime I plug in the code I get one big triangle that corresponds to the >

Re: [R] glm help - final predictor variable NA

2015-07-21 Thread Rolf Turner
Psigh! Why do people think that it is perfectly OK to undertake statistical analyses without knowing or understanding any statistics? (I guess it's slightly less dangerous than undertaking to do your own wiring without knowing anything about being an electrician, but still ) However, to

Re: [R] removing entries from a character vector

2015-07-21 Thread Sarah Goslee
See ?grepl If you'd like a more detailed answer, here are some suggestions for creating a good reproducible example: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Sarah On Tue, Jul 21, 2015 at 4:00 PM, thok12 wrote: > ok this is a textbook question but i

[R] removing entries from a character vector

2015-07-21 Thread thok12
ok this is a textbook question but i feel kind of lost so any help would be appreciated. I have a character vector with couple of hundreds of observations about 60 of them are in the following fashion "total June15" "total July 15" "total July 17" etc. now I want to remove these entries but not

[R] R version update

2015-07-21 Thread klerer
Dear Ladies and Gentlemen, as a beginner in R, I encountered a sort of "naturally given limits"concerning the process of amending R with packages. I apparently own version 3.0.2 and I principally decided to use R via the RKWard GUI on Linux Kubuntu Trusty Tahr; the R version installed on my comput

[R] problems with rgp, examples from documentation won't produce expected results

2015-07-21 Thread Bernd
I am currently playing with the rgp package, trying to find out how the symbolic regression works but I am having trouble getting any reasonable results. I have found this pdf: https://cran.r-project.org/web/packages/rgp/vignettes/rgp_introduction.pdf and am currently trying to follow the pendulu

[R] How to make a persistence landscape in R?

2015-07-21 Thread lstat
Hi there, I am trying to construct a persistence landscape in R that shows all of the overlapping triangles -- not just the overall silhouette-- how can you do this? Everytime I plug in the code I get one big triangle that corresponds to the largest barcode, but I cannot see any of the smaller bar

[R] glm help - final predictor variable NA

2015-07-21 Thread matthewjones43
Hi, I am not a statistician and so I am sure whatever it is I am doing wrong must be an obvious error for those who are...Basically I can not understand why I get NA for variable 'CDSTotal' when running a glm? Does anyone have an idea of why this might be happening? Call: glm(formula = cbind(SRAS

Re: [R] Warning message with maxLik()

2015-07-21 Thread Maram SAlem
Dear Arne, The elements of the theta vector are indeed strictly positive. I've just tried to use instead : lamda = log (theta), which means that theta = exp (lamda), so as to get rid of the log() function that appears in the log-likelihood and is causing the 50 warnings, but still the estimate

[R] A strange problem using pls package

2015-07-21 Thread PO SU
Dear expeRts,      Today i used the pls package to do the PLSR,  i don' t know if anyone happen to have the same problem as me, it is so strange, my problem is:  when i used codes like:  suppose data has 20 columns   traindata <- data[ 1:10, 1:10]  testdata <- data[11:15,1:10]   pls.fit <- pls

Re: [R] SPOT install error

2015-07-21 Thread David Winsemius
On Jul 21, 2015, at 8:43 AM, William Morgan wrote: > I’m having trouble installing the SPOT R package for microarray image > analysis. I’m awaiting a response from the packager developer, but wanted to > see if anyone here has successfully used CSIRO’s SPOT software. > > I’ve been following th

Re: [R] Cannot install contributed package MTS

2015-07-21 Thread Duncan Murdoch
On 21/07/2015 1:46 PM, AGUSTIN ALONSO RODRIGUEZ wrote: > Dear Sirs: > > > > I have attempted to install the contributed package MTS, but without > success. > > > > I am using R.3.2.1, on Windows 8.1, after selecting Espa�ol as the > instalation language, on a Lenovo PC, 64 bits. > > > >

[R] Cannot install contributed package MTS

2015-07-21 Thread AGUSTIN ALONSO RODRIGUEZ
Dear Sirs: I have attempted to install the contributed package MTS, but without success. I am using R.3.2.1, on Windows 8.1, after selecting Espa�ol as the instalation language, on a Lenovo PC, 64 bits. If I use the instruction: install.packages(�MTS�) i get: > install.packages

Re: [R] Kruskal Wallis and pos-hoc Kruskal Wallis

2015-07-21 Thread Bert Gunter
Yes you are missing something -- the underlying ideas of post hoc tests. This is a statistics issue, not an R issue, and so off topic here. Try posting on a statistics forum like stats.stackexchange.com instead. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. A

[R] getURL not working in loop

2015-07-21 Thread Abhinaba Roy
Hi R helpers, I am trying to extract customer feedback from an e-commerce site and subsequently use it for creating a word cloud. Below is the code I have #web-crawling library(RCurl) library(XML) library(rvest) #web-crawling init=" http://www.flipkart.com/moto-g-2nd-generation/product-reviews/I

[R] Kruskal Wallis and pos-hoc Kruskal Wallis

2015-07-21 Thread Raquel Mendes
Hi all, I performed a Kruskal-Wallis test on 4 groups, 13 variables, using kruskal.test. I then applied a pos-hoc on the variables significant at p<0.05, using kruskalmc. The problem is that two of the significant variables on the kruskal-wallis test (with p=0.03276 and p=0.03537) didn´t showed si

[R] R Course in Dublin (September 14-16)

2015-07-21 Thread Antony Unwin
Details at http://insightsc.ie/training/r-statistical-software/ Antony Unwin University of Augsburg, Germany and Insight Statistical Consulting, Dublin, Ireland [[alternative HTML version deleted]] ___

Re: [R] SPOT install error

2015-07-21 Thread Duncan Murdoch
On 21/07/2015 11:43 AM, William Morgan wrote: > I’m having trouble installing the SPOT R package for microarray image > analysis. I’m awaiting a response from the packager developer, but wanted to > see if anyone here has successfully used CSIRO’s SPOT software. > > I’ve been following the devel

[R] SPOT install error

2015-07-21 Thread William Morgan
I’m having trouble installing the SPOT R package for microarray image analysis. I’m awaiting a response from the packager developer, but wanted to see if anyone here has successfully used CSIRO’s SPOT software. I’ve been following the developer’s "Spot Installation Instructions for Linux and Un

Re: [R] Knitr: setting echo = FALSE globally [RESOLVED]

2015-07-21 Thread Rich Shepard
On Tue, 21 Jul 2015, John Kane wrote: It sounds like your approach with the chunks is equivalent to my approach. Somewhere I remember reading that the global chunk commands apply to everything 'after' the global command--which once one thinks about it is sensible . John, Yes, it makes sense

Re: [R] Knitr: setting echo = FALSE globally [RESOLVED]

2015-07-21 Thread John Kane
Hi Rich, It sounds like your approach with the chunks is equivalent to my approach. Somewhere I remember reading that the global chunk commands apply to everything 'after' the global command--which once one thinks about it is sensible . Glad it's working. R +knitr does save a lot of time once

Re: [R] Knitr: setting echo = FALSE globally [RESOLVED]

2015-07-21 Thread Rich Shepard
On Mon, 20 Jul 2015, John Kane wrote: I have no idea wha that chunk is not working but I think you can get the same result using the old method Stick the following in an ERT box: <>= opts_chunk$set(echo = FALSE) @ John, My original response was too large (3 attached PDF files) and was held

[R] calculate adjacent log odds for a table

2015-07-21 Thread Michael Friendly
This is a question about array and data frame manipulation and calculation, in the context of models for log odds in contingency tables. I have a data frame representing a 3-way frequency table, of size 5 (litter) x 2 (treatment) x 3 (deaths). "Freq" is the frequency in each cell, and deaths i

Re: [R] combining columns into a "combination index" of the same length

2015-07-21 Thread Emmanuel Levy
Thanks Thierry, you made my day :) On 21 July 2015 at 17:00, Thierry Onkelinx wrote: > Please always keep the mailing list in cc. > > If mat is a data.frame, then you can use do.call. Then the number of > columns doesn't matter. > > do.call(paste, mtcars[, c("mpg", "cyl")]) > do.call(paste, mtc

Re: [R] combining columns into a "combination index" of the same length

2015-07-21 Thread Thierry Onkelinx
Please always keep the mailing list in cc. If mat is a data.frame, then you can use do.call. Then the number of columns doesn't matter. do.call(paste, mtcars[, c("mpg", "cyl")]) do.call(paste, mtcars[, c("mpg", "cyl", "disp")]) do.call(paste, mtcars) ir. Thierry Onkelinx Instituut voor natuur-

Re: [R] combining columns into a "combination index" of the same length

2015-07-21 Thread Thierry Onkelinx
Yes. paste0() can work on vectors. So paste0(mat[, col1], mat[, col2]) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in t

[R] barplot -issues with axis and labels not appearing

2015-07-21 Thread Pierre Micallef
Hi I am experiencing a few issues with the barplot function. I have written the following code; barplot(as.matrix(GEP.data2), beside=TRUE, main="Global Portfolio Weights", col.main="gray", col=blues9, cex.axis=0.1, ylim=c(-1,1), las=2, cex.lab=1, cex=0.8) where; > GEP.data2

Re: [R] Why does dredge() rank models differently for lmer() and MCMCglmm()?

2015-07-21 Thread Corina
Hi Ben, Thank you so much for your helpful advice! I changed the lmer model to REML=FALSE and the best-fitting model in dredge is MUCH more similar to what I found with MCMCglmm. My best, Corina -- Dr. Corina Logan Leverhulme Early Career Research Fellow Department of Zoology University of C

Re: [R] Why does dredge() rank models differently for lmer() and MCMCglmm()?

2015-07-21 Thread Corina
Hi Bert, Thanks for the model selection philosophy! It’s definitely not a perfect world in terms of trying to understand the “truth", but I find that there are so many opinions about how to do model selection that I just choose one and go with it :) My best, Corina -- Dr. Corina Logan Leverh

[R] combining columns into a "combination index" of the same length

2015-07-21 Thread Emmanuel Levy
Hi, The answer to this is probably straightforward, I have a dataframe and I'd like to build an index of column combinations, e.g. col1 col2 --> col3 (the index I need) A 1 1 A 1 1 A 2 2 B 1 3 B 2 4 B 2 4 At th

[R] plot auto key and text into panels using lattice

2015-07-21 Thread Duncan Mackay
Forgot to send to list Plus forgot to say that I appear to have no problems with script below Hi Luigi It is helpful to use a MWE - you had several errors in the script. try these (adapting fig 5.11 from Deepayan Sarkar's book data(SeatacWeather, package = "latticeExtra") str(SeatacWeather)

Re: [R] R: Re: R: Re: R: Re: Differences in output of lme() when introducing interactions

2015-07-21 Thread John Kane
Have you been asking statistics related questiongs on StackExchange? I must say I had the luxury when at school that we had a very strong (free) stats consulting service. I was the envy of several friends at other universities and I suspect we (many depts of the university) turned out better wo

Re: [R] [FORGED] change text size on a graphics

2015-07-21 Thread John Kane
Following some of the basic advice in these links can save a lot of time and make answering questions much easier. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON Canada > -Original

Re: [R] help with contributed package MTS

2015-07-21 Thread Sarah Goslee
Please reply to the list, not just me. Have you installed the requirements? Please also do the other thing I originally suggested, which is post your sessionInfo.(). On Tuesday, July 21, 2015, AGUSTIN ALONSO RODRIGUEZ < aalo...@rcumariacristina.com> wrote: > Dear Ms Goslee: > > Thank you very m

[R] R: Re: R: Re: R: Re: Differences in output of lme() when introducing interactions

2015-07-21 Thread angelo.arc...@virgilio.it
Dear Michael, thanks a lot. I am studying the marginality and I came across to this post: http://www.ats.ucla.edu/stat/r/faq/type3.htm Do you think that the procedure there described is the right one to solve my problem? Would you have any other online resources to suggest especially dealing wi

Re: [R] R: Re: R: Re: Differences in output of lme() when introducing interactions

2015-07-21 Thread Michael Dewey
Dear Angelo I suggest you do an online search for marginality which may help to explain the relationship between main effects and interactions. As I said in my original email this is a complicated subject which we are not going to retype for you. If you are doing this as a student I suggest

[R] R: Re: R: Re: Differences in output of lme() when introducing interactions

2015-07-21 Thread angelo.arc...@virgilio.it
Dear Bert, thank you for your feedback. Can you please provide some references online so I can improve "my ignorance"? Anyways, please notice that it is not true that I do not know statistics and regressions at all, and I am strongly convinced that my question can be of interest for some one else

Re: [R] [FORGED] change text size on a graphics

2015-07-21 Thread Jim Lemon
Hi Carol, You can use "hist" to get the counts in each interval, but try "barplot" to get the larger bar labels: barpos<-barplot(hist.result$counts,space=0) barlabels(barpos,hist.result$counts+0.1,hist.result$counts, prop=1,border=NA,cex=2) axis(1,at=1:6-0.5,labels=paste(hist.result$breaks[1:6],

Re: [R] R GUI tklistbox get value

2015-07-21 Thread jpara3
Thanks mr FOX, now it works perfect!!! -- View this message in context: http://r.789695.n4.nabble.com/R-GUI-tklistbox-get-value-tp4710064p4710123.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list --

Re: [R] [FORGED] change text size on a graphics

2015-07-21 Thread carol white via R-help
Hi,I use hist. If I usehist.result = hist(c(14,20,9,31,17), plot = F)plot(hist.result, labels = T, cex = 2) #doesn't increase the font size of all text on the plot: axis annotation, axis labels, count labels on top of the bars plot(hist.result, labels = T, cex.axis = 2, cex.label = 2, cex.main

Re: [R] using dcast with a function of multiple arguments

2015-07-21 Thread Thierry Onkelinx
Here is a solution using dplyr require(data.table) dt <- as.data.table(mtcars) library(dplyr) library(tidyr) dt %>% group_by(carb, cyl) %>% summarise(WM = weighted.mean(x = mpg, w = wt)) %>% spread(cyl, WM) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Researc

Re: [R] [FORGED] change text size on a graphics

2015-07-21 Thread Jim Lemon
Hi Carol, If you are using the "barlabels" function in the plotrix package, just add the usual "cex" argument to the call. Using the first example in the help page: heights<-c(14,20,9,31,17) barpos<-barplot(heights,main="A redundant bar plot") barlabels(barpos,heights+1,prop=1,cex=1.5) Jim On T