top 3 movies 2015-

All happen to be documentaries or near-documentaries. All are on netflix and amazon. Don't look them up first. Instead, watch them first and let yourself be surprised.
  1. The People Vs. Fritz Bauer (Der Staat gegen Fritz Bauer)
  2. Icarus
  3. AlphaGo

philosophy

Buy Adrienne Howley's The Naked Buddha. It's a guide to living, not a guide to theology. There is (almost) no religion in there. For more information, also see the Dalai Lama — and some of his advice on dying.

pride

Student: Auf was kann man als Deutscher noch stolz sein? Fritz Bauer: Sehen Sie, ich glaube wir Deutschen können nicht stolz sein auf unsere Berge oder die Wälder, denn da können wir nichts für. Wir können auch nicht auf Goethe und Schiller stolz sein und auch nicht auf Einstein, denn für all das können wir ja nichts. Stolz können wir doch nur auf das Gute sein, das wir selbst gemacht haben.

(Well worth translating and contemplating, especially for proud Americans.)
 

free speech

Als die Nazis die Kommunisten holten, habe ich geschwiegen; ich war ja kein Kommunist.
Als sie die Sozialdemokraten einsperrten, habe ich geschwiegen; ich war ja kein Sozialdemokrat.
Als sie die Gewerkschafter holten, habe ich nicht protestiert; ich war ja kein Gewerkschafter.
Als sie die Juden holten, habe ich geschwiegen; ich war ja kein Jude.
Als sie mich holten, gab es keinen mehr, der protestierte. --- Martin Niemöller


bds and israel

As an expert, I often opine on whether boycotts and divestments have much chance of success. (A: Typically no—and there are often many more effective mechanisms.) I usually do not opine about the merits of causes. But BDS (Boycott, Divestment, Sanctions) deserves an exception. Please read this if you are interested in BDS and the Israeli-Palestinian conflict.


apple reviews

  • iMac 5k (and iMac Pro) Hardware, 2018+: Excellent, 5 stars. Still class-leading and affordable hardware. Great displays, good performance, nice designs. The only good reason nowadays to stay in the macos eco system.
  • MacOS Software, 2019: Good, 3.5 stars. Positives: Nice GUI, some nice built-in apps. Some good software: iTerm2 (Windows-10 has nothing like it!), Mathematica, BetterTouchtool, Skim, Moom, ResilioSync. Negatives: Poor Unix underpinnings (mediocre new file system, no built-in package manager (use brew), decades outdated perl, python, emacs, ls, grep, etc.)
  • Macbook Pro 15" Hardware, 2019: Mediocre, 2 stars. Negatives: The macbook pro has poor cooling (it is not usable on a lap), a bad keyboard and no escape key, and a mediocre touchpad. It has an orphaned touchbar. No matte screen option. Basic ergonomics should be bread-and-butter basics. Positives: The 3K resolution is a good compromise between 1K and 4K resolutions. Audio is pretty good. Speed and brightness are good. Apple: please give us a macbook pro that is 2mm thicker and is pleasant to work with. A Dell XPS 15 is cheaper and better.

Unfortunately, Dell's support for ubuntu remains half-hearted (XPS 15). Maybe Windows will eventually become a linux users dream. I am waiting for a great iTerm2 equivalent.



software tools

I am a heavy user of ubuntu linux, emacs24, pdflatex, ssh, apache2, and the Google infrastructure (gmail, docs, etc.). I program primarily in perl, C, and R, occasionally in python, php, C++, mysql, javascript, and a number of other languages. I use Mathematica. This website was created in jekyll.

I like vanilla Android (Google Nexus). I like iPads. The iPhone XR is ok. Other iphones are too expensive for their performance.

