Re: [R] test logistic regression model

2022-11-20 Thread Mitchell Maltenfort
ries, or present both and highlight the difference in outcome. A > third option is to gather more data. > > Tim > > -Original Message- > From: R-help On Behalf Of Bert Gunter > Sent: Sunday, November 20, 2022 1:06 PM > To: Mitchell Maltenfort > Cc: R-help > Subject: R

Re: [R] test logistic regression model

2022-11-20 Thread Mitchell Maltenfort
Two possible fixes occur to me 1) Redo the test/training split but within levels of factor - so you have the same split within each level and each level accounted for in training and testing 2) if you have a lot of levels, and perhaps sparse representation in a few, consider recoding levels to

Re: [R] Interpreting the result of a model with random effects

2022-06-11 Thread Mitchell Maltenfort
Looks like the center effect improves overall accuracy while being independent of the other terms. A few things to try Compare coef(model.fix) to fixef(model.rand). Add center as a fixed effect to model .fix Try a conditional logit (clogit from survival) See how consistent the coefficients

Re: [R] [EXT] Re: Inappropriate color name

2020-11-20 Thread Mitchell Maltenfort
Here’s a daft idea that brings it back to R For packages where there are problematic names, have aliases with acceptable names. Perhaps create a package to hold all those aliases. Then if a user wants their preferred names, load up the aliasing package and change them in bulk. Using a package

Re: [R] Inappropriate color name

2020-11-17 Thread Mitchell Maltenfort
What about just amputating the final "n?" "Indian" might mean one of two things, but "India" is pretty distinct. On Tue, Nov 17, 2020 at 4:10 PM T. A. Milne via R-help wrote: > > Apologies to the list for continuing a thread which is clearly off-topic. > However, contacting the maintainer of

Re: [R] Inappropriate color name

2020-11-17 Thread Mitchell Maltenfort
Thanks, Rolf, I never saw the Letter to Chesterfield myself. Though I admit I run more to Swift's "A Modest Proposal" but then if you really want to get into being impolitic that's a stellar example! Mitch On Mon, Nov 16, 2020 at 5:46 PM Rolf Turner wrote: > > On Tue, 17 Nov 2020 07:54:01

Re: [R] - Trying to replicate VLOOKUP in R - help needed

2020-11-16 Thread Mitchell Maltenfort
ASSIGNED_COMPANY[grep("ADELPHI",NAME)] <-"NEC ADELPHI" is what I'd try On Mon, Nov 16, 2020 at 4:27 PM Andrew Robinson wrote: > Hi Gregg, > > it's not clear from your context if all of ASSIGNED _COMPANY is NA or what > the classes of the objects are. Try the following ideas, none of which are

Re: [R] Inappropriate color name

2020-11-16 Thread Mitchell Maltenfort
r-c...@r-project.org. would be the first stop. On Mon, Nov 16, 2020 at 4:37 PM Lainey Gallenberg < laineygallenb...@gmail.com> wrote: > Whether or not you agree with my reason for doing so, my question was how > to contact the creator of the "colors" function. If you do not have advice > on

Re: [R] Inappropriate color name

2020-11-16 Thread Mitchell Maltenfort
According to Wikipedia -- https://en.wikipedia.org/wiki/Indian_red_(color) -- "Indian red" refers to a pigment from India. The Wikipedia page reports that Crayola were concerned about the mistaken etymology so used the name "Chestnut" On Mon, Nov 16, 2020 at 1:39 PM Lainey Gallenberg <

Re: [R] Posting: R-Project Code/Package for a Stepwise Multiple Regression Analysis

2020-03-30 Thread Mitchell Maltenfort
Also see the 'rms' package. If you use validate with bw=TRUE you can see often a given predictor will be retained. On Mon, Mar 30, 2020 at 11:57 AM stephen sefick wrote: > Please search archives and Google. There are many resources. I think that > the MASS package has stepwise regression, but

Re: [R] Converting SAS Code

2017-10-11 Thread Mitchell Maltenfort
I believe the lmerTest package's "difflsmeans" is what you need. On Wed, Oct 11, 2017 at 2:33 PM, Andrew Harmon wrote: > I have no problem setting up my mixed model, or performing anova or lsmeans > on my model’s outputs. However, performing lsd mean separation is

