deer in back yardWhat do a herd of deer and a sea lion have to do with statistics?

Friday, I was on the Spirit Lake Dakota Nation in North Dakota. Most of the time while I was there, I spent at the Spirit Lake Vocational Rehabilitation Project, an impressively effective group of people who help tribal members with disabilities get and keep jobs. A few years back, I wrote a system to track their data using PHP and MySQL. It is deliberately simple because they wanted a basic database that would give reports on the number of people served, how many had jobs, and some demographic information. A research project used SAS to analyze the data to try to identify predictors of employment.

Due to a delayed flight, I spent the night with my friend in Minot, discussing, among other things, the decline in native speakers of Cree, and not the herd of deer in her backyard, which was common place enough to pass without comment.

harbor at night

Saturday, I was back home in California, on a dinner cruise in Marina del Rey. We were discussing how to analyze the data on persistence in our games to show that the re-design, with a longer lead-in story line and a higher proportion of game play early on was effective. I suggested maybe we could use survival analysis. Really, it’s the same scenario as how many people are alive after 2, 3 or 4 months or how many people kept playing the game after the 2nd, 3rd or 4th problem.sea lion on dock

The deer, the large loud sea lion on the dock and I spent the exact same amount of time discussing the probability mass function for a Poisson distribution and proving the Central Limit Theorem.

My point is, that everywhere I go, and that is a REALLY broad range of places, people are interested in the application of statistics, but SO much of school is focused on teaching how to compute the area under the normal curve or how to prove some theorem or computing coefficients using a calculator and plugging numbers into a formula, inverting matrices. I’m not sure how helpful that was to a student and I can guarantee you that the last time I computed the sums of squares without using a computer was about 35 years ago.

Whether you are are using SAS, SPSS, Excel, R, JMP or any one of a dozen other statistical packages, it lets you focus on what’s really important. Does age actually predict whether or not someone is employed (in this case, no)? Do rural school districts have fewer bureaucratic barriers ? Is this a reliable test? Did students who played these games improve their math scores?

When I was young, and many of the current statistical packages were either very new and limited or didn’t yet exist, someone asked me if I was worried that I would be out of a job. I laughed and said no, because what computers were replacing was the computational part of statistics, and except for that tiny proportion of people who were going to be developing new statistics, the jobs were all going to be in applying formula, not proving them and sure as hell not computing them with a pencil and a piece of paper. A computer allows you to focus on what’s important.

What IS important? That’s a good question and another post.


Having trouble teaching basic statistics to students? Start with Aztech: The Story Begins  — free from the app store (and it’s bilingual)

girl in jungle

This post DOES relate to you, I am almost certain. Keep reading. As I type this post very slowly, I’m trying to use all 10 fingers.  You see, for a few years, I had a real problem with my left thumb due to arthritis. It hurt so badly I couldn’t really use it at all and so I only used 9 fingers to type. This causes problems because my hands are in the wrong place on the key board so I quite often inadvertently do things like save bookmarks because I’m clicking on the mousepad with my palm. My right should her has problems from being in an odd position as I type. Now, here is the stupidity of all of this – MY THUMB IS FINE NOW. Last year, I had surgery called thumb arthoplasty and now I could type with all 10 fingers but it is such a habit to type with 9 that it is really hard to break and I have to consciously work at it. This 9-finger habit is probably like a lot of habits that cause you problems; 1) it came about because if I didn’t do it, it caused me pain, 2) I have had it for years, 3) I did it without thinking, even when it was no longer necessary, and 4) I have other options, but they’ll take effort to adopt.

Let me give you another example. Darling Daughter Number Three has made some serious money over the last few years. In her teens and early twenties, she was seriously broke and had to watch every dime. Last week, she was the keynote speaker at the Walk for Apraxia and she also substituted for me teaching my judo class.

Ronda a.k.a. DD3 giving out medals

Ronda a.k.a. DD3 giving out medals

Both times she had to make a 5-hour round trip in LA traffic and she was telling me how tired she was. I told her,

For the love of God, you make enough money, take a Lyft!

