[R] Help understanding why glm and lrm.fit runs with my data, but lrm does not

2017-09-14 Thread Bonnett, Laura
Dear all, I am using the publically available GustoW dataset. The exact version I am using is available here: https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk I would like to produce a nomogram for 5 covariates - AGE, HYP, KILLIP, HRT and ANT. I have successfully fitted a logist

[R] Print All Warnings that Occurr in All Parallel Nodes

2017-09-14 Thread TELLERIA RUIZ DE AGUIRRE, JUAN
Dear R Users, I have developed the following code for importing a series of zipped CSV by parallel computing. My problems are that: A) Some ZIP Files (Which contain CSVs inside) are corrupted, and cannot be opened. B) After executing parRapply I can only see the last.warning variable error, f

Re: [R] Help understanding why glm and lrm.fit runs with my data, but lrm does not

2017-09-14 Thread Jan van der Laan
With lrm.fit you are fitting a completely different model. One of the things lrm does, is preparing the input for lrm.fit which in this case means that dummy variables are generated for categorical variables such as 'KILLIP'. The error message means that model did not converge after the maxi

[R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Alexander Shenkin
Hello all, I am trying to decide how to structure an R package. Specifically, do I use OO classes, or just provide functions? If the former, how should I structure the objects in relation to the type of data the package is intended to manage? I have searched for, but haven't found, resourc

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread PIKAL Petr
Hi I do not consider myself as an expert in field of R package programming but if your data are rectangular, why not use data.frames. OTOH if they are structured in free form (something like lm result) you could use lists. Did you read this? https://cran.r-project.org/doc/contrib/Leisch-Creati

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Hadley Wickham
I just finished the first draft of the chapters on OO programming for the 2nd edition of "Advanced R": https://adv-r.hadley.nz - you might find them helpful. Hadley On Thu, Sep 14, 2017 at 7:58 AM, Alexander Shenkin wrote: > Hello all, > > I am trying to decide how to structure an R package. Sp

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Hadley Wickham
> Did you read this? > https://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf > > Maybe it could give you some insight in how to create package. That resource is ~9 years old. There are more modern treatments available. You can read mine at http://r-pkgs.had.co.nz. Hadley -- http:/

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread PIKAL Petr
Hi Hadley Yes, I found it too quite easily by Google. Cheers Petr > -Original Message- > From: Hadley Wickham [mailto:h.wick...@gmail.com] > Sent: Thursday, September 14, 2017 3:33 PM > To: PIKAL Petr > Cc: Alexander Shenkin ; r-help > Subject: Re: [R] To implement OO or not in R packa

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Alexander Shenkin
Did you read this? https://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf Maybe it could give you some insight in how to create package. That resource is ~9 years old. There are more modern treatments available. You can read mine at http://r-pkgs.had.co.nz. Hadley Thanks both.

Re: [R] Help understanding why glm and lrm.fit runs with my data, but lrm does not

2017-09-14 Thread David Winsemius
> On Sep 14, 2017, at 12:30 AM, Bonnett, Laura > wrote: > > Dear all, > > I am using the publically available GustoW dataset. The exact version I am > using is available here: > https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk > > I would like to produce a nomogram for 5 covar

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Jeff Newmiller
I think you should consider whether the advantages of making an object-aware collections class are worth the effort... lists are the standard tool for this task in R, and are normally handled using the functional programming paradigm. Just make sure a sufficiently-complete set of methods are ava

Re: [R] Help understanding why glm and lrm.fit runs with my data, but lrm does not

2017-09-14 Thread Frank Harrell
Fixed 'maxiter' in the help file. Thanks. Please give the original source of that dataset. That dataset is a tiny sample of GUSTO-I and not large enough to fit this model very reliably. A nomogram using the full dataset (not publicly available to my knowledge) is already available in http://bio

Re: [R] Print All Warnings that Occurr in All Parallel Nodes

2017-09-14 Thread William Dunlap via R-help
> How could I check that a CSV can be opened before applying the function, > and create an empty data.frame for those CSV. Use tryCatch(). E.g., instead of result <- read_csv2(file) use result <- tryCatch(read_csv2(file), error=function(e) makeEmptyDataFrame(conditionMessage(e))) where

[R] using phia with glmmTMB

2017-09-14 Thread Joseph Ciarrochi
Hi folks, I love the Phia package andwant to use it with glmmTMB, but when i try to use the interactionMeans command, i get the below error modelrepeatedmain2 <- glmmTMB(counts ~ cluster*nominated*nominator*junior_senior+Ltime+ (1|school)+(1|id),

Re: [R] using phia with glmmTMB

2017-09-14 Thread Bert Gunter
Dunno ... But you might do better posting this on the r-sig-mixed-models list where it both should fit better and where you are more likely to find the relevant expertise. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into

Re: [R] using phia with glmmTMB

2017-09-14 Thread Jeff Newmiller
Should also make the example reproducible [1][2][3] when you do post there because some mismatch between the model and the data is frequently where the problem turns out to be, and without an example that triggers the problem it is very tough to figure that out. [1] http://stackoverflow.com/q