ASA Connect

 View Only
Expand all | Collapse all

Excel's user unfriendliness

  • 1.  Excel's user unfriendliness

    Posted 08-29-2016 11:08
    Hi,
        In reading some recent postings at ASA Connect about Excel spreadsheets, a pet peeve occurred to me that I thought I might mention.  Are there other people out there who, like me, have always found Excel spreadsheets surprisingly & disappointingly user-unfriendly?  When I first started experimenting with them years ago, I had the hopeful assumption that I could do a lot of data manipulation (& some basic stats & graphs) easily within Excel, but I found it so hard to use, that I now use it ONLY as a commonly employed method of data transmission, but as soon as I receive data in Excel, I export it out of Excel and into other software (usually SAS or JMP in my case) & do all my data processing within the other software. 
        For one thing, whenever you look at the bottom of the file in an Excel sheet to see how many observations (usually subjects) there are, i.e., how many rows there are, you must always remember that the number of rows is always one more than the actual number of observations because evidently the Excel developers have never thought to include an unnumbered (or zero numbered) row at the top of the sheet for the necessary function of writing the variable names.  I find myself & other people I work with often being misled by that.  On top of that, I find the awkward need to write formulas for simple functions, & also unwarned booby-traps like inadvertently sorting on a variable without realizing that none of the other data are being sorted with it.  
         Is there something I'm missing here, or have other people encountered these annoyances? Just curious. Thanks.   
     
    Joseph J. Locascio, Ph.D.,
    Bio-Statistician,
    Memory and Movement Disorders Units, 
    Massachusetts Alzheimer's Disease Research Center,
    Neurology Dept.,
    Massachusetts General Hospital (MGH),
    Boston, Massachusetts 02114
    Phone: (617) 724-7192
    Email: JLocascio@partners.org 
               
    "The information transmitted in this email is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material from any computer."
     
     
     
     

    The information in this e-mail is intended only for the person to whom it is
    addressed. If you believe this e-mail was sent to you in error and the e-mail
    contains patient information, please contact the Partners Compliance HelpLine at
    http://www.partners.org/complianceline . If the e-mail was sent to you in error
    but does not contain patient information, please contact the sender and properly
    dispose of the e-mail.



  • 2.  RE: Excel's user unfriendliness

    Posted 08-30-2016 09:37
    Hello Joseph,

    I rarely use Excel to do data summarization, analysis and/or graphing. I find every time I try, I have to go back and refamiliarize myself with the basics of data manipulation. Like you, I tend to get data as Excel files and, after making sure formats are consistent, e.g. a numeric is truly numeric, and field names and labels are acceptable, I convert to SAS and do my work using that software and SAS Enterprise Guide. Once everything is ready, I can output results as .rtf files and my clients can then incorporate them into Word documents, etc.

    Best regards,

    Nestor Rohowsky





  • 3.  RE: Excel's user unfriendliness

    Posted 08-30-2016 10:50
    Joseph,

    I, too, only use spreadsheets as data entry or data transmission tools. R, Stan, and sometimes J are my usual calculation engines of choice.

    I think I can recall creating one "real" spreadsheet with real calculations in the last, oh, 7 years or so. I recall it surprising some of my colleagues.

    I perceive myself to be in the distinct minority.

    Bill

    PS: FWIW, I don't use word processors much, either. If I need to produce a document for a Word user, I typically prepare it in a text editor (Emacs using org-mode) and then post-process it to a format readable by Word. I find it hard to think while tempted by Word's ability to enter content and format at the same time; I prefer separating those tasks.
    --
    Bill Harris
    Data & Analytics Consultant
    Snohomish County PUD
    Everett WA
    (425) 783-1790




  • 4.  RE: Excel's user unfriendliness

    Posted 08-30-2016 10:53

    I only use Excel for data entry and transmission, and quick-and-dirty analyses.  It's really not designed for heavy-duty analyses, even if you have the analysis tool packs loaded.  I definitely don't use it for final analyses because of the lack of an audit trail.  I have used spreadsheets successfully for simultaneous equation simulations and to numerically solve differential equations.  In these cases, there's no sorting involved.  Still, I have made the odd formula entry error which can be hard to catch.

    Spreadsheets are really meant for business applications.  If I change X, what will Y be?

    The @risk package is risky.  (Pun intended.)  It's meant to do simulations, but the manual makes no mention of the importance of the seed.  I know of instances in which a person runs a simulation twice, gets the same results and assumes the simulation must be correct.

    ------------------------------
    Chuck Coleman



  • 5.  RE: Excel's user unfriendliness

    Posted 08-30-2016 14:27
    I agree that all of these are an issue. In fact, sometimes there are multiple lines at the top before any data! And I sort Excel files only with great caution, and never my original! But these are just things to leanr and be careful with, not major issue, IMHO.

    But I still like Excel.  I typically take the data I am sent and call that sheet "original".  I then make another copy within the same document and do all my edits there. Sometimes I end up with several of them. This gives me a trail I can follow to see what changes I made. And I can always go back to the original if I fear I made a mistake.

    I like the fact that formulas remain active, so if I edit a value, all the calculations based on it remain correct. In other packages, all the formulas need to be re-run.

    I like filters that show me subsets in the grid, for range and error checking (all the ones with "no" on ever smoking should have "N/A" for duration...)

    Obviously some kinds of manipulations (and most stats) are easier in a package.  I use Excel for preliminary data cleaning and simple edits, then generally read it into SPSS for any serious analyses.

    Ed

    Ed J. Gracely, PhD
    Associate Professor
    Family, Community, & Preventive Medicine
    College of Medicine

    Associate Professor
    Epidemiology and Biostatistics
    Dornsife School of Public Health

    Drexel University
    2900 W. Queen Lane,
    Philadelphia PA, 19129
    Tel: 215.991.8466 
    | Fax: 215.843.6028
    Cell: 609.707.6965

    Egracely@drexelmed.edu
    drexelmed.edu  |  drexel.edu/publichealth

    This email and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this email communication by others is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies. Thank you for your cooperation.






  • 6.  RE: Excel's user unfriendliness

    Posted 08-30-2016 21:28





  • 7.  RE: Excel's user unfriendliness

    Posted 08-30-2016 22:52

    "One in five genetics papers contains errors thanks to Microsoft Excel".  I see that is the actual title but it certainly seems to be poor reporting (and re-reporting) as in the comments is the clarification about 20% being conditional on whether the authors used Excel and not 20% of all genetics papers.  I would expect as a group we might have a stronger voice in dealing with the mis-reporting of statistics especially what gets reported in journals and other science organizations.

     

    Does ASA have a committee/team/group that has a related mission?

     

     

    Forest Service Shield

    Jim Baldwin, PhD
    Statistician

    Forest Service

    Pacific Southwest Research Station

    www.fs.fed.us
    http://wwwstatic.fs.usda.gov/images/email/usda-logo.png

    Caring for the land and serving people

     

     





    This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.





  • 8.  RE: Excel's user unfriendliness

    Posted 08-31-2016 10:04

    I agree that once  you've settled on a clean block of data, and want to commence statistical manipulations, Excel is not the ideal environment.

     

    On the other hand, I like the 'tabula rasa' aspect of an Excel sheet, whereby I can try out some 'what if's' or transformations, etc., on a data set, off to one side, without the constraints of formatting within a stats package.  This is especially true when experimenting with a re-sampling solution:  I can sketch out (by formulas, if need be) how a value would be generated, in relation to other values on the page, and then randomly re-sample from any cells of interest. …While the results could often (always?) be replicated by coding within a formal package,  as I say, I like the flexibility at that exploratory stage.

     

    Bill

     

       






  • 9.  RE: Excel's user unfriendliness

    Posted 08-31-2016 11:20

    In case anyone hasn't found them yet, the R dplyr, tidyr, and magrittr packages, along with ggplot2, scales, and a few of its relatives, make EDA a lot easier than it used to be, IMHO.  See Karl Broman's "hipsteR re-educating people who learned R before it was cool" at http://kbroman.org/hipsteR/, for example.  (I'd quibble--but only quibble--with a few suggestions: I use Emacs + ESS, as he does but not as he teaches, I along with the founders of R prefer <- to = (and I can still use _ in names), and I use Emacs org-babel to produce reproducible reports instead of either Sweave or knitr.)

    To the point about reorganizing Excel spreadsheets for use in SPSS/SAS/R/..., Broman has also written the very good "data organization organizing data in spreadsheets" at http://kbroman.org/dataorg/ -- no quibbles from me on that.

    Bill

    ------------------------------
    Bill Harris
    Data & Analytics Consultant
    Snohomish County PUD



  • 10.  RE: Excel's user unfriendliness

    Posted 08-31-2016 11:49

    I'll resist the urge to pile on with multiple Excel incidents I've experienced personally, but I have to mention one issue that is particularly egregious, and easy to fix.

    There is an ISO standard format for dates:  YYYY-MM-DD (separator is not specified).  I don't advocate slavishly following standards, but this one makes sense, because with it, alphanumeric ordering coincides with chronological ordering.

    Excel has a dazzling multitude of date formats it supports, yet (at least for the Excel version my employer supplies) this ISO standard format isn't one of them.  Capriciously disregarding an important standard is bad on so many levels I'm not sure where to start.

    By the way, LibreOffice has a feature that when you export to CSV, you can choose whether to export what you see, or the underlying data.  Choosing the latter avoids a class of unwitting data-modification issues.

    It would be interesting to try out Gnumeric, LibreOffice, and OpenOffice, to see how they fare for your ease-of-use considerations.  Some of what you cite are intrinsic to spreadsheets.  Spreadsheets don't identify a column header specifically, hence row ordering will be off by one, and none allow meaningful variable names in programming, as they use cell names.

    ------------------------------
    Jim Garrett
    Sr. Assoc. Dir. of Biostatistics
    Novartis



  • 11.  RE: Excel's user unfriendliness

    Posted 09-01-2016 09:44
    Select "more number formats", then the date category. Special trick: change the locale to "English (United Kingdom)" and then you see 2012-03-14 as about the fifth option.

    Best,
    --John Massman





  • 12.  RE: Excel's user unfriendliness

    Posted 09-01-2016 10:54
    I agree that it's annoying that you can't get YYYY-MM-DD formatted dates as one of the default Date formats,
    but you can select the cells in question and Format them with the Custom format yyyy-mm-dd.
    (Although it is tedious to have to do this repeatedly.)

    >>Kathy





  • 13.  RE: Excel's user unfriendliness

    Posted 08-31-2016 12:52

    All, I'm going to defend Excel just a little bit :)

    I have actually taught a workshop on exploratory data analysis in Excel to several groups of folks, and I think as long as you are not working with very large data sets where managing it visually is of no help at all, there are some neat things Excel does that you can take advantage of. Note that I tend to work more with social scientists and academics from other areas who do not have extensive statistical background, so this works for many of my clients.

    1) Using filters can be really helpful for a quick look at your data. Turn on Filters (Quick start: Filter data by using an AutoFilter - Excel is for Excel 2010 but very similar in other versions of Office for Windows). I then click the filter variable next to each variable to get an idea of the range of each variable, and can do some quick data cleaning if I see values that just don't belong.

    2) Pivot tables are great once you learn how to use them! They also make it much easier to make graphs based on your data (I find that it is really hard to make graphs/figures "from scratch" in Excel, no matter how long I have worked with them). Create or delete a PivotTable or PivotChart report - Excel is again for Excel 2010, but similar to other versions.

    3) The Data Analysis ToolPak is a helpful add in that can make quick summaries and even do very simple statistical analyses on the spot. Use the Analysis ToolPak to perform complex data analysis - Excel discusses this in more detail.

    4) Some other things that it has been really useful for:

    1. Color coding cleaned data when I need to communicate data issues and I can't see my clients in person (true for me in many cases, and no statistical program allows this that I know of).
    2. Making tables look pretty when they come out of other statistical programs and I need to write up a report.
    3. Creating graphs and figures that my clients can edit themselves. I don't generally like making figures in Excel because I still find it clunky (unless you create them from pivot tables) but when my clients want to be able to edit their own figures it's extremely useful.

    Some caveats...

    • I've never worked with older versions of Excel for professional work, and I think that's just as well. My understanding is that any "advanced" functions were buggy and just plain awful--I think, like Word, it has come a long way for use in a professional environment.
    • I don't ever do any final statistical analyses in Excel. I tend to use it more for quick exploration and data cleaning/manipulation, especially when I have a client sitting with me, but it's excellent for that.

    If anyone is interested in more of what I teach in the Excel EDA workshop, just send me an email: kim@krloveqcc.com.

    Thanks!

    Kim

    ------------------------------
    Kim Love
    Owner and Lead Consultant
    K. R. Love Quantitative Consulting & Collaboration



  • 14.  RE: Excel's user unfriendliness

    Posted 09-01-2016 09:18

    I have seen some very good arguments against Excel and some defenses. Here is my $0.02 worth.

     

    I use Excel every day on my job. Like others, I use it for data transmission. My statistical analysis is done in Minitab, JMP or, occasionally, R. I like, follow and teach most of what is in the Karl Broman article on data organization in an attempt to get my clients, who give me their data in Excel, to organize it properly.

     

    The first thing two things I do with a data set in Excel is create an index column so that if I sort the data, I can easily get it back in the order in which the client gave it. I also then create the data as a table which has built-in filters, more easily read formulas and automatic formula generation. If the data need to be summarized before formal statistical analysis, I create a pivot table. If new data is added to the raw data and it is formatted as a table, then a simple refresh of the pivot table provides the updated summary.

     

    I don't do a lot of graphics in Excel, but sometimes need a plot that Minitab can't do, but that my client needs. If the graph can be static and I can do it in JMP (which my clients don't have), I'll use that. Otherwise, if they want to edit the graph, I'll do it in Minitab or Excel-the latter only if Minitab can't do it.

     

    If I have a good model from a response surface or mixture experiment and my client wants to "play around" with the model, I'll create a spreadsheet with sliders for each variable that they can manipulate to see their response. This can also be tied to a graph for a nice dynamic plot.

     

    I love Excel for what it can do, but don't hate it for what it can't do. I've seen some pretty ugly spreadsheets in my day, but have seen some very nice ones too.

     

    Best Regards,

    Bruce White

     

    Senior Statistician

    (651) 795-6534

    Bruce.white@ecolab.com

     

    CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain proprietary and privileged information for the use of the designated recipients named above. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.





  • 15.  RE: Excel's user unfriendliness

    Posted 09-02-2016 09:36

    I appreciate Kim's defense and wanted to add on some 'real life' experiences.

    I have used Excel extensively, by necessity.  I work in healthcare and spent many years at a company that would not support buying a high end package and I would receive all matter of data in jumbled messes of Excel spreadsheets.  I'm an experimental physiologist by training and a 'data scientist' by choice.  The '' used to explicitly point out I'm self taught post PhD and that was done on-the-fly MacGuyver style: Using the tools I had available with the additional constraints levied by an over-protective CIO.  

    What I'm trying to illustrate is that I had a highly demanding job that included software development, clinical education, payor relations, and on, and on, and on...oh, and per the company, I was "the numbers guy", the "data guru", the "stats nerd".  The potential need for a clinical psychologist to discuss my feelings about that environment aside, I want to point out a couple good things that came of it.

    Kim's comment on Pivot Tables is spot on.  They "saved me" as I used them to aggregate data.  Once you format the root file, index and tag records, you can roll-up the data quickly in a Pivot Table, then copy/paste special -> values and number formats.  That creates a new flat file.  If you do this across multiple spreadsheets (because that's how I usually received the data) you can then work within the constraints of the absolute number of references.  When I first learned this tool Excel could only handle a minimal amount of records (~65k), but the ~07 update allowed just over 1M.  Thus, while I'm sure nearly (if not all) readers will cringe at that disclosure, Excel was my data manipulation tool.

    On that note: Array Formulas

    Sweet Baby Jesus did those bail me out.  Again, they were much more useful in the older versions because with the '07 update many of the complex formulas I needed array formulas for were included (e.g., SUMIF), but they still have a place.

    So my main point here is for anyone like me who came to the gun fight with a knife and handcuffs there are many things you CAN do in Excel.  Please note the emphasis on CAN vs SHOULD.  Chris Rock once said "you can drive a car with your feet if you want to, that don't make it a good F-in idea".  However, if you need to deal with this reality here are a few tips and resources.

    Analysts are your friends:  mrexcel.com (and many other community pages)

    They live in this handcuffed world and have to troubleshoot files all the time.  They are not trained with tools beyond what they learned in business school, or like me, don't (didn't) have access to them and/or the time to actually learn them.  They are treading water and trying to put the kids thru school. 

    1.  Step 1: Create a "Notes" tab (or name it LOG).  You'll be manually journaling your work, but for someone learning this is actually quite a good exercise.  Reminds me of when I took a physics course and the instructor disallowed calculators.  He taught us to estimate, round, and work with nothing more than a pencil and paper.  You'll be doing the e-version of that here.

    2.  Don't leave formulas embedded in the data you process (this bloats the file and prevents further action on data aggregated in pivot tables).  Copy, paste special -> values and number formats.  Before you do that, copy your formulas and paste them to your log to keep a record.  This is how you can error check when you get to a 'common sense' validation step later.  You can also build a library of formulas and use them in future files, merely amending them to suit the needs of that dataset.

    3.  use the .xlsb format.  It's the most compressed file type and will also prevent bloat.  Excel will 'sh!t the bed' at some point if you just keep adding new spreadsheets.  Be mindful of the file size.  When it grows, move the data to a new file.

    4. Analysis: you will be coding by hand, which is useful for learning.  Sure, it's inefficient, but so is having this real world constraint you're living with.  I suggest bourbon to cope, YMMV.  Expert tip: I find wine is more useful WHILE working.

    5.  Take advantage of the pivot table formatting that is available.  If your users are, as I expect, business end-users, they will only be familiar with Excel.  Build interactive tables (i.e., dashboards).  Use the page field to allow them to pivot the data and look at it the way they are thinking about the problem, which is usually "How am I going to have this next meeting with Decision Maker X?"

    Those are the high points I can think of off the cuff.  Email me if you have specific questions.  I wrote tutorials so I could push down the methodology to analysts.  I have datasets I can de-identify and share and would be happy to.

    Jamie

    stark.jamie@gmail.com

    ------------------------------
    Jamie Stark
    Owner
    Sum Integral



  • 16.  RE: Excel's user unfriendliness

    Posted 09-02-2016 10:43
    Interesting perspective, Jamie.

    For me I never liked or appreciated Excel until I met people who uses it like a pro. Excel can do amazing stuff. I guess many statisticians (myself included) are not familiar or trained (academically or by necessity) with what Excel can do. 





  • 17.  RE: Excel's user unfriendliness

    Posted 08-31-2016 13:26

    Excel earned me some extra money once.  The client sent me the data in Excel format.  I immediately copied it into JMP, verified that the files matched, checked for odd data, discussed the project with the client, did the analyses, etc.

    Their expectation and hope was that the inputs would not affect the outputs and the analysis verified that.

    Then I asked a question that prompted someone to take another look at the Excel file they had sent me.  That's when someone realized that someone had sorted some but not all of the columns, meaning that the inputs were connected to the wrong outputs.

    When one is working on a billable hours basis and needs to re-do something because the client made a mistake that the statistician could not have been expected to catch, the statistician's bank account and spouse say, "Ka-ching".

    I did teach an online course in Business Statistics that used Excel, but it was the college's choice; I had no say in the matter.

    ------------------------------
    Emil M Friedman, PhD
    emilfriedman@gmail.com
    http://www.statisticalconsulting.org



  • 18.  RE: Excel's user unfriendliness

    Posted 09-01-2016 11:00

    Glad to see people pointing out both drawbacks and advantages.  Excel is definitely not a statistical package but it has some very nice features that stats packages don't possess as well as some very annoying properties that have been pointed out.

    I always do one thing to all Excel datasets that I receive or send out--engage (auto)filters on the entire range of valid data columns.  They used to be called auto-filters in earlier versions but in 2010 they are just filters.

    This does two things.  

    First, it LOCKS the rows so that individual columns cannot be sorted undermining the row-integrity of the data.  To me that's the single most dangerous property of Excel--the ability to sort data without regard for row-integrity!  Every time I export data to Excel from SAS via ODS, I always activate the AUTOFILTERS='Yes' option.

    Second, engaging filters creates a nice down-triangle button on every column that gives one access to nifty sorting/filtering features of Excel that I, personally,  use extensively.  I bemoan the mysterious inability of SAS to sort raw data on the screen.  It's such a useful feature but for some reason, SAS requires you to run syntax to accomplish this simple feat.

    One other pet peeve of mine on Excel is the inability of Excel to communicate with SAS regarding column data formats.  No matter what you have in the column, if there are missing values at the top, SAS will read it as text by default!

    ------------------------------
    Haris Subacius
    Senior Statistician
    American College of Surgeons



  • 19.  RE: Excel's user unfriendliness

    Posted 09-02-2016 11:28

    Two of the several things I tell students who want to use Excel for computations:

    1. In R (or just about any other package)  -(1)^2 will return -1. Of course.
      Try entering 
      = - (1)^2
      in Excel. What do you get? Next, try
      = 0 - (1)^2
      Better?

      Here, it's amusing. But not in the middle of a real formula, where it's an error waiting to happen. And has, of course.
    2. What is
      = log(10)
      in an Excel spreadsheet? Well, it's 1. That's OK.
      But suppose you want to copy that type of formula into a function in VBA. If you do you will find that log(10) is now a bit closer to 2.302585. Or maybe you will never notice this discrepancy.

    An error that has been fixed was a numerically-poor way of finding the sample standard deviation. That was probably more bothersome at NIST than for most of the data we see. But still.

    ------------------------------
    Joseph Voelkel
    Rochester Institute of Technology



  • 20.  RE: Excel's user unfriendliness

    Posted 09-06-2016 12:38
    Joseph, your concern about calculations concerns me, too. There were articles in one or more of the links I sent early on that compared the accuracy of several spreadsheet programs, including Excel, OpenOffice, and Gnumeric. For example, see "On the Numerical Accuracy of Spreadsheets" by Almiron, et al. (JoSS, April 2010) and "Statistical Accuracy of Spreadsheet Software" by Keeling et al. (TAS 2011). In some ways, your examples are scarier, for they involve basic calculations, not regressions and probabilities from distributions. I admit that I don't often calculate -(1)^2, but I don't yet know the domain of functions over which that seeming anomaly exists.

    So how does one do peer review and catch such issues? How does one know one has not fallen prey to such issues? Does peer review need to involve replication in SAS, R, JMP, or another statistical language?

    Bill




  • 21.  RE: Excel's user unfriendliness

    Posted 09-07-2016 08:59

    This is horrifying.  It doesn't stop at Dr. Voelkel's hardly-ever-used example.  Compare

    =exp(-(3)^2) to

    =exp(-1*(3)^2)

    Now, that has a material chance of appearing in mine or one of my colleagues' spreadsheets!

     

    John A. Major, ASA, MAAA

    Director of Actuarial Research, Guy Carpenter Analytics

    860-839-9148 (cell)

     




    This message is intended only for the use of the addressee and may contain
    information that is PRIVILEGED AND CONFIDENTIAL.

    If you are not the intended recipient, you are hereby notified that any
    dissemination of this communication is strictly prohibited. If you have
    received this communication in error, please erase all copies of the message
    and its attachments and notify the sender immediately. Thank you.





  • 22.  RE: Excel's user unfriendliness

    Posted 09-08-2016 08:59

    Interesting.  You don't even need the exponential.  Just compare =-1*(3)^2 = -9 to =–(3)^2 = 9. Evidently Excel evaluates the – in front of anything before other operations. At first I thought this was minor, because who would put a 3 in ( ) just to square it, but what if A1 is 5, A2 is 2  and the equation is =-(A1-A2)^2?

     

    Ed

     

    Ed J. Gracely, PhD
    Associate Professor
    Family, Community, & Preventive Medicine
    College of Medicine

    Associate Professor
    Epidemiology and Biostatistics
    Dornsife School of Public Health

    Drexel University
    2900 W. Queen Lane,
    Philadelphia PA, 19129
    Tel: 215.991.8466 
    | Fax: 215.843.6028
    Cell: 609.707.6965

    Egracely@drexelmed.edu
    drexelmed.edu  |  drexel.edu/publichealth

     


    This email and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this email communication by others is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies. Thank you for your cooperation.






  • 23.  RE: Excel's user unfriendliness

    Posted 09-09-2016 17:23
    It looks like Excel has two different interpretations of the symbol - , depending upon what is in front of it, and this affects the order of operations.  So the result of =0-3^2 is -9, while =-3^2 is 9.  Now =0+-3^2 is also 9. Trying =--3^2 yields 9. =-(-3^2) yields -9. So it appears that if whatever is before the  -  is a number or evaluates to a number, it treats it as a minus operation, and does the multiplication, division or exponentiation first.  However, if it is =, (, or another operator, it becomes the first operation.  I will have to remember this.
     
     





  • 24.  RE: Excel's user unfriendliness

    Posted 09-12-2016 11:10
    @Ellen: re interpretations of "-" and order of operations: One could always switch to the free J (https://www.jsoftware.com/). It uses "-" as the binary operator "minus" and "_" as the negative sign: no ambiguity there. Order of operations of "verbs" (functions) is always right to left unless modified by parentheses: no ambiguity there, either. After a short while, both become natural.

    Oh, and your programs probably become much, much shorter than you ever thought possible or reasonable. As Paul Graham has written, concise languages are good.

    I really like J and much prefer it to Excel or even R. J relies on relatively few libraries, because the core language is so powerful, even as it can be represented on one page (http://code.jsoftware.com/wiki/NuVoc). The J web site has many good references (http://code.jsoftware.com/wiki/Books), including J for C Programmers (perhaps for more advanced programmers not used to array languages) and Learning J (more of an introduction). Still, it lacks libraries I use regularly in R, and thus I do most of my analytics in R these days, even though J can call R.

    Bill
    --
    Bill Harris
    Data & Analytics Consultant
    Snohomish County PUD
    Everett WA
    (425) 783-1790




  • 25.  RE: Excel's user unfriendliness

    Posted 09-08-2016 10:33

    John,

     

    I confess, that to me, both Excel answers (for [1]  "=exp(-(3)^2)"  versus  [2]  "=exp(-1*(3)^2)"  ) look correct…

     

    The question is:  Is "-(3)^2" is strictly speaking well-formed, if viewed as a mathematical sequence in an intro text on order of operations.   If it's not well-formed in that strict sense; then I think the "-(3)^2" should not be viewed as a simple transcription of math from a handwritten version, but it's more like a bit of program code-subject to the programming language's syntax.  

     

    In case [2], Excel's answer for  =exp(-1*(3)^2)  is not problematic, since by the conventional order of operations (-1*(3)^2) = -1 x 9 = -9, so =Exp(-9) is calculated correctly.

     

    If case [1] had been =exp(-3^2) = exp(9) there would also be no problem-since the "-" is the sign of the real number "-3" and not an operator subject to the order of operations. 

     

      But Excel has evaluated   "-(3)"     as if it was equivalent to the real number  "-3".   Is this wrong?

          I'd suggest that Excel's approach is in the spirit of programming, where the values of variables in the code can be evaluated "on the fly":   Hence, Excel evaluates an expression of    -(x)    by first, internally finding or calculating the numeric value of x, and then interpret the net expression as the real number   -x    If this was the intention of Excel's design, then like any language, users have to know and use the correct syntax.  So maybe this is a training issue rather than an error issue?

     

    Bill






  • 26.  RE: Excel's user unfriendliness

    Posted 09-09-2016 13:09

    There are a lot of thing I like and dislike about Excel, but I agree with Bill on this one.  I especially dislike the fact the Microsoft moves things around during a lot of their upgrades. 

    The meaning of -(3^2) is clear.  (-3)^2 is clear. (-(3))^2 is clear.  -(3)^2 and -3^2 are confusing because they depend on arbitrary conventions.  If one wants correct results, it is important to use clear unambiguous syntax.  It is also important to check the results, no matter what the software.

    ------------------------------
    Emil M Friedman, PhD
    emilfriedman@gmail.com
    http://www.statisticalconsulting.org



  • 27.  RE: Excel's user unfriendliness

    Posted 09-08-2016 10:59

    Examples such as have been mentioned in previous posts are documented in my paper

     

    Berger, Roger L. (2007). "Nonstandard operator precedence in Excel." Computational Statistics and Data  Analysis, 51, 2788-2791.

     

    Also, John Major's previous example has nothing to do with the "exp" function. Compare the results of =-3^2 and =-1*3^2.

     

    Roger L. Berger, Professor

    School of Mathematical and Natural Sciences

    Arizona State University

    Email: roger.berger@asu.edu






  • 28.  RE: Excel's user unfriendliness

    Posted 09-05-2016 01:36

    Too many of my clients send me data in Excel spreadsheets. The worst aspect of their Excel use is that they often don't have one definitive version of the data. By relying on Excel they have multiple versions, each subtly different and often with little or no documentation of their differences.

    Of course it is possible to use Excel for data management in a very disciplined way. But many people don't and the product does nothing to enforce or encourage good data management practices.

    I have come to loathe it - but I guess that's mostly because of what I see people do with it.

    ------------------------------
    Mervyn Thomas
    Partner Biostatstics
    Emphron Informatics



  • 29.  RE: Excel's user unfriendliness

    Posted 09-06-2016 08:47
      |   view attached

    I often send my clients the attached workbook. Sometimes it helps with data setup.

     

    Ed

     

    Ed J. Gracely, PhD
    Associate Professor
    Family, Community, & Preventive Medicine
    College of Medicine

    Associate Professor
    Epidemiology and Biostatistics
    Dornsife School of Public Health

    Drexel University
    2900 W. Queen Lane,
    Philadelphia PA, 19129
    Tel: 215.991.8466 
    | Fax: 215.843.6028
    Cell: 609.707.6965

    Egracely@drexelmed.edu
    drexelmed.edu  |  drexel.edu/publichealth

     


    This email and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this email communication by others is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies. Thank you for your cooperation.




    Attachment(s)