Okay, maybe you didn’t make millions of dollars last year or have a body part replaced. However, I think it’s very likely you have habits that are causing you problems. For example, I used to worry ALL of the time about damn near everything. One of my worries was money. I was always worried about money. Not in a healthy making sure we had enough in the bank to pay the bills way, but in an OH MY GOD IF WE GO ON VACATION WHAT IF I CAN’T GET ANY MORE CONSULTING CONTRACTS AND WE DON’T SELL  ANY GAMES AND I END UP LIVING IN A DUMPSTER way. As a result, I hadn’t taken a vacation in years and worked every day but my Christmas. I know many people who are the same way. They won’t take time off, go to the dentist or they worry constantly when they do but their worries are far out of proportion to their actual situation. Once, they were poor and did have to worry about being homeless without that next paycheck. That time is long past but the habit is still there.

By the way, buy our games. We even have free games to download if you’re a cheapskate

One last one, and this is maybe the most pervasive – the habit of not trusting anyone. Maybe you grew up in a very dysfunctional environment. If you showed any vulnerability at all people took advantage of you. They mocked you for being stupid if you didn’t know something. They told you that any goal you mentioned as beyond your capability. Now, you don’t admit it if you need help even though there are plenty of people around to help you. You act as if you don’t care whether you achieve something, be it college graduation, winning a medal or the next promotion – so people who would go to great efforts to help you get there don’t bother.

Anyway, my flight is boarding so I am sure you can think of your own examples. I was going to write about Fisher’s exact test today, but this idea of habits as been on my mind a lot lately.

basketball

I saw this poster in a high school, supposedly said by a basketball coach:

People say, “Follow your dreams. ” I say, “Forget your dreams, kid, follow math.”

He goes on to give the percentage of high school athletes who compete in college – 3.4% for men’s basketball, by the way, 1% of high school athletes make it in Division I. Even if you make it to the college level, your odds of becoming a professional athlete are dismal – 1.1% of college basketball players make it to the major professional teams, yes, that is 1% of 1%, so you have a .01% chance of making it into the Lakers even if you are playing in high school.

If you are that 1 in 10,000 who makes it on the roster, your median salary will be $3.7 million and you will play for around 4.8 years, giving you a career salary of around $18.5 million.

Let’s say you are a statistician with a Ph.D.  With 5-9 years of experience, your median salary is around $130,000. In my experience, it is going to be considerably less your first year but go up fairly rapidly. Let’s say you have the sense to get some scholarship and grant funds to pay for your tuition – my total student loan debt was $900 – and that you graduate in your 30s – I was 31 and that was with taking a few years out to work as an engineer. There isn’t any particular reason you have to retire before 65 or 70. It’s not like your knees go out and they fire you from your statistician job.  I’m going to give a ballpark figure of $150,000 a year average over those 36 years, which is turns out to be about the median salary for a statistician who doesn’t work in academia, according to the American Statistical Association. You’re at $5.4 million. That’s not counting 36 years of health insurance, 401 K and other benefits like not having a boss who is referred to as your “owner” , which I personally find kind of creepy weird, but you also have to consider you don’t get all the $5.4 million at once, either.

So, let’s present this to you:

  • You have a 1 in 10,000 chance of making $18.5 million
  • You have a 55 out of 100 chance of making $5.4 million.

You can only buy one ticket. Which lottery ticket do you buy?

Oh, by the way, did I mention you have a 90 out of 100 chance of making over $3 million ?

The coach’s point was that you may be dreaming about a spot in the NBA but you have a much greater chance of success in life if you spend your time in the math class instead of on the court. As a good friend of mine often says, “Too many people confuse wishes with plans.”

So, you may dream of slam dunks in the NBA but you would be a lot better off planning to take Calculus, several statistics courses and study a field like business, psychology, political science or epidemiology where you can apply those statistics.

You might think I don’t have any heart, that I have no idea what it means to dream of being a successful athlete. Actually, you’d be wrong. I ran track in college. I won the world championships in judo. Then, the next year, I went into a Ph.D. program and specialized in statistics because, well, I’m good enough at math to see what had the better probability of paying off in the future.

There are SO many ways to learn and use statistics. That’s another post, though. I’d best toddle off to bed since I need to catch a plane tomorrow after I go do a charity walk in the morning.

