Re: [R] package to fit mixtures of student-t distributions

2017-06-29 Thread Mark Leeds
Hi: The R package below may be of use to you. https://journal.r-project.org/archive/2009-1/RJournal_2009-1_Ardia+et+al.pdf On Thu, Jun 29, 2017 at 12:15 PM, Ranjan Maitra wrote: > Would package "teigen" help? > > Ranjan > > On Thu, 29 Jun 2017 14:41:34 +0200 vare vare via R-help < > r-help@r-p

Re: [R] Different date formats in one column

2017-06-29 Thread Farnoosh Sheikhi via R-help
Thanks Jeff. This is a nice way of solving this problem. What about the cases with 0015-02-21?Many thanks. Best,Farnoosh On Wednesday, June 28, 2017 10:49 PM, Jeff Newmiller wrote: I doubt your actual file looks like the mess that made it to my email software (below) because you pos

Re: [R] Different date formats in one column

2017-06-29 Thread Farnoosh Sheikhi via R-help
Hi Christoph, There is "," between dates.Many thanks. Best,Farnoosh On Wednesday, June 28, 2017 9:05 PM, Christoph Puschmann wrote: Hey, Are all the dates connected? So no comma or space btw? Regards, Christoph > On 29 Jun 2017, at 2:02 pm, Farnoosh Sheikhi via R-help > wrote: >

[R] Packages for Learning Algorithm Independent Branch and Bound for Feature Selection

2017-06-29 Thread Alex Byrley
I am looking for packages that can run a branch-and-bound algorithm to maximize a distance measure (such as Bhattacharyya or Mahalanobis) on a set of features. I would like this to be learning algorithm independent, so that the method just looks at the features, and selects the subset of a user-de

Re: [R] package to fit mixtures of student-t distributions

2017-06-29 Thread vare vare via R-help
I don’t see how neither a) or b) applies to this question nor the technical merit of the remark about mixture models. Do you have a suggestion for a more appropriate forum for this issue/question? (stackoverflow basically sent me here). Kind regards > On 29. Jun 2017, at 16:58, Bert Gunter w

Re: [R] package to fit mixtures of student-t distributions