software

  • Here is a perl parser for latex called iawltxhtml (download here). It is a good start for a clean parser of latex code into useful html/epub code. It comes in a very large zip file, primarily because it contains the source and results for four example fame jagazines on which I used it (many large images!). iawltxhtml is not documented or supported, but it contains a lot of working code based on days of experimentation of how to successfully parse code into useful html, with css, math, images, flexibility as to whether the resulting file is pdf or html, etc.
  • Here is a hack for pandoc to work with multicolumn tables and to format numeric input.
  • sylspace is the software driving syllabus.space.
  • cpan (perl) weighted least squares regression.
  • Here is a <100-line one-pass OLS implementation in C++ for two variables. biols.hh, with standard errors, univariate means and sds, etc. For large data sets, biols could become numerically unstable, but it is very fast. The usage could not be simpler. The code in test() illustrates this. Start with
    
             #include <biols.h>
             int main() { BIOLS bcalc; bcalc.test(); }
          



health

glycohemoglobin (A1C) by age (diabetes and prediabetes)

Glycohemoglobin (A1C) blood levels are often classified as normal below 5.7, as pre-diabetes between 5.7 and 6.5, and as full diabetes above 6.5. From what I have read, coronary diseases are the principal problem caused by high glucose.

Because my own A1C levels are classified as "pre-diabetes," I was interested in how unusual my level was for my age. Fortunately, the CDC offers population statistics on A1C in its National Health and Nutrition Examination Survey (NHANES). There is data on about 60,000 individuals with reported A1C levels. The following plot shows the unconditional distribution of A1C levels by age. Dots are individuals (possibly many), and the lines show the more informative smoothed important percentiles, by age.

plot of a1c levels by age
  • Warning: I am not a medical expert, much less a physician. I am an economist and data scientiest. Do not consider any of the material here as medical advice.
  • By the "fixed doctor cutoffs," one quarter of the population is diagnosed with pre-diabetes by age 40, half just before age 60, and two-thirds by age 70. The fact that this is so common does not negate the potential harmful effects of A1C.
  • Just before age 70, A1C reaches its highest levels among surviving participants in the study. At this age, one in five individuals has full-blown diabetes, and two more have pre-diabetes.
  • With many additional wild assumptions on the nature of these not-so-random samples and how mortality influences dropping out from this sample, we can take a wild guess at the correlation (not causation!) of A1C with life expectancy. For individuals above the 90% level (who often have other health issues, too!), it could be on the order of years. For individuals below the 90% level, it seems more modest, less than a year. But don't get carried away. There is tremendous variation in mortality within all ages regardless of A1C! This is easier to see if you click on the figure to download the a1c.pdf file, which can give you a better idea of where the 60,000 individuals are located in the plot.
  • A simple regression can further show that caucasians have A1C levels of about 0.3 lower than Mexicans and Blacks; and men have A1C levels about 0.1 higher than women. Because of the way the CDC samples, if you want to know where you are in "your" distribution, you can add 0.15 (to your own A1C values) if you are Mexican or Black and subtract 0.15 if you are Caucasian; and add 0.05 if you are male and subtract 0.05 if you are female. If you are all of the above, good for you.
  • The program that generates this plot is a1c.R. The data is in file a1c.csv.gz, which itself was based on NHANES files DEMO.XPT, DEMO_C.XPT, DEMO_E.XPT, DEMO_G.XPT, DEMO_I.XPT, GHB_E.XPT, GHB_G.XPT, GHB_I.XPT, L10_C.XPT, DEMO_B.XPT, DEMO_D.XPT, DEMO_F.XPT, DEMO_H.XPT, GHB_D.XPT, GHB_F.XPT, GHB_H.XPT, L10_B.XPT, LAB10.XPT. Thanks to Bryan Tysinger from USC to help me locate the right data.

avery labels ruler

If you ever need to photograph your moles in order to compare their changes over time, the avery ruler stickers will help you. You need to purchase Avery 58160 stickers for your laser printer, each page of which has 3 times 10 labels. Then just print the avery ruler (or avery ruler w/o copyright) stickers over them, write the location where you attach them, affix them to your skin, and snap your photograph. If you are curious, you can also download the avery-ruler.tex file. You may want to download Avery's copyrighted 58160 template file, too, but it's not necessary. Just remove the overlay pdf.