Early morning and snow, two things I hate the most. Well, life can’t be perfect all the time. I think I can prove that statistically.

Get started learning statistics with the Aztech Games series for iPad. The first game is available now and it’s free!

pyramid

 

A couple of years ago, I get an email from Professor Douchebag (not his real name) that he is doing a study on women entrepreneurs and would like half an hour or more of my time. I’m in favor of research, so I schedule him in a week or two later when I have a spot on my schedule and he never calls. When I email him, instead of an apology I get this message,

“We had enough for our sample size but perhaps you would be interested in me consulting for you?”

I wrote him back and said I had no need of consultants that wasted my time and scheduling business owners for an hour, then being a no show with no notice is unprofessional and disrespectful.  Recently, I see his study has come out and the main conclusion is that what is holding women CEOs back is “lack of confidence”.  First of all, if the only women you interviewed were those who were able to give you an hour of their time at the drop of a hat, you did not have a very random, representative sample of women business owners.

Secondly,

Are you fucking kidding me?

I recently read a post by Hunter Walk, whose fund has funded 26% female founders versus the industry standard of 5%.  What that tells me is that if female entrepreneurs are less likely to believe that their firms will receive seed money or venture capital funds than male entrepreneurs do, it is not a lack of confidence but a realistic appraisal of the market.

I’ve written about this a lot on our 7 Generation Games blog

” it’s a self-fulfilling prophecy, when you constantly are telling women how much they suck, when you don’t give them a fraction of the same funding, when you act as if they are invisible and then say, “Look, they just aren’t cut out for this.” In fact, the women who succeed despite the lack of support, in fact, despite the constant disrespect and disregard, are some of the strongest, most resilient people you will ever meet.”

I was playing World of Warcraft last night and was a bit depressed by all of the ideas I got for making educational games more amazing that we just don’t have the funds to implement right now. Compared to the average for women-owned companies, we’ve done well. We have Windows games in the Microsoft Store, iPad games in the app store and even a game on Steam.

Spirit Lake Vill

We have done all of this with the most minute investor funding. We are still here thanks to three successful Kickstarter campaigns, our wonderful game players, funding from Small Business Innovation Research awards from the U.S. Department of agriculture and  less than 0.2% of the funds invested in each of such failed Silicon Valley darlings as Juicero , Jawbone and Luxe.

Do I think that women-owned companies receive less funding  than men? It’s not lack of confidence, it’s an absolute fact. Women are less likely to get funded and when they do receive funding the deals are for a lower dollar amount.

In Lots of outrage, little action by Maria Burns Ortiz, CEO of 7 Generation Games, spells it out perfectly, women are judged on their accomplishments while men are judged on their “potential” so the challenge for female CEOs is to get to those accomplishments with none of the outside funds given to men with “potential”.

I’m a world judo champion, Ph.D. and I founded a gaming company with some of the smartest people around and we have bootstrapped and begged and burned the midnight oil to keep this company going and growing. I don’t need more confidence, what I need is the same opportunity for funding at the same rate as my male counterparts.

 

If you’d like to buy our games, here are those links again

We have Windows games in the Microsoft Store,

iPad games in the app store and

wigwam

even a game on Steam at 40% off this week

and on Amazon , under video games .

Today, I finished up a bonus Easter egg for the game, Aztech: Meet the Maya that you are taken to play when you click to see what Jose is thinking.  You can see a rough version of it here. This plays better on a desktop / laptop because iPad blocks the autoplay for sound, but when it’s packaged for the app store, that will work on the iPad as well.

This game uses several functions, all of which I wrote my little old self.

  1. Switches sound file played from English to Spanish
  2. Switches text from English to Spanish
  3. Takes you to the bonus game when you click on the sound bubble
  4. When the sound file ends, replaces the talking gif with a static image  and shows the arrow to continue.
  5. For each item on the screen, performs an action when clicked – anything from text describing it’s use to the Maya to a jumping and howling monkey. Also, removes that item name from the list of things to find, increases the number of found items by 1 and checks to see if all items are found.

There are probably some other things I forgot.

 

monkey