Re: [R] Help to organize data

2017-06-25 Thread Mitchell Maltenfort
The tidyverse also has nice functions On Sun, Jun 25, 2017 at 5:48 PM Sarah Goslee wrote: > This is pretty badly mangled (please don't post in html), but > ?aggregate > is probably what you want. > > Sarah > > On Sun, Jun 25, 2017 at 5:27 PM, Jackson Rodrigues >

Re: [R] stargazer summary statistics by group

2016-03-06 Thread Mitchell Maltenfort
https://cran.r-project.org/web/packages/tableone/index.html might help On Sunday, March 6, 2016, Jeff Newmiller wrote: > Maybe what you really want is the tables package. > -- > Sent from my phone. Please excuse my brevity. > > On March 6, 2016 4:45:58 PM PST, sbihorel

Re: [R] 'R' Software Output Plagiarism

2015-09-22 Thread Mitchell Maltenfort
Isn't plagiarism detection based on overlaps with sentence structure? That way, it would catch plagiarism if someone simply did a find-and-replace. But that would also catch regressions with the same output format. How long was the original thesis? If 25% of it was all regression output, sounds

Re: [R] Just stumbled across this: Advanced R programming text code - from Hadley

2014-08-11 Thread Mitchell Maltenfort
Ah, what do you know anyway? -- as the book critic said to the author. Ersatzistician and Chutzpahthologist I can answer any question. I don't know is an answer. I don't know yet is a better answer. I can write better than anybody who can write faster, and I can

Re: [R] Applying Different Predictive Models over Different Geographic subsets of a RasterStack

2014-08-07 Thread Mitchell Maltenfort
I don't know this particular package well, but I believe party contains something called mob which creates a regression tree terminating in different models at each node. Could that be adapted to your project? On Thursday, August 7, 2014, Craig Aumann craigaum...@gmail.com wrote: I'm

Re: [R] logistic regression for data with repeated measures

2014-07-01 Thread Mitchell Maltenfort
http://stats.stackexchange.com/questions/62225/conditional-logistic-regression-vs-glmm-in-r might be a good start Ersatzistician and Chutzpahthologist I can answer any question. I don't know is an answer. I don't know yet is a better answer. On Tue, Jul 1, 2014 at

Re: [R] rpart and randomforest results

2014-04-01 Thread Mitchell Maltenfort
Is it possible that the random forest is somehow adjusting for optimism or overfitting? On Apr 1, 2014 7:27 AM, Schillo, Sonja sonja.schi...@uni-due.de wrote: Hi all, I have a question on rpart and randomforest results: We calculated a single regression tree using rpart and got a pseudo-r2

Re: [R] R Running slow on Ubuntu

2014-03-16 Thread Mitchell Maltenfort
http://www.cybaea.net/Blogs/Faster-R-through-better-BLAS.html any help? On Mar 16, 2014 9:38 PM, Russell Bainer russ.bai...@gmail.com wrote: Thanks guys. I'll look into this and tell you if I come up with anything. -R On Saturday, March 15, 2014, Jeff Newmiller jdnew...@dcn.davis.ca.us

Re: [R] Fast linear convolution with R

2014-02-27 Thread Mitchell Maltenfort
Convolve uses the FFT so probably expects powers of 2. You might want to look at using filter Ersatzistician and Chutzpahthologist I can answer any question. I don't know is an answer. I don't know yet is a better answer. On Thu, Feb 27, 2014 at 5:31 AM, Philip

Re: [R] R Beginner - Need Perhaps 5 - 10 Minutes of R User Time to Learn Few Basics

2013-11-13 Thread Mitchell Maltenfort
Bert: Yet another reason I'm a fan of Frank Harrell. Does anyone know when I get to buy the next edition of Regression Modeling Strategies? Zach: Check www.coursera.org. They have some nice R-centric classes. I signed up myself since my own R skills are self-taught. Also consider investing in

[R] Off-topic? Linux laptop for R

2013-08-11 Thread Mitchell Maltenfort
Can anyone recommend a laptop that performs well running R under Linux? Thanks. [[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

Re: [R] Off-topic? Linux laptop for R

2013-08-11 Thread Mitchell Maltenfort
-installed Linux laptops are looking quite good. System 76 may be hearing from me shortly... On Aug 11, 2013 2:03 PM, Mitchell Maltenfort mmal...@gmail.com wrote: Can anyone recommend a laptop that performs well running R under Linux? Thanks. [[alternative HTML version deleted

Re: [R] How to do generalized linear mixed effects models

2013-02-21 Thread Mitchell Maltenfort
One more link to look at http://glmm.wikidot.com/faq This is the r-sig-mixed-models FAQ. On Thu, Feb 21, 2013 at 8:53 PM, Ross Boylan r...@biostat.ucsf.edu wrote: I want to analyze binary, multinomial, and count outcomes (as well as the occasional continuous one) for clustered data. The

Re: [R] Unable to fit model using “lrm.fit”

2012-05-27 Thread Mitchell Maltenfort
When I have problems like that I try the same fit using 'glm' and see what I get. On Sun, May 27, 2012 at 1:53 PM, irena irena.be...@gmail.com wrote: Hi, I am running a logistic regression model using lrm library and I get the following error when I run the command: mod1 - lrm(death ~

Re: [R] Urgent - I really need some help lme4 model avg Estimates

2012-03-28 Thread Mitchell Maltenfort
You said it right in your first letter. You want to keep it at a level that is comprehensible. Not just to you, but your colleagues, reviewers, readers... Remember the sage wisdom that all models are wrong, but some of them are useful. Rather than try to forge the Excalibur of statistical

Re: [R] Multivariate function from univariate functions

2012-03-25 Thread Mitchell Maltenfort
Naïve question: would a saturated multivariate model work as an interpolation function? On 3/24/12, physicistintheory physicistinthe...@gmail.com wrote: I'm relatively new to R and I'm stuck. I'm trying to construct a surface to optimize from a multivariate dataset. The dataset contains the

Re: [R] stepwise variable selection with multiple dependent variables

2012-02-10 Thread Mitchell Maltenfort
Anova.mlm would be one way to do model selection. On Fri, Feb 10, 2012 at 4:29 PM, Fugate, Michael L fug...@lanl.gov wrote: Good Day, I fit a multivariate linear regression model with 3 dependent variables and several predictors using the lm function.  I would like to use stepwise

Re: [R] How do I turn NA's to zeroes when a combination lacks one element?

2012-01-29 Thread Mitchell Maltenfort
?ifelse Type that in and you'll be in good shape. On 1/29/12, C_Crown ccr...@life.bio.sunysb.edu wrote: Hi all, I am very new to R. I am taking a course and am trying to complete my first assignment. For the assignment I have to get the program to generate different color combinations

Re: [R] General help - online statistics courses?

2011-09-08 Thread Mitchell Maltenfort
My approach has been autodidactic. There's a bookstore near me (Barnes and Noble at U of Penn) that has a terrific stats section. Amazon also has a lot of books, including limited online browsing + reader recommendations. On 9/8/11, kensuguro magronb...@gmail.com wrote: I understand this isn't a

Re: [R] General help - online statistics courses?

2011-09-08 Thread Mitchell Maltenfort
Also, look at ocw.mit.edu for free course notes with statistical content. On 9/8/11, kensuguro magronb...@gmail.com wrote: I understand this isn't a r specific question. I'm switching departments to work with the analytics team at my company as a service side manager to better incorporate the

Re: [R] zero truncated poisson regression

2011-07-31 Thread Mitchell Maltenfort
Pscl package. On 7/31/11, Iasonas Lamprianou lampria...@yahoo.com wrote: Dear friends, does anyone know how I can run a zero truncated poisson regression using R (or even SPSS)? Dr. Iasonas Lamprianou Department of Social and Political Sciences University of Cyprus [[alternative

Re: [R] Different behavior of median and mean function - Why?

2011-05-26 Thread Mitchell Maltenfort
Summary (df) will also work. On 5/26/11, Christoph Jäckel christoph.jaec...@wi.tum.de wrote: Hi together, below is a small example which produces outcome I do not understand, namely that the median function works fine on a data.frame without negative numbers, but doesn't work on a data.frame

[R] predict.gls choking on levels of factor

2011-05-21 Thread Mitchell Maltenfort
I've got a gls formula that's a mix of continuous and ordered variables. I wanted to use gls because I wanted to use the varIdent structure. Anyway, attempts to use predict.gls choke with the error that the levels I use are not allowed for one of them -- the first one alphabetically, so I'd

Re: [R] poisson regression

2010-11-10 Thread Mitchell Maltenfort
The other possibilities are: (1) you're missing a necessary interaction term (2) one of the variables affecting output just isn't in your data set. (3) you need to transform 'hosp_days' or 'age' -- are those the only two continuous variables? Might be worth trying to plot 'em versus # of

Re: [R] Sample size calculation for differences between two very small proportions (Fisher's exact test or others)?

2010-11-08 Thread Mitchell Maltenfort
Not with R, but look for G*Power3, a free tool for power calc, includes FIsher's test. http://www.psycho.uni-duesseldorf.de/abteilungen/aap/gpower3 On Mon, Nov 8, 2010 at 10:52 AM, Giulio Di Giovanni perimessagg...@hotmail.com wrote: Hi, I'm try to compute the minimum sample size needed to

Re: [R] lmer fixed effects, SE, t . . . and p

2010-09-09 Thread Mitchell Maltenfort
Try coef(summary(fit3)) On Thu, Sep 9, 2010 at 11:00 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: windows Vista R 2.10.1 (1) How can I get the complete table of for the fixed effects from lmer. As can be seen from the example below, fixef(fit2) only give the estimates and not the

Re: [R] what does it mean when my main effect 'disappears' when using lme4?

2010-08-17 Thread Mitchell Maltenfort
One difference is that the random effect in lmer is assumed -- implicitly constrained, as I understand it -- to be a bell curve. The fixed effect model does not have that constraint. How are the values of labs effects distributed in your lm model? On Tue, Aug 17, 2010 at 8:50 PM, Johan Jackson

[R] sanity-checking plans for glmer

2010-05-30 Thread Mitchell Maltenfort
Having briefly fallen for the notion that the negative.binomial family in MASS could be used in glmer, I want to use these lists for a sanity check on my final (?) plans. I want to use glmer for logistic regression and for poisson regression on a data set of 10,000 items. There will be two

Re: [R] What are Type II or III contrast? (contrast() in contrast package)

2010-02-03 Thread Mitchell Maltenfort
Thank you. I was already convinced of the value of MASS (drop a hat and I'll tell you my other list of musts for a stats library) but I didn't know about the Exegeses. On Wed, Feb 3, 2010 at 3:12 AM, Emmanuel Charpentier charp...@bacbuc.dyndns.org wrote: Le mercredi 03 février 2010 à 00:01

[R] any advice on web interfaces to R?

2009-09-23 Thread Mitchell Maltenfort
I saw http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces and I'm still not sure yet which platform (Linux, Windows, etc.) I'll be working on -- and no, it's not under my control to pick. I was wondering if anyone out there had good advice, that would save me time and stomach acid, on

Re: [R] Comprehensive power analysis/sample size package in R?

2009-07-15 Thread Mitchell Maltenfort
It's not R nor is it open source, but G*Power 3 is free: http://www.psycho.uni-duesseldorf.de/abteilungen/aap/gpower3/ Apparently the new version (for Windows -- Mac version is lagging) includes Poisson and logistic regression. On Tue, Jul 14, 2009 at 3:04 PM, ukoe...@med.uni-marburg.de

Re: [R] I'm offering $300 for someone who know R-programming to do the assignments for me.

2009-05-08 Thread Mitchell Maltenfort
On Fri, May 8, 2009 at 12:19 AM, ayaku1...@gmail.com ayaku1...@gmail.com wrote: There are six assignments in total. It won't take you long if you were familiar with R. For those who are interested, please send me an email with your profile (your experience with R, how long and how often have

[R] Off-topic: Biostatistics book spam?

2009-04-13 Thread Mitchell Maltenfort
Just got what seems to be the first spam for a stats book I ever saw. It only has one review at amazon, and for all I know the author wrote it himself. This might be a decent text, but if so, I'd like to hear it from someone here. -- Forwarded message -- From: Biostatistics

Re: [R] comment on this book A Handbook of Statistical Analyses Using R by Brian S. Everitt (Author), Torsten Hothorn (Author)

2009-03-02 Thread Mitchell Maltenfort
Yes I think it is. I used it. On Mon, Mar 2, 2009 at 11:46 AM, choonhong ang angie.bear...@gmail.com wrote: Is this book a good reference to learn R for statistical analysis ? A Handbook of Statistical Analyses Using R by Brian S.

Re: [R] Power analysis for MANOVA?

2009-01-26 Thread Mitchell Maltenfort
http://www.amazon.com/Statistical-Power-Analysis-Behavioral-Sciences/dp/0805802835 Cohen's book was in fact the basis for the pwr package at CRAN. And it does have a MANOVA power analysis, which was left out of the pwr package. On Mon, Jan 26, 2009 at 4:12 PM, Adam D. I. Kramer

Re: [R] R in the NY Times

2009-01-07 Thread Mitchell Maltenfort
On Wed, Jan 7, 2009 at 3:19 PM, Spencer Graves spencer.gra...@pdf.com wrote: What kind of warranty does SAS offer? I haven't read their EULA recently, but if an airplane fell out of the sky because of a bug in SAS code, I'd be surprised if SAS was eager to pay damages! Spencer And that's

[R] Off-topic -- an eye on a stats presentation for clinicians?

2008-12-31 Thread Mitchell Maltenfort
I've got a 20 slide Powerpoint set up against the expected day someone says Mitch, could you talk for a short while to the residents on how to use statistics? It looks good at this end, but I'd love to get at least one more pair of eyes on it. Any volunteers? -- Due to the recession, requests

Re: [R] Recommended R books by XLSolutions Corporation

2008-10-29 Thread Mitchell Maltenfort
I thought R users were measured in fractal dimensions...or is that fractious? On Wed, Oct 29, 2008 at 4:06 AM, Detlef Steuer [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is the bit where I get stuck. Drats!! I almost thought that you had gotten a hold on

[R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
The impression I get from the list and the references I've perused is that nlme is being phased out in favor of lme4, but lme4 still doesn't have a complete feature set yet. What I'm still fuzzy on, being a relative R newbie, is: (a) what features in nlme are currently missing in lme4 (b) what's

Re: [R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
, but perhaps a couple of quick inline comments may suffice: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mitchell Maltenfort Sent: Wednesday, October 22, 2008 7:41 AM To: r-help@r-project.org Subject: [R] Think I'm sure, but confirm: lme4 vs. nlme

Re: [R] Simple... but...

2008-07-23 Thread Mitchell Maltenfort
Z=NULL;for (i in 1:3) Z=c(Z,c(x[i],y[i])) On Wed, Jul 23, 2008 at 8:54 AM, Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Hi R, If x=c(1,3,5) y=c(2,4,6) I need a vector which is c(1,2,3,4,5,6) from x and y. How do I do it? I mean the best way Thanks, Shubha This

Re: [R] preferred version of Linux for R?

2008-04-08 Thread Mitchell Maltenfort
If your criterion is use of resources, then you might be more interested in which flavor of Linux makes it easy to turn the X-window server off. No windows or mouse, more RAM and CPU cycles for R. As I recall, the only Linux where that might be a problem is Ubuntu, because there's no convenient

Re: [R] power calculation for repeated measures ANOVA?

2007-09-16 Thread Mitchell Maltenfort
Mind a book reference instead of a software reference? Look for Bausell and Li's Power Analysis for Experimental Research -- cookbook style power calculations, but has explicit RM ANOVA. On 9/16/07, MATTHEW BRIDGMAN [EMAIL PROTECTED] wrote: Is there a way to calculate power for repeated