2017-06-29 Thread Ranjan Maitra
Would package "teigen" help? Ranjan On Thu, 29 Jun 2017 14:41:34 +0200 vare vare via R-help wrote: > Hello! > > I am new to R (before used python exclusively and would actually call the R > solution for this issue inside a python notebook, hope that doesn’t > disqualify me right of the batc

Re: [R] Different date formats in one column

2017-06-29 Thread Jeff Newmiller
Left as an exercise for the student. -- Sent from my phone. Please excuse my brevity. On June 29, 2017 7:25:36 PM EDT, Farnoosh Sheikhi wrote: >Thanks Jeff. This is a nice way of solving this problem. What about the >cases with 0015-02-21?Many thanks. Best,Farnoosh > > > >On Wednesday, June 28

[R] plot3D color ramp not working as expected

2017-06-29 Thread Waichler, Scott R
Hi, I want to use a discrete color ramp with plot3D, and show NA values as white (default). I get unexpected results per the following. # as in help(slice3D) example: par(mfrow = c(2,2)) x <- y <- z <- seq(-1, 1, by = 0.1) grid <- mesh(x, y, z) colvar <- with(grid, x*exp(-x^2 - y^2 - z^2)) slice

Re: [R] about reading files in order

2017-06-29 Thread lily li
Thanks also. On Thu, Jun 29, 2017 at 2:12 PM, Adams, Jean wrote: > Thanks for that answer. > I was not aware of gtools::mixedsort > > function. > > Jean > > On Thu, Jun 29, 2017 at 2:47 PM, Henrik Bengtsson < > henr

Re: [R] about reading files in order

2017-06-29 Thread Adams, Jean
Thanks for that answer. I was not aware of gtools::mixedsort function. Jean On Thu, Jun 29, 2017 at 2:47 PM, Henrik Bengtsson < henrik.bengts...@gmail.com> wrote: > You can use: > > > files <- list.files(path = "fol

Re: [R] about reading files in order

2017-06-29 Thread Henrik Bengtsson
You can use: > files <- list.files(path = "folder01") > files <- gtools::mixedsort(files) to order the files in a "human-friendly" order rather than lexicographic order (which sort() provides). FYI 1; it's preferred to use file.path("folder01", list[i]) rather than paste('folder01',lists[i],sep=

[R] about reading files in order

2017-06-29 Thread lily li
Hi R users, I have a question about opening the txt files and putting them into a matrix. The txt files are in the folder01, while they have the name file.1.txt, file.2.txt, file.3.txt, etc. There are about 200 such text files. Each txt file contains one value inside. When I tried to use the code b

Re: [R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model

2017-06-29 Thread Jay Zola
Link Dropbox R code: https://www.dropbox.com/s/9u6e89t6dq39r53/Rcode%20metaregression.docx?dl=0 Rcode metaregression.docx www.dropbox.com Shared with Dropbox Link Dropbox part of dataset: https://www.dropbox.com/s/j

Re: [R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model

2017-06-29 Thread Viechtbauer Wolfgang (SP)
The code in your mail in a mangled mess, since you posted in HTML. Please configure your email client to send emails in plain text. Could you explain what exactly you mean by "Currently it is using a mixed effects model. Is it possible to change the code so a random effects model is used?" Be

[R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model

2017-06-29 Thread Jay Zola
Hello, I am writing a meta-analysis on the complication and reoperation rates after 5 treatment modalities of a distal radius fracture. I have a code to compare the complication and reoperation rates. Currently it is using a mixed effects model. Is it possible to change the code so a random ef

Re: [R] Creating two groups of random numbers

2017-06-29 Thread Michael Dewey
Please do not cross post as people waste time replying on one forum not knowing you have already received excellent advice on another. On 29/06/2017 14:44, Naike Wang wrote: Hi all, I want to create two groups of random numbers to calculate proportions. The first group is to represent the numbe

Re: [R] Creating two groups of random numbers

2017-06-29 Thread Boris Steipe
I'd do it this way ... let me know if you need explanations. minSize <- 15 maxSize <- 100 minSample <- 0.1 maxSample <- 0.8 # setup dataframe with totals, and cases as fractions myStudies <- data.frame(study = 1:Nstudies, cases = runif(Nstudies,

Re: [R] package to fit mixtures of student-t distributions

2017-06-29 Thread Bert Gunter
Offlist, because this is (a) an opinion and (b) about statistics and therefore offtopic. I don't know whether any such package exists, but I would predict that this is likely to be overdetermined (too many parameters) and therefore unlikely to be a successful strategy. Fitting a mixture of Gaussia

[R] package to fit mixtures of student-t distributions

2017-06-29 Thread vare vare via R-help
Hello! I am new to R (before used python exclusively and would actually call the R solution for this issue inside a python notebook, hope that doesn’t disqualify me right of the batch). Right now I am looking for a piece of software to fit a 1D data sample to a mixture of t-distributions. I

[R] Creating two groups of random numbers

2017-06-29 Thread Naike Wang
Hi all, I want to create two groups of random numbers to calculate proportions. The first group is to represent the number of cases in a study. The second group is to represent the sample size of the study. Apparently, the sample size is going to have to be bigger or equal to the number of cases, b

[R] Creating two groups of random numbers

2017-06-29 Thread Naike Wang
Hi all, I want to create two groups of random numbers to calculate proportions. The first group is to represent the number of cases in a study. The second group is to represent the sample size of the study. Apparently, the sample size is going to have to be bigger or equal to the number of cases, b

Re: [R] help needed for RInside with Qt

2017-06-29 Thread Santosh Kumar
Hi Bert and Jeff, Thanks a lot for pointing it out. It is a commercial application. I would be distributing it. This makes R out of consideration. Thanks again for saving much time and effort. On Thu, Jun 29, 2017 at 10:22 AM, Jeff Newmiller wrote: > If you adhere to the terms of the license f

Re: [R] Different date formats in one column

2017-06-29 Thread Christoph Puschmann
Hey, Are all the dates connected? So no comma or space btw? Regards, Christoph > On 29 Jun 2017, at 2:02 pm, Farnoosh Sheikhi via R-help > wrote: > > Hi, > I have a data set with various date formats in one column and not sure how to > unify it.Here is a few formats: > 02091702/22/17022120

Re: [R] R package for scorecard development

2017-06-29 Thread Michael Friendly
Hi I'm sure there are valid reasons for wanting to use a scorecard model, but a more straightforward approach would just be a logistic regression or logistic discriminant analysis. Compared to that, a scorecard model can be considered to be throwing away information by binning the predictors.

Re: [R] Help : glm p-values for a factor predictor

2017-06-29 Thread Fox, John
Hi Michael, > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael > Friendly > Sent: Thursday, June 29, 2017 9:04 AM > To: Benoît PELE ; r-help@r-project.org > Subject: Re: [R] Help : glm p-values for a factor predictor > > On 6/29/17 11:13 AM, Ben

Re: [R] Help : glm p-values for a factor predictor

2017-06-29 Thread Michael Friendly
On 6/29/17 11:13 AM, Benoît PELE wrote: My question is about the factor predictors with several levels. R provides only the pvalues for each level whereas i need an overall pvalue for testing the predictor. What you ask is provided by anova() -- type I tests, and car::Anova() -- Type II & III

Re: [R] Help : glm p-values for a factor predictor

2017-06-29 Thread Benoît PELE
Thank you for your answer. The used code is the next one : champ_model<-c("y","categ_juridique","Indic_CTRLAUTRE_RPOS","Indic_CTRLAUTRE_RNEG","Indic_CTRLCCA_RPOS", "Indic_CTRLCCA_RNEG","Indic_CTRLCPAP_RPOS","Indic_CTRLCPAP_RNEG","Indic_CTRLLCTI_RPOS", "Indic_Changement_NomLogiciel","Indic_Cha

Re: [R] Changing ggplot2 legend key/title to custom text

2017-06-29 Thread PIKAL Petr
Hi I usually use google. It is quite powerful. Search ggplot legend title results in http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/ from which you could find a way how to modify legend. library(ggplot2) bp <- ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) + geom_boxplot() b

Re: [R] Changing ggplot2 legend key/title to custom text

2017-06-29 Thread BARLAS Marios 247554
Hi Petr and thanks for your reply, That's the problem I don't want to modify the labels of my legends but the title of the legend in itself inserting my custom text :) Take for example the 1st graph in this tutorial http://www.sthda.com/english/wiki/ggpubr-r-package-ggplot2-based-publication-re

Re: [R] Extraneous full stop in csv read

2017-06-29 Thread Duncan Murdoch
On 28/06/2017 7:30 PM, John wrote: I ran into a puzzling minor behaviour I would like to understand. Reading in a csv file, I find an extraneous "." after a column header, "in" [short for "inches"] thus, "in.". Is this due to "in" being reserved? I initially blamed this on RStudio or to processi

Re: [R] Changing ggplot2 legend key/title to custom text

2017-06-29 Thread PIKAL Petr
Hi There are plenty of examples https://stackoverflow.com/questions/6202667/how-to-use-subscripts-in-ggplot2-legends-r https://stackoverflow.com/questions/19507742/using-expressionpaste-to-insert-math-notation-into-a-ggplot-legend which you can modify. If you say "but it wont' seem to work" ho

[R] Changing ggplot2 legend key/title to custom text

2017-06-29 Thread BARLAS Marios 247554
Hi all, ok I have this issue: I want to change my graphs legends to custom text, often requiring the use of superscripts/subscripts I tried to use this instruction I found on stack overflow: labs(x = "R(Ohm)", y= "CDF", aesthetic= " Content (%)" ) but it wont' seem to work. Also tried bqu

Re: [R] Help : glm p-values for a factor predictor

2017-06-29 Thread Bob O'Hara
It might help if you provided the code you used. It's possible that you didn't use direction="backward" in stepAIC(). Or if you did, it was still running, so whatever else you try will still be slow. The statement "R provides only the pvalues for each level" is wrong: look at the anova() function.

[R] Help : glm p-values for a factor predictor

2017-06-29 Thread Benoît PELE
Hello, i am a newby on R and i am trying to make a backward selection on a binomial-logit glm on a large dataset (69000 lines for 145 predictors). After 3 days working, the stepAIC function did not terminate. I do not know if that is normal but i would like to try computing a "homemade" back

Re: [R] Finding optim.R function

2017-06-29 Thread ProfJCNash
The codes were taken from the 2nd edition of my book Compact Numerical Methods for Computers, where they are in Pascal. They were converted by p2c to c, so are pretty opaque and likely difficult to modify. Moreover, they are based on 1970s codes I wrote for the first edition. Why not look at optimr