Re: [R] Statistical distribution not fitting

2015-07-22 Thread Amelia Marsh via R-help
Dear Sir, Thanks for your great guidance. Made me realize that I need to think out of box. As regards the low losses, BASEL guidelines do say to get rid of such low losses which create noise in analysing the losses caused by Operational Loss events. Its the right tail events do matter which

Re: [R] interactive Map: Popups

2015-07-22 Thread MacQueen, Don
I would start by looking at the "Graphics" and "Web Technologies" entries in "Task Views" on CRAN. In addition, I suspect there might be some packages listed in the Spatial task view that could do this. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore,

[R] interactive Map: Popups

2015-07-22 Thread Marie-Louise
Hello, I am trying to build a map of a country which shows informations to its regions in a popup window as soon as someone clicks on a region. Thank you -- View this message in context: http://r.789695.n4.nabble.com/interactive-Map-Popups-tp4710226.html Sent from the R help mailing list archi

Re: [R] How to simulate informative censoring in a Cox PH model?

2015-07-22 Thread Greg Snow
I think that the Cox model still works well when the only information in the censoring is conditional on variables in the model. What you describe could be called non-informative conditional on x. To really see the difference you need informative censoring that depends on something not included i

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

2015-07-22 Thread Rolf Turner
On 23/07/15 01:15, Therneau, Terry M., Ph.D. wrote: 3. Should you ever use it [i.e. Type III SS]? No. There is a very strong inverse correlation between "understand what it really is" and "recommend its use". Stephen Senn has written very intellgently on the issues. Terry --- can you pl

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Boris Steipe
So - as you can see, your data can be modelled. Now the interesting question is: what do you do with that knowledge. I know nearly nothing about your domain, but given that the data looks log-normal, I am curious abut the following: - Most of the events are in the small-loss category. But most

[R] Same results in arules after changing support and confidence

