The most useful function Facebook has served for me is as a time machine. That is, students, friends and acquaintances I had not seen in 20, 30 or 40 years, who are in my memory as small children or teenagers all of a sudden reappear in my life as young adults with spouses and children, or old, retired people.
It’s weird seeing that 8-year-old that I used to coach now 42 years old with adult children of her own. The serious, hard-working 11-year-old boy is now 27, a college graduate and new father. My fellow enthusiastic, naive graduate students are professor emeriti. How weird is that?
The first thing I have learned is that nothing lasts. The kid who was sobbing because she lost in the finals of the Junior Olympics and it ruined her life has rarely thought about that match in 30 years. The teammate who was so in love with himself in his twenties, who always had at least two girlfriends at a time, and who I thought was an egocentric pain in the ass, now looks back on those days with amusement and embarrassment. What little hair he has left is snow white . He didn’t become a movie star as he expected. He ran a Harley Davidson dealership for 30 years and is now retired in Florida.
We can love our children more than life itself, but they are still going to grow up, get jobs and families of their own and live their own lives, as they should.
The second thing I have learned is that family is what brings us the greatest joys in life, if we are lucky, and the greatest sorrows, if we are cursed and a mix of both if we are normal. All of the photos of young parents have that same lovestruck and bewildered expression, as if to say, “I love this baby” and “I have no idea what the fuck I am doing” both at the same time.
The newly married/ newly engaged couples all have the same phrases about how lucky they are and the divorced/ separated couples mostly sound equally bitter.
When we’re young we’re mostly focused on careers – because how else are we going to pay for diapers and baby food and tournament entry fees and piano lessons and college tuition for those babies? When we get older, we realize it doesn’t matter so much whether we are a retired professor or a retired janitor. Our grandchildren could care less.
The third thing I have learned is how lucky I am to live in the time and place that I do. Lately, in my spare time that I do not have, I have been reading a lot of history. Whether it is hygiene or women’s right or economic inequality or violence in society, in the overall scheme of things, we are SO much better off than we have ever been. That’s a post for another day, though, since I have to leave for Palm Springs in a few hours.
The year I turned 55, I wrote a series of blog posts on 55 things I’ve learned in 55 years. I’ve probably learned more than three things since, but one particular lesson has come back to me over and over the past few years.
People are more than their accomplishments – sometimes for better and sometimes worse.
This is one of those lessons that should be obvious and we’ve all probably given lip service to it at one time or another. “The janitor in the building deserves just as much respect as the university president.” As far as I can see, most people don’t really believe that. They go to major effort to attend any event where billionaires or celebrities are present, and despite all of the talk about ‘supporting our troops’, they really wouldn’t bother to go to a barbecue for the guy who came home from Afghanistan a few years ago.
Maybe it’s because as people get older they get tired of maintaining barriers and let you see more who they really are. Maybe I’ve just gotten better at paying attention.
I used to think I was smarter, more motivated, harder working and braver than the average person because I had overcome a lot of hurdles to accomplish at a high level in sports, academics and business. That’s embarrassing to admit because I now realize how completely wrong I was, and how I let the opportunity slip through my fingers to get to know better some really amazing people.
I’ve come to know people who came thousands of miles, hopping freight trains, hiding in the back of tractor-trailers, to escape civil war and violence, who worked 14 hour days at minimum wage to give their children a better shot in life. I’ve learned the university president has been in rehab three times for alcoholism. I’ve found out that the mid-level manager for the medium-sized company is far from mediocre, having spent 20 years in the military, first in combat zones and then training recruits how to survive. I’ve learned that the old guy who retired from the factory had been in some of the bloodiest battles in World War II.
It’s not just surviving wars or escaping from them. There are people who at first seem like the most staid, judgemental bureaucrats you’d ever meet, who would never lift a finger to do anything outside of the box, and then you find they are raising their five grandchildren after their child overdosed on methamphetamine or they spend their evenings volunteering at the prison to teach literacy classes. That really quiet guy that works at the library? Yeah, he spent nine years working for start-ups in Africa ‘because I wanted to understand more of the world than where I grew up’.
There is the flip side, too, the people who seemed to have it all together who turn out to have no real moral standing. Someone can be financially successful, well-educated and hit the gym at 5 am every morning, yet that person will still do business with someone known to have molested children and then bribed officials to get out of being prosecuted because, “Well, it’s just business.”
People with absolutely stellar credentials will lie to your face and it won’t bother them at all. On the other hand, people with equally stellar credentials will work another two hours on top of the 18 hours they already worked because they promised they would come to your fundraiser and they always keep a promise.
Whoever is up may be down next year and whoever is down might be up
Some people work for one company, volunteer for one organization or live in one community until they are doddering up to get the lifetime achievement award for fifty years of service. I’m the opposite of that, and so I’ve had the experience many times of running across someone I had not seen for 10, 20 or 40 years. People I was so angry with because they made an unethical decision a decade or two ago, I look at now and they are lonely, pathetic old people who have to live with themselves. Other people, I was a complete idiot to not pay enough attention to because they were ‘not important enough’ or ‘not interesting enough’ or ‘not smart enough’ and they have led fascinating, productive lives that I admire.
So, my biggest lesson I have learned is to take more time to listen to people and get to know them. Sometimes, getting to know them means I head in the opposite direction as far and fast as possible. More often, though, it means I learn more about the world than my little place in it.
- I created two data sets, named q4disc and q4disc3, keeping the month of discharge and the number dissatisfied at discharge and dissatisfied 3 months later, respectively.
- I read in the 3 values I was given, month of sample, number unsatisfied at discharge and number unsatisfied 3 months later.
- Now, I am going to create a data set of raw data based on the numbers I have. First, in a do loop, for as many as people said they were unsatisfied, I set the value of undisc (unsatisfied at discharge) to to 1 and output a record to the q4disc dataset.
- Next, in a do loop for 500- the number dissatisfied, I set undisc = 0 and output a record to the same dataset.
- Now, repeat steps 3 & 4 to create a data set of the values of people unhappy 3 months after discharge.
- Following the programming statements are the original data.
So, now, I have created two data sets of 6,000 records each with three variables. Doesn’t seem that efficient of a way to do it but now I have the data I need and it didn’t take long and doesn’t take up much space.
“The XSCHART statement creates and charts for subgroup means and standard deviations, which are used to analyze the central tendency and variability of a process.”
For the three months after discharge variable, just do another PROC SHEWHART with q4disc3 as the dataset and undisc3 as the measurement variable.
OR , once you have the dataset created, you can get the chart using SAS Studio by selecting the CONTROL CHARTS task
Either way will give you this result:
Let me begin by acknowledging that anyone who can afford to fly to Trinidad and Tobago to learn more about the culture and ends up pitching a reality show is in the extreme of privileged and fortunate people on this planet.
I also realize that anyone who travels as much as I do is bound to have some bad experiences as the law of averages catches up with her.
This is not one of those rants about how Airline X sucks and I will never fly them again. First of all, I fly American a lot and they are usually quite good. Secondly, you are usually lying when you say that because in many cases, you have no choice. If I’m flying into Devils Lake, North Dakota, there is one airline and that’s it.
HOWEVER, since we are negotiating for said reality show to be filmed in Tobago, it’s likely that my family, my staff and will be flying into Port of Spain on American Airlines a lot in the near future, I want to offer them some specific advice for how not to suck.
1. Don’t lie. I don’t know when it became your corporate policy to lie, but I highly recommend you stop it. I even suspect lying is making you some money in the short-term. Stop it anyway. Two different American Airlines employees told people they would have to sleep on cots set up in an auditorium because there were no hotel rooms. They gave excuses like there were a lot of festivities in the city. They said they had been trying all day and there were just no hotel rooms. Several people in front of me went off to the auditorium unhappily. I said, “I don’t believe it. There is not one hotel room in the city of Miami? There is no fucking way I am sleeping on a cot. I don’t believe that it is legal for an airline to have your flight delayed by hours and then tell you to sleep on the floor with no compensation.” After I pushed the issue for quite a while, someone finally admitted that, yes, I could get a hotel, pay for it myself and get reimbursed through customer service. After I questioned repeatedly the truth of every hotel room in Miami being booked, they finally admitted that no, it was only the hotels with which American had contracts that were booked. It took me 30 seconds to find a nice hotel 4 miles away using the Travelocity app on my phone. Immediately, 2 other people in line did the same thing. Now, I’m sure that it saved American a lot of money that people slept on cots instead of nice hotel rooms that were not deeply discounted to American. Still, don’t lie to people. That’s bad.
2. Don’t waste people’s time. I don’t know at what point American ran out of those discounted hotel rooms but there were a lot of people in front of me and behind me getting the same story. We waited in line for over an hour. If they write slow, it would have taken 145 seconds for an American Airlines employee with a marker and a piece of cardboard to put up a sign saying: Out of rooms at contract hotels. Your choices are a) Wait in line for food vouchers and sleep on a cot in the auditorium or b) Get your own room and mail in receipts for reimbursement. Hell, they could have made an announcement. Airlines announce something every 3.3 seconds anyway. All the people who wanted to get their own room could have left at that point and not wasted their time. The people who did want to go for the cot could have saved waiting behind all those other people.
3. Take responsibility. It was 100% the airlines fault that we missed our flights. The flight from Miami to Port of Spain was hours late, so the flight back was hours late. Why did it become MY responsibility to find a hotel room, pay for the hotel room and write American Airlines to get paid back? Why did I have to wait in line for 2 hours in Trinidad to get my ticket re-booked and another hour in Miami to be told to sleep on a cot? Call in extra employees to work. YOU fucked up. Why should your customers who pay you have to wait in line for a total of 3-4 hours? That’s not right. Call in more staff to handle customers. Figure out how to pay for people’s hotels. Give out visa gift cards. You can buy them at fucking Wal-Mart, for God’s sake. As the gentleman in front of me said about himself, “I have money and I’m going to go stay at an expensive hotel, no thanks to you people. What about all of these other people who can barely afford to travel – you have older people, families with small children – they shouldn’t be sleeping in a gym. That’s not right.”
4. Don’t get self-righteous when your passengers are angry because you have lied to them, wasted their time and failed to take responsibility. When the American employee told me we would have to sleep on a cot in an auditorium, I told him, “There is no fucking way I’m sleeping in an auditorium. Are you fucking kidding me? I KNOW that the airline can’t have passengers delayed overnight and just say that’s too bad and I fucking GUARANTEE you that there are hotel rooms in Miami.” He told me not to swear and he threatened call security on the gentleman in front of me. If your job is to deny responsibility, waste people’s time and lie to them, don’t be surprised when they get mad at you.
On the other hand Travelocity and your app, you rock. Hotel Colonnade in Coral Gables, we will be back for more margaritas and we loved the family loft.
And American, you can do better. I’m counting on you. We have a lot of travel coming up for that reality show and me launching myself at the next lying bastard would make good reality TV but probably not look to good on my permanent record.
Oh, and by the way, I was supposed to get in last night and I’m still sitting on the plane waiting for a gate at LAX.
Perhaps you have watched the Socrata videos on how to do data visualization with government data sets and it is still not working for you. Here is a step by step example of answering a simple question.
Is the prevalence of alcohol use among youth higher in rural states than urban ones?
You can click on a link below to go directly to that step.
Second, I selected Chronic Disease Indicators for my health area of interest.
Third, I selected ALCOHOL – which brought me to the screen showing all the columns of data and a bunch of choices.
Fourth, I clicked on FILTER on the right of the screen and then select a column to filter by.
Chrome did not give me a scroll bar so the furthest option I could get was Topic. I switched over to Firefox and was able to get this menu where I selected Question and Alcohol use among youth. You have to type in the value that you want. Make sure it is spelled exactly the same as in the data set.
Fifth, since I wanted to compare urban and rural states, I clicked Add a New Filter Condition and then selected California, New York, North Dakota and Wyoming with LocationDesc as the filter condition. Make sure the box next to each condition you want is clicked on.
In case you were wondering, I based my choice on the listing of states by urbanization , New Jersey is #2, MA 5 and NY 13
On the other extreme, Wyoming is 39, North Dakota is 42, and Montana 47 so I thought this was a pretty good split.
8. I clicked on visualize on the right, selected Column as the type of chart, Location Desc as the label data, DataValueAlt as the data value, and there was my chart
Note: I could not select DataValue. My guess is that was a string variable. I had to select DataValuealt, which was the exact same value
9.Just to make it more obvious, I went in and sorted on data value, which caused the chart to be recreated automatically.
You can see below the chart it created. It’s pretty clear that in these data there is no relationship between urbanization and alcohol use among youth.
New York and New Jersey where the lowest and highest prevalence, respectively. I was hoping to see a pattern with more rural states higher, but it seemed to be pretty unrelated.
HOW TO DOWNLOAD THE DATA SETS FOR ANALYSIS
Perhaps you would prefer to download the data set for import into some other tool, say, Excel or SAS. The first three steps are the same, into you find the data set you want.
This next step is not required , but the data sets can be pretty big, so I’d suggest filtering on at least one major variable first. For example, you can click the three rows next to any column, say, Question, and then select the question that interests you, say Binge Drinking.
Next, click the EXPORT button at the top right of the screen. Select the format in which you want your file to be downloaded. That’s it!
I wouldn’t normally consider Excel for analysis, but there are four reasons I’ll be using it sometimes for the next class I’m teaching. First of all, we start out with some pretty basic statistics, I’m not even sure I’d call them statistics, and Excel is good for that kind of stuff. Second, Excel now has data analysis tools available for the Mac – years ago, that was not the case. Since my students may have Mac or Windows, I need something that works on both. Third, many of the assignments in the course I will be teaching use small data sets – and this is real life. If you are at a clinic, you don’t have 300,000,000 records.Four, the number of functions and ease of use of functions in Excel has increased over the years.
TRANSPOSE AN ARRAY IN EXCEL
Select all of the data you want and select COPY
Click on the cell where you want the data copied and select PASTE SPECIAL from the edit menu. Click the bottom right button next to TRANSPOSE and click OK. Voila. Data transposed.
PERFORMING A REGRESSION ANALYSIS
Once you have your data in columns (and if it isn’t, see TRANSPOSE above), you just need to
- Add the Analysis Pack. You only need to do this once and it should be available with Excel forever more. To do that, go to TOOLS and select EXCEL ADD-INS. Then click the box next to Analysis ToolPak and click OK.
- Now, go to TOOLS, select DATA ANALYSIS and then pick REGRESSION ANALYSIS
You just need to select the range for the Y variables, probably one column, select the range for the X variables, probably a column adjacent to it, and click OK. You may also select confidence limits, fit plots, residuals and more.
So, yeah, for simple analyses, Excel can be super-simple.
Believe it or not, this is what I do for fun. In my day job, I make video games that teach math and social studies.
Working on some fun things using SAS Studio, so, expect a number of short posts over the next few days. Last time, I talked about the utilities and how easy it is to import an Excel file. Now let’s say maybe you are not aUnix person and you have no idea how exactly to code a LIBNAME statement that is not on Windows. Never fear, it’s super easy.
Right click on the folder where you want to save your data set. From the menu that appears, select the last choice which is ‘properties’.
A window will come up that shows the name of your folder and its location, it’s easy to spot because it’s right next to the word Location. It will look something like this:
to save your data you have uploaded an Excel file and imported into SAS, remember that the files were saved in the work directory and named import, import 1 etc.If I wanted to sort those data sets and then merge them together into a permanent data set, I’d do it in the exact same way as if I was using Windows. The only thing different is the LIBNAME statement, as you can see below.
LIBNAME in “/home/your_name/data_analysis_examples”;
Proc sort data = work.import;
Proc sort data = work.import1;
data in.crossroads ;
merge work.import work.import1;
If, later on, I want to use that data set in a program, again I would do it exactly the same as in Windows and the only thing different would be my LIBNAME.
LIBNAME in “/home/your_name/data_analysis_examples”;
Proc means data = in.Crossroads;
Completely random fact, unrelated to SAS studio, or maybe it is related, I hurt my arm again, so I have been writing my SAS programs using Dragon voice recognition software. If you are going to use SAS studio on a Mac, you should be aware that Dragon does not work on Firefox on the Mac so open up Chrome if you want to use voice recognition software, or at least the software from Dragon. This has nothing to do with SAS specifically.
It’s been about a year since I last looked at SAS Studio much –
OKAY, LISTEN UP PEOPLE
In my previous life, I taught for years at a small liberal arts college, with under 2,000 students. I also taught at a tribal community college with less than 500 students. In neither of those situations did we have the funding to pay for expensive software. SAS Studio is FREE. I could have really used this when I was teaching at those small schools. Check it out.
So, it’s free, but I don’t teach that often because I have a day job as president of The Julia Group where clients want me to do some much stuff we quit taking new clients years ago and also president of 7 Generation Games where they want me to do more stuff.
The last class I taught, we used SAS on a remote desktop – which I liked a lot. So, yes, no SAS Studio for me for a while.
In case, like me, you are more a programming type and haven’t been too pointy-clicky, perhaps you missed the TASKS AND UTILITIES. Well, don’t.
Let’s say you want to import a file from Excel into SAS. First, upload it by clicking on the folder where you want it stored and then clicking the upload button at the top left of your screen.
Look to the bottom left of your screen and you will see this. Well, you’ll see the Tasks and Utilities anyway, the stuff above it is files for class examples.
Click on the arrow next to Tasks and Utilities and you’ll find all kinds of cool stuff. Click the arrow next to utilities and pick IMPORT DATA
Drag the file you uploaded into the window on the right and, voila!
There you go, your Excel file is imported into SAS. You can see the code in the CODE window. DON’T FORGET TO CLICK THE LITTLE RUNNING GUY AT THE TOP OF YOUR SCREEN TO RUN THIS.
Note that the file is named WORK.IMPORT because you’ll need that name for the next task, but that’s next time because I have to go back to work.
/* Generated Code (IMPORT) */
/* Source File: testit.xlsx */
/* Source Path: /home/annmaria.demars/homework */
/* Code generated on: 2/6/17, 11:27 PM */
FILENAME REFFILE ‘/home/annmaria.demars/homework/testit.xlsx’;
PROC IMPORT DATAFILE=REFFILE
PROC CONTENTS DATA=WORK.IMPORT; RUN;
SAS nicely runs the PROC CONTENTS, too, so you end up with a table telling you the contents of your new data set.
Once you have your data imported, you can use the TASKS menu to complete (what else) statistical tasks. I wrote about those in some other posts below:
My point is, there is a lot of stuff under that little tab and you should check it out. Also, if you are a small school, SAS Studio is an awesome resource you can get for free and I bet you could use it.
Support my day job! Learn about Ojibwe history and culture. Practice multiplication and division
FREE GAME FOR iPad or Android tablets
I haven’t written any of them.
Instead, I wrote an annual report that was due for one project, worked on a grant proposal due soon and a final report for another project (all of these things bring me money) , attended a few meetings and worked A LOT on development of a new mobile game to teach decision-making and a major update of Spirit Lake, which teaches multiplication and division.
While I was doing this, I did not do nearly enough on promoting our games like Fish Lake
You know, it doesn’t really matter. The fact is that every day you will end up with some things you didn’t get around to doing. There is never going to be a day when I walk into my office and say,
“That’s it. I have completed all the programming. Yes, done. There is no more code to be written. Marketing, finished. Everyone has been completely managed. All budgets are completed forever. Now, I must ride off into the sunset on my unicorn.”
It wasn’t that I wasn’t interested in writing those blog posts – I was – but at the moment, it seemed more pressing, potentially profitable and/or , to be honest, fun, to do those other things.
The older I get, the more of a long view I have and I can see that those grants get funded, contracts get done, articles get published and if you don’t get it done today, at the end of the day, there’s another day, because that’s how time works.
As long as you are moving forward, you are making progress.
I can hear you saying, though, all the way here in Santa Monica,
Sure, that’s easy for you to say, but what about those things you definitely do not want to do, like filling out your tax returns? If you just do your happy-happy programming and don’t send in your 1040 then you get massive fines, go to jail and have other bad unicorn-less things happening. What about THAT?
I have two answers to that.
First of all, it is possible that you can make enough money from your other endeavors that you can pay someone to do that stuff. I am not entirely sure if 1040 is the form or the thing you put in your oil – I think that’s WD40. Anyway, 15 years or so ago, I hired an accountant whose job it is to keep me out of white collar prison. She is batting 1,000 so far.
Secondly, for those things that you do have to do yourself, like renew your drivers license or attend some boring-ass required training on sexual harassment or email that person you really meant to answer or read that article or write that blog, really, the world will not implode if you didn’t get it done today.
Too often, we make ourselves crazy acting as if whatever it was we didn’t get done today was THE crucial element that would determine our success. Trust me, it’s not.
As for me, since it is actually tomorrow, since it is almost 1 am, I’m going to have a glass of Chardonnay, read something with zero redeeming social or educational value and not worry about what I didn’t get done today at all.
Well, it’s been a minute. In fact, it’s been over two weeks. I started this blog NINE YEARS AGO. That is pretty amazing. According to some guy named Patrick, who cited ‘research’ the average blog lasts only 100 days.
Actually, when I backtracked this statistic, I came to an Atlantic article that said the average WEB PAGE sticks around for 100 days, which seems awfully short to me.
I recall years ago reading that the average blogger persisted for about 31 days. That statistic only stuck with me because of the comment that the average blog has the lifespan of a fruit fly. I probably read that 9 years ago. Now, when I searched to find that statistic, all I came up with was blogs on the life expectancy of a fruit fly.
I did search in the university library database for a bit to find the average blogger persistence but all I found was some blogs on persistence. Humph.
When I started this blog, I wrote a lot about SAS, data analysis and statistics. I also wrote a bit about math and educational games. I am still really interested in all of those things and have far more idea for blog topics than time to write them. One topic students always struggle with, for example, is finding the area under a normal curve between two z-scores.
However, there is not enough time in the day to do everything I want to do.
You can read the first six posts starting here, and tomorrow, time permitting, I’m writing the seventh one on making a character.
I didn’t get to it today because I just got back to work and had to debug some PHP scripts and start wading through > 2,600 emails. Almost down to 1,000.
Back to work I go.
Still, I’m pretty happy with everything I am doing and the new year is starting out well. How about you? How is your 2017 shaping up?