You might wonder how I got from SAS to here. Well, it all started with SAS macros. A macro is no more than a user-written function. When I was first exposed to this idea in graduate school back in the 1980s (yes, literally) my mind was blown! You mean, I could write my own functions?!

You might think this SAS macro that I wrote a couple of years ago

%macro sched(the_day,start1,finish1,teacher1,start2=0, finish2=0, teacher2=” “, start3=0,finish3=0, teacher3=” “);
if date_data = &the_day then do ;
if minutes > &start1 & minutes < &finish1 then tclass = &teacher1 ;
else if (&start2 > 0) & (minutes > &start2) & minutes < &finish2 then tclass = &teacher2 ;
else if &start3 > 0 & (minutes > &start3) & minutes < &finish3 then tclass = &teacher3 ;
end ;
%mend sched ;

doesn’t look like this JavaScript function

// Section to include sound. ;

function playJungleAudio(scene,langs) {
audio_e2 = new Audio();
audio_s2 = new Audio();

if(langs ===2){
audio_e2.src = "sounds/" + scene + "_eng.mp3";
audio_s2.src = "sounds/" + scene + "_sp.mp3";
if ($("#span_button").hasClass("noshow")) {
audio_e2.play();
} else {
audio_s2.play();
}
}
else {
audio_e2.src = "sounds/" + scene + ".mp3";
audio_e2.play();
}
}

If you look closely, though, these are identical in purpose and structure. Both are intended to package a set of statements that will then be executed when called. For both types of functions, SAS (macros) or JavaScript, parameters are optional. Both of these examples just happen to have parameters. Both have a defined start and stop.

In SAS it is

%macro macr0-name (parameters) ;

in JavaScript it is

function function-name(parameters) {

Both have a defined end, with SAS it is

%mend macroname ;

with JavaScript it is simply

}

 

Both are named functions (JavaScript also has anonymous functions), and when you call the function it executes.

It just so happens that both of these functions contain if-then – else statements.

To call the SAS macro, you give the macro name with a % in front of it, and include all the parameters in parentheses, separated by commas.

%sched(19292,790,840,”Elmo”,start2= 840, finish2=900, teacher2= “Bert”, start3=940,finish3=990, teacher3= “Snuffleupagus”);

To call the JavaScript function, you give the name, and include all parameters in parentheses, separated by commas.

 playJungleAudio("howler_monkey",1);

These parameters are then passed to the macro/ function and their values are plugged into the code between the beginning and end.

I have a lot more to say about this but it is getting close to 1 am and I have a plane to catch tomorrow so I’ll have to pick it up next time.

Speaking of  games – check out Making Camp, you can get it here for free. Play it and learn stuff because maturity is overrated.

wigwam

If you want to learn even more stuff, you can get a bilingual version of Making Camp for your iPad for only $1.99 and brush up on your Spanish like you always said you were going to do but didn’t

blocksSo you want to be a successful software developer / consultant ?

If you are in any kind of quantitative field you have a VAST range of options, from working at some of the largest companies in the world in marketing research to performing efficacy studies for non-profits whose staff members can be counted on one hand.

All of these broad number of opportunities require, at most, five building blocks:

  1. Programming concepts – You need to understand scope, do-loop, arrays, functions
  2. Data management – The thousand ways that users can enter data, and how to keep it from screwing up your results
  3. Working in a software development team – this is the part “self-taught” programmers are often not taught – documentation, testing and debugging
  4. Statistics – coming from the age when we inverted matrices by hand with a piece of pare and a pencil (not kidding) SAS, SPSS, R, Stastica, JMP and even Excel have made this a hundred times easier from when I started in the field
  5. Domain specific knowledge – by that, I mean if you are working in aerospace know something about what a transmitter and receiver are, know that a male and a female plug is a thing. If you are in biostatistics, understand survival analysis, relative risk.

(Yes, I know I said four in the previous post but then I thought about the importance of being able to work as part of a software development team and it’s my blog, so hush up.)

Since I started (mostly) with SAS, I’m going to talk for the next few posts about how starting as a SAS programmer can be like a Dr. Seuss book – “Oh, the places you’ll go!” My main point, as I have said before (weren’t you listening?) is that it doesn’t matter what language you use in the beginning. Eventually, I will tell you why SAS is a great place to start – better than many others – but it is not eventually yet. Patience is a virtue.

Let’s start with programming concepts. Now, I’d had a bit of BASIC, Fortran and COBOL before I got to SAS (yes, shut up, I’m old and in fact, yes I DID use a keypunch machine with punched cards like those women in Hidden Figures.  When the movie came out, one of our interns, in all seriousness, asked me if I was in it. I’m not quite that old.)

The basic concepts I use almost every day:

Arrays – I’ve written about those on this blog a dozen time. One of the most frequent uses I make of SAS is to score tests, which requires creating an array of answers from a respondent and a second array of items scored correct or incorrect. Our game, Making Camp, that teaches multiplication and division, has a virtual trading post and a wigwam, both of which make extensive use of arrays. All of the items you can “buy” with the points you earned from solving math and history problems are in an array.

SOME SAS ARRAYS

Data scored ;
set mydata.data2013 ;
array ans{70} q1- q70 ;
array correct{70} c1 – c70 ;
array scored{70} sc1 – sc70 ;

SOME  JAVASCRIPT ARRAYS

var things = [
“art/tomahawk.png”, “art/dog.jpg”, “art/pottery.png”, “art/deer_skin_sm.png”,
“art/bass_side.png”, “art/arrows_and_quiver.png”, “art/turtle.jpg”, “”,
“art/parfleche.png”, “art/feather_sm_side.png”,
“art/plate.png”
];

var things_name = [
“TOMAHAWK”, “DOG”, “POTTERY”, “DEER SKIN”, “BASS”, “ARROWS AND QUIVER”, “TURTLE”, “”, “PARFLECHE”, “FEATHER”, “PLATE”
];

Yes, they look a little different but the basic concept is the same.

In the SAS example, I’m matching three arrays – the answer the students gave, the correct answer and the item scored correct or incorrect.

In the JavaScript example, I am matching up two arrays, with the source for the image file and the alternate text for that element.

In her paper presented in 2010 at SAS Global Forum, Jennifer Waller says,

A SAS ARRAY is a set of variables of the same type that you want to perform the same operation on. The set of
variables is then referenced in the DATA step by the array name. The variables in the array are called the “elements”
of the array.
Every word of that applies in JavaScript except for “of the same type”. In JavaScript you can have mixed type arrays and if SAS would add that, it would make me very, very happy.
Arrays are a fundamental concept to any programming language, so mastering that concept is a step forward.
Truly understanding variables is another foundational idea – not just that they are not constants, but the concepts of type, format and scope – but that is a whole different post and The Invisible Developer is reminding me it’s almost 11 pm on Sunday night, so that will be my next digression.

Speaking of Making Camp, you can get it here for free. Play it and learn stuff because maturity is overrated.

wigwam

If you want to learn even more stuff, you can get a bilingual version of Making Camp for your iPad for only $1.99 and brush up on your Spanish like you always said you were going to do but didn’t.

Last post, I talked about bricolage, the fine art of throwing random stuff together to make something useful. This is something of a philosophy of life for me.

Seems rambling but it’s not …

Over 30 years ago, I was the first American to win the world judo championships. A few years ago, I co-authored a book on judo, called Winning on the Ground. 

Winning on the ground cover

When it came to judo, although I was better than the average person, I was not the best at the fancy throws – not by a long shot. I didn’t invent any new judo techniques.  I wanted to call our book The Lego Theory of Judo but my co-author said, “That’s stupid” and the editor, more tactfully, said, “Nobody will know what you are talking about unless they read the book and you want a title that will get them to buy the book”. So, I lost that argument.

What I was really good at was putting techniques together. I could go from a throw to a pin to an armbar and voila – world champion! Well, it took a long time and a lot of work, too.

How does this apply to statistics?

Let’s start with Fisher’s exact test. Last year, I wrote about using this test to compare the bureaucratic barriers to new educational technology in rural versus urban school districts. Just in case you have not memorized my blog posts, Fisher’s exact test can be used when you have a 2 x 2 matrix that fails to meet the chi-square minimum of five observations per cell. In that instance, with only 17 districts, chi-square would not be appropriate. If you have a 2 x 2 table, SAS automatically computes the Fisher exact test, as well as several others. Here is the code:

PROC FREQ DATA = install ;
TABLES rural*install / CHISQ ;

Ten years ago, I was using this exact test in a very different context, as a statistical consultant working with a group of physicians who wanted to compare the mortality rates between  a department that had staff with a specific training program and a similar department where physicians were equally qualified except for participation in the specialized program. Fortunately for the patients but unfortunately for statistical analysis purposes, people didn’t die that often in either department. Exact same problem. Exact same code except for changing the variable names and data set name.

In 35 years, I have gone from using SAS to predict which missiles will fail at launch to which families will place their child with a disability in a residential facility to which patient in a hospital will die to which person in vocational program will get employed to which student will quit playing an educational game. ALL of these applications have used statistics and in some cases, like the examples above, the identical statistics applied in very diverse fields.

Where do the Legos come in?

In pretty much every field, you need four building blocks; statistics, foundational programming concepts, an understanding of data management and subject specific knowledge. SAS can help you with three of these and if you acquire the fourth, you can build just about anything.

More on those building blocks next post.

Support my day job AND get smarter. Buy Fish Lake for Mac or Windows. Brush up on math skills and canoe the rapids.

girl in canoe

For random advice from me and my lovely children, subscribe to our youtube channel 7GenGames TV

 

I thought the title of Al Franken’s book , The Truth, with jokes , was great and I wanted to do something just like it. Unfortunately, I’m not that funny.

Often, the discussion comes up among colleagues whether it is better for one’s career to be a specialist or a generalist. It’s a little (a lot) too late for me to become the world’s foremost authority on PROC REPORT (that’s Kim Le Bouton, isn’t it?). Right after wondering whether anyone uses PROC REPORT any more, I starting thinking of all of the basic concepts I learned from it that I apply regularly, mostly with PHP.

My point, which you have by now despaired of me having, is that when it comes to starting a fascinating career, SAS is as good as starting place as any, and probably better than most.

If you decide to be a specialist, your career path probably looks something like this:

typical career path

You get a bachelors and a masters in statistics, you become a data analyst and work your way up to managing the entire division. If you do that, work your way up the ranks to knowing absolutely everything about clinical trials of migraine drugs, you’ll probably end up with a nice house in the suburbs, a 401K and three weeks of vacation each year.

If that’s you, cool. To be honest, though, I look at friends who have spent 20, 30 or 40 years in the same company and think I would lose my mind.

My career path

 

But, you say,

What can I do? I have an M.S. in statistics (or business or sociology) and two years of experience using SAS. What options do I have?

Well, honey, you have come to the right blog. In my decidedly non-linear career, I have been an industrial engineer,  professor in schools of education, engineering, business, liberal arts and human services. I think the only one I have missed is fine art. I’ve been a consultant, programmer, statistician, consultant again and now am president/co-founder of a gaming start-up.

Over the next few posts, I’ll explain a dozen ways in which I have built a career by bricolage – that is, from building stuff – programs, companies – using whatever was lying about . All of my various careers have had their roots in statistics and SAS. Could I have learned the same concepts and gotten the same results using another programming language, taking a different path? Probably. But I didn’t.

 


Support my day job AND get smarter. Buy Fish Lake for Mac or Windows. Brush up on math skills and canoe the rapids.

girl in canoe

I read a comment on line saying SAS probably would not disappear as an option for statistical analysis because “it’s good when you need to do a lot of data manipulation”.

I wonder what world those people live in that data comes all cleanly packaged and whether they have unicorns there.

Back on Planet Earth, I have a data set that has multiple records for the same date for the same students.  For some reason, the data were being sent at the end of each screen at one site, instead of at the end of the test. So, the data look like this:

kat123 4 5 18 11   2017-04-23 17:39:26

kat123 4 5 18 11   42 17 8 0 1 2017-04-23 17:41:12

and so on.

The students also took a post-test, months later, so …

I need the last record for each date, but my data has date and time

You might think doing

testday= datepart(date_entered);

would work and it would except for the fact that

My date is saved as a character format! What do I do?

You can read some suggestions here in SAS communities

https://communities.sas.com/t5/Base-SAS-Programming/how-to-convert-char-var-to-sas-date/td-p/45067

I could not find

2016-02-03 19:41:26

and I spent a good hour trying different methods to get this to work. I will spare you the details and maybe I could have gotten some method to work (no, whatever you are considering, I probably already tried). However, this occurred to me …

Do you really need to change it to a date format?

In this case, I was not doing any calculations with the date value, I simply needed the day part as a unique value.

I could just use the first 10 characters like this

day_of_test = substr(date_entered,1,10) ;

If you figured this out in the first sentence or two you are probably laughing by now (shut up).  Yes, it doesn’t matter if it is formatted as a date or not. So, that is what I did.  After creating a variable that is just the day of the test, I sorted by username, day of test and date entered (which included the time value). Then, I read in the data using the BY statement in the Data step so there would be  last. variable created that is whether or not this is the last record with that value in the BY group.  I output the last record for each day by using a subsetting IF statement.

Data fixdata ;
set mydata.aztech_pre ;

*** CREATE day_of_test variable as characters 1-10  ;
day_of_test = substr(date_entered,1,10) ;

*** SORT by username, day of test and date entered (including time);
proc sort data=fixdata;
by username day_of_test date_entered ;

*** DATA step that only saves last record ;
Data mydata.aztech_pre ;
set fixdata ;

***  BY statement to define that the data is by username and day_of_test ;
*** NOTE:  If you didn’t do the PROC sort first, this won’t work. For shame! ;
by username day_of_test ;

***
if last.day_of_test  ;
run;

So, that worked perfectly. I included my missteps because it is easy when you are a newbie to believe that everyone is smarter than you and never makes bonehead mistakes. Not so. We all make them all of the time. The important thing is, figuring it out in the end. Sometimes the easy way is not so obvious.

Or, maybe it is and I’m a bonehead. Either way, it worked. Now on to step 2.

 

When I am not writing about SAS, I’m making games that teach math, social studies and language.

Check them out.

screen shots from our games

Once every year, I teach an actual course, not a workshop or professional development, but a class with 20 – 40 students. One where I need to write a syllabus, have lectures, papers to grade, homework and exams.

Now, I’m not comparing teaching masters or doctoral students 3- 6 hours a week to my friends who teach middle school six hours a day. In fact, when I go for a day or two, as a guest speaker for six classes a day, and I need to stand on my feet and keep 40 teenagers’ attention for all of that time, I think yet again that teachers don’t get paid nearly enough.

There are several reasons that it is important to me to teach a course every year, and one is that I think it is super-important as someone who makes educational technology that I be in an actual classroom with students. It’s easy to forget how unbelievably BUSY teachers are if you are not in that situation day after day.

It’s also easy to overestimate the amount of time teachers have to investigate new technology. For example, for the course I am just finishing, I considered just two possible types of statistical software – SAS and SPSS.  The university had a license for one and it was available free (through SAS Studio) for the other. I knew R existed, of course,  but I did not consider it as an option for these students (long story I will skip). I had a short time to decide and someone suggested to me another option – JMP – that I had not considered, but by then I didn’t have time to research it, find a possible textbook and integrate it in my syllabus and lectures. If I’d had more time to look into it, that might have been a good choice.

I know there are other options out there- I had looked at Statistica at one point and it looked pretty cool. However, now that I have my syllabus done, lectures written, textbooks selected, model assignments and my students are generally doing pretty well, it is hard to see myself spending a lot of time researching new software applications for my engineering students.  (Social Science and Education might be a different issue).

My point is that one evident challenge for anyone who makes educational technology is the “good enough” problem. That is, if things are going good enough, teachers are not highly motivated to look for something better.

One of the things that drives me crazy, is those teachers who think it’s “good enough” when the vast majority of their students are below grade level or not proficient – but that’s a rant for another day.

(If you’re fascinated by this topic – and who wouldn’t be – I wrote more about why teaching helps me run an ed tech startup on my other blog over on the 7 Generation  Games site)

 

When I am not writing about statistics, I’m making games that teach math, social studies and language.

Check them out.

screen shots from our games

Next Page →