2015-07-22 Thread jckhmmr
Hello, everyone! I'm new to R, so I'm sorry in advance if it's something obvious, but I still can't figure it out. I've started experimenting with apriori and everything was working fine, i.e. I changed support and confidence and results were different depending on combination. But on the next a

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Ben Bolker
Amelia Marsh yahoo.com> writes: > Hello! (I dont know if I can raise this query here on this forum, > but I had already raised on teh finance forum, but have not received > any sugegstion, so now raising on this list. Sorry for the same. The > query is about what to do, if no statistical distr

Re: [R] ggplot2 - Specifying Colors Manually

2015-07-22 Thread Hadley Wickham
Try this: ggplot(mydf,aes(x)) + geom_line(aes(y = y1, colour = "y1")) + geom_line(aes(y = y2, colour = "y2")) + scale_color_manual(values = c(y1 = "green4", y2 = "blue2")) Note that you don't need to use `mydf` and names in the manual scale should match the values in the aes() calls. Alsoi

Re: [R] Statistical distribution not fitting

2015-07-22 Thread Boris Steipe
Try: qqnorm(log(mydat)) That doesn't look too bad, does it? Now: where is the problem? Cheers, B. On Jul 22, 2015, at 12:41 PM, Amelia Marsh wrote: > Hello! > > (I dont know if I can raise this query here on this forum, but I had already > raised on teh finance forum, but have not receive

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

2015-07-22 Thread Ben Bolker
matthewjones43 kellogg.ox.ac.uk> writes: > > 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 o

[R] ggplot2 - Specifying Colors Manually

2015-07-22 Thread Abiram Srivatsa
Hi, Given a data frame, I'm trying to graph multiple lines on one graph, each line being a different color and each colored line corresponding to a specific name in the legend. Here is a very basic data sample to work with: x <- seq(0,40,10) y1 <- sample(1:50,5) y2 <- sample(1:50,5) mydf <-

[R] Statistical distribution not fitting

2015-07-22 Thread Amelia Marsh
Hello! (I dont know if I can raise this query here on this forum, but I had already raised on teh finance forum, but have not received any sugegstion, so now raising on this list. Sorry for the same. The query is about what to do, if no statistical distribution is fitting to data). I am into

[R] Ordering in Sankey diagram using R and googleVis

2015-07-22 Thread Angela via R-help
Hello, I am trying to figure out if there is a way to order the left side of a Sankey diagram from most frequent to least frequent. I am using R version 3.2.1 and using googleVis version 0.5.9 for the Sankey. I've tried sorting, but that does not work. Is there anyway to force it to arrange the

Re: [R] Langelier-Ludwig Plots

2015-07-22 Thread Rich Shepard
On Wed, 22 Jul 2015, Boris Steipe wrote: According to ... http://info.ngwa.org/gwol/pdf/721000139.PDF (Graphical Interpretation of Water Quality Data) ... a Langelier-Ludwig plot is simply a scatterplot of cations vs. anions (in percent). Surely that would be beyond trivial to produce in R.

Re: [R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Sarah Goslee
Please reply to the list, not me. The list doesn't allow most attachments (and most of the list recipients are highly unlikely to open unsolicited binary files anyway). Do see the link I provided for the appropriate way to create reproducible examples, including providing data (hint: use dput(), an

Re: [R] Read ".xlsx" and convert date-column value into Dataframe

2015-07-22 Thread jim holtman
forgot the reply to all: These are serial dates within EXCEL. Here is a way of converting them: > as.Date(c(42460, 42426), origin = '1899-12-30') [1] "2016-03-31" "2016-02-26" Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how

Re: [R] Error in "rownames"

2015-07-22 Thread David Winsemius
On Jul 22, 2015, at 12:50 AM, JIALU YAO wrote: > Hello, > > When I type the code *rownames(gene_exp_matrix)<-levels(geneidfactor)*,the > error happens: Error in "rownames<-(*tmp*,value=character(0)):can not set > object to 'rownames'. > > I am using Mac OS X10.10.2. > > How can I fix this prob

Re: [R] Read ".xlsx" and convert date-column value into Dataframe

2015-07-22 Thread John McKown
Those numbers are a "serial" number of days. A value of 1 maps to Jan 1, 1900. ref: https://support.office.com/en-za/article/DATE-function-e36c0c8c-4104-49da-ab83-82328b832349 A formula such as: as.Date('1900-01-01')+excel_date-1 should convert the serial value to a date value. On Wed, Jul 22, 20

Re: [R] Langelier-Ludwig Plots

2015-07-22 Thread Boris Steipe
According to ... http://info.ngwa.org/gwol/pdf/721000139.PDF (Graphical Interpretation of Water Quality Data) ... a Langelier-Ludwig plot is simply a scatterplot of cations vs. anions (in percent). Surely that would be beyond trivial to produce in R. Or am I missing a subtle something? Che

Re: [R] Read ".xlsx" and convert date-column value into Dataframe

2015-07-22 Thread Ivan Calandra
Hi Antony, I am not sure it could work easily with package xlsx. Try using the function read_excel() from package readxl. This function allows for Dates to be read. HTH, Ivan -- Ivan Calandra, ATER University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100

[R] Langelier-Ludwig Plots

2015-07-22 Thread Rich Shepard
My web search for an R package producing Langelier-Ludwig plots found no hits. Has this been implemented in base graphics, lattice, ggplot2, or another package? The reference: Langelier, W., and Ludwig, H., 1942, Graphical methods for indicating the mineral character of natural waters: J. Am

Re: [R] Error in "rownames"

2015-07-22 Thread Sarah Goslee
Without a reproducible example that includes some sample data (fake is fine), the code you used, and some clear idea of what output you expect, it's impossible to figure out how to help you. Here are some suggestions for creating a good reproducible example: http://stackoverflow.com/questions/59632

[R] Read ".xlsx" and convert date-column value into Dataframe

2015-07-22 Thread R_Antony
Hi, Here i am having a ".xlsx" file and it contains various columns including date-column[mm/dd/yy]-but it is not in the date format. I have to read this excel[.xlsx] file and need to get in dataframe. So i used "xlsx"-liabrary and it was fine to read data. But the problem is, values in the date c

[R] [R-pkgs] SDR package for Subgroup Discovery on CRAN

2015-07-22 Thread amgv0009
Package SDR for subgroup discovery data mining is available on CRAN now. More info of the package on the CRAN page: https://cran.r-project.org/web/packages/SDR/index.html Ángel. [[alternative HTML version deleted]] ___ R-packages mailin

[R] Error in "rownames"

2015-07-22 Thread JIALU YAO
Hello, When I type the code *rownames(gene_exp_matrix)<-levels(geneidfactor)*,the error happens: Error in "rownames<-(*tmp*,value=character(0)):can not set object to 'rownames'. I am using Mac OS X10.10.2. How can I fix this problem? Thank a lot. Yao -- View this message in context: http:/

[R] How to simulate informative censoring in a Cox PH model?

2015-07-22 Thread Daniel Meddings
I wish to simulate event times where the censoring is informative, and to compare parameter estimator quality from a Cox PH model with estimates obtained from event times generated with non-informative censoring. However I am struggling to do this, and I conclude rather than a technical flaw in my

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

2015-07-22 Thread John Kane
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 Message- > From: l.shul...@hotmail.com > Sent: Tue, 21 Jul 2015 10:39:45 -0700 (PDT) > To: r-help@r-project.org

Re: [R] calculate adjacent log odds for a table

2015-07-22 Thread Michael Friendly
On 7/21/2015 11:14 AM, Michael Friendly wrote: More generally, for an I x J x K table, where the last factor is the response, my desired result is a data frame of IJ(K-1) rows, with adjacent log odds in a 'logodds' column, and ideally, I'd like to have a general function to do this. Note that if

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

2015-07-22 Thread Marc Schwartz
Hi, In addition to Terry’s great comments below, as this subject has come up frequently over the years, there is also a great document by Bill Venables that is valuable reading: Exegeses on Linear Models http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf Regards, Marc Schwartz > On Jul 2

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

2015-07-22 Thread angelo.arc...@virgilio.it
Dear Terry, I am very grateful to you for such a detailed and helpful answer. Following your recommendation then I will skip the method presented at http://www.ats.ucla.edu/stat/r/faq/type3.htm So far, based on my understanding of R I arrived to the conclusion that the correct way to see if ther

Re: [R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Sarah Goslee
On Wed, Jul 22, 2015 at 9:50 AM, Jomy Jose wrote: > How to calculate the sensitivity,specificity,Youden index for 18 factors > and their combination (6 factors in each) with an outcome measure. www.rseek.org turns up a bunch of references to Youden index, including packages. Without a reproducib

[R] Sensitivity,Specificity and Youden Index

2015-07-22 Thread Jomy Jose
How to calculate the sensitivity,specificity,Youden index for 18 factors and their combination (6 factors in each) with an outcome measure. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

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

2015-07-22 Thread Therneau, Terry M., Ph.D.
"Type III" is a peculiarity of SAS, which has taken root in the world. There are 3 main questions wrt to it: 1. How to compute it (outside of SAS). There is a trick using contr.treatment coding that works if the design has no missing factor combinations, your post has a link to such a descri

[R] Fwd: Warning message with maxLik()

2015-07-22 Thread marammagdysalem
Sent from my iPhone Begin forwarded message: > From: Maram SAlem > Date: July 21, 2015 at 11:40:56 PM GMT+2 > To: Arne Henningsen > Cc: "r-help@r-project.org" > Subject: Re: [R] Warning message with maxLik() > > Dear Arne, > > The elements of the theta vector are indeed strictly positive.

Re: [R] R version update

2015-07-22 Thread Ista Zahn
On Jul 21, 2015 9:30 PM, wrote: > > 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

Re: [R] model non-integer count outcomes

2015-07-22 Thread Wensui Liu
Thanks Thierry What if I don't know the n in the offset term? On Wednesday, July 22, 2015, Thierry Onkelinx wrote: > If you know the number of counts (n) used to calculate the average then you > can still use a poisson distribution. > > Total = average * n > glm(total ~ offset(n), family = poiss

Re: [R] model non-integer count outcomes

2015-07-22 Thread peter dalgaard
> On 22 Jul 2015, at 06:48 , Don McKenzie wrote: > > Sorry. Central limit theorem. Or some sort of vegetarian sandwich. Celery, Lettuce, Tomato sounds almost edible with sufficient mayo. ;-) > Enough averaging and you get a normal distribution (simply stated, perhaps > too simply). If so oth

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

2015-07-22 Thread Jim Lemon
Hi lstat, The problem may be that as you are adding your connector triangles there is a fill color. Try reprogramming with col=NA if you are using "polygon" to draw the connectors. Jim On Wed, Jul 22, 2015 at 12:49 PM, David Winsemius wrote: > > On Jul 21, 2015, at 10:39 AM, lstat wrote: > >> H

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

2015-07-22 Thread Jim Lemon
Hi Pierre, I get a reasonable plot using the following code: par(mar=c(6,4,4,2)) barpos<-barplot(unlist(GEP.data2), main="Global Portfolio Weights", col.main="gray", col=blues9, cex.axis=1, ylim=c(-1,1), las=2, cex.lab=1, cex=0.8) axis(1,at=barpos,labels=rep("",8)) For one thing, you don't ne

Re: [R] model non-integer count outcomes

2015-07-22 Thread Thierry Onkelinx
If you know the number of counts (n) used to calculate the average then you can still use a poisson distribution. Total = average * n glm(total ~ offset(n), family = poisson) ​ ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie &