First off, the good news. You can find all of the papers from SAS Global Forum 2015 online.  This is good news if you are anything like me (and you should be, because, let’s face it, I’m awesome) because even if you went to Dallas there were no doubt several papers you wanted to attend scheduled at the same time.

I liked everything I attended but there were two that stood out as really interesting. The first one was …

Taking the Path More Travelled – SAS Visual Analytics and Path Analysis
Falko Schulz
You can download it here
http://support.sas.com/resources/papers/proceedings15/SAS1444-2015.pdf

My idea of path analysis is a series of regression coefficients where you calculate direct and indirect effects. That is not the path analysis discussed in this paper.

He literally means what path did the customer (critter, whatever) take ?

For example, your path in using this website could be you went to the home page then blog page home then the previous entry on the blog.

While websites are an obvious use for this type of path analysis, there could be many others – customer experience in a call center, where people go in a huge department store, migration of humans or animals, path to achieving a job at a start-up.

Drop-off is often of interest in a path analysis – did they fall out of the path before the endpoint you wanted, e.g., sale, employment, customer support problem solved?

You can also look at weight in a path, not only whether they buy a widget but how much money did they spend?

Visual analytics allows for path segmentation. You can combine items or exclude items.
In the example, Schulz discussed using path analysis to see how effective your different online marketing methods are. Since many people will come from typing your name into a search engine, you may want to delete those paths and only include ads from Google adwords, blogher, your corporate website and other paid marketing efforts.

You can click on events and select Exclude to filter out all paths beginning with those events that are not of interest to you.

Sankey diagrams are available in visual analytics. Although these have their origin in uses like energy flow, they are now being applied all over the place.

Here is a sample from Schulz’s paper

sample sankey diagram

Sample Sankey Diagram

A Sankey diagram, FYI, shows the direction and quantity of the flow along a path. There is a blog devoted to Sankey diagrams here.
http://www.sankey-diagrams.com/sankey-definitions/

(This wasn’t mentioned in the paper, I just found that interesting. I’m sure there’s a blog out there devoted to Gantt charts that I could find if I looked, which I didn’t.)

Once the path analysis roles of interest are defined:

  • Event
  • Sequence
  • ID

… one of the first things to do would be drop the number of paths displayed. Just imagine the mess you would be looking at if you tried to visually display all of the paths someone took in navigating a website with even a few hundred pages.

You can edit the minimum path frequency, e.g., only show a path if at least 250 people took it.

This is just a brief, brief taste of what you can do with path analysis using SAS Visual Analytics and the coolness of SAS Global Forum. There was a lot, lot more and I’ll try to post about the second paper I really liked this week,

tractor in dirt field

but for now perhaps I should quit looking out the window and pay attention in this training session I’m sitting in at Fort Berthold (don’t tell Bruce I wrote my blog during it).

If you missed out on SAS Global Forum, you don’t need to wait until next year for your fix of networking, instruction (and possibly drinking). You can go to the Western Users of SAS Software conference in San Diego in September.

Great! You are using SAS Studio. It’s free. Even greater. You cleaned your data, created subscales. You have this perfect dataset and now, you want to save that dataset to your desktop and maybe do some more work with it, or just open up and admire it – who am I to judge?

Follow these three easy steps:

1. Right-click on the data set.

export option  from  libraries

2. Select Export and export it to one of your folders as, say, a .csv file.

3. Go to that file, select it, and click download.

download option from folder

I finally am getting around to something in SAS Studio that I think is really cool – the tasks.

Although they don’t look identical to SAS Enterprise Guide just because the screen layout is a little different, these are really, really similar to the tasks you would see in EG.

screens for SAS studio tasks

If you are using this with a real beginner class, you can start out with using the sashelp directory. Otherwise, the only programming they will need is to assign their directory at the beginning. Run that program and away you go .

Let’s take an example with SASHELP.

1. Log into your SAS on-demand account and select SAS Studio

2. Click on tasks in the left pane.

tasks pane

3. Select statistics

4. Select distribution analysis

Note that Studio will show you the type of variables required for your analysis

Window with option for distribution analysis Window with option for distribution analysis

It will also tell you in the right window pane whether you are unable to run your analysis and, if so, what you are missing

code windown telling what you are missing

To select a variable, just click the + sign and you’ll see a list of the variables in your data set

Select the desired variables for the roles and click your little running guy at the top. (This will be greyed out until you have all of the required fields filled in.)

running guy

Your results will appear in the right window pane.

charts of distribution by married or not

If you want to see the code, click on the code button.

 

proc univariate data=SASHELP.BWEIGHT noprint ;

class married ;

histogram Weight ;

run ;

To keep your program, copy the code

  • Click on folders
  • Click on the far left button and select new program

location of new program button

paste in your code.

Save your program.

program pasted from tasks

You could do a whole bunch of analyses this way and come up with a lot of results and a long SAS program without knowing anything about programming SAS. Some people would find that horrifying but I think it’s really cool.

A really interesting assignments for students would be to take a data set in the sashelp library, do as many tasks as they can and see what interesting results and conclusions they can find.

Why?

Are you kidding me?

If you are a programmer, analyst, statistician, professor or student who uses SAS this is an opportunity to get to know your people and to get known.

I’m in Dallas for the SAS Global Forum, which I try to attend whenever I can. Yes, I could watch videos on the Internet, read books, read web pages, but I often don’t because I have a to-do list a mile long.

By presenting at the conference, I have to review what I am doing in teaching with SAS Studio and why.

SHAMELESS PLUG: My session on Preparing Students for the Real World with SAS Studio is a good one for both anyone who teaches with SAS and for anyone who is new to the SAS world and wants a good introductory session.

Since I am at the conference, I have a little bit of downtime to look into SAS resources. My new favorite is SAS communities. It’s a combination forum and free library. I must have looked into it at some point, because I had an account, but it seems to be more active now. I even submitted an article and poked around in the forum.

Then, of course, there are all of the sessions that I will attend, conversations  I will have with people, books I will hear about and buy, to read on the plane ride home.

It’s a week of learning.

But , but, you stutter like a motor boat, it’s expensive and far away. I can’t afford it. Besides, I would feel uncomfortable presenting at the same conference with all of those people who wrote the books on SAS (literally).

The expensive part I get. The not feeling like you could present at the same conference part is just silly, so I’m going to pretend you didn’t say that.

If travel and cost is an issue, present at your local conference. The call for papers for the Western Users of SAS Software (WUSS) is open. Do it now!

It is painless. You submit a 300-word abstract. You can submit a working draft of the paper at the same time. That’s not mandatory but it improves your chances.

There is even a mentoring program where old people (like me), will help you revise your program and get ready to present.

Writing and presenting the paper will force you to think about what you are doing and why. You will likely make some contacts of people who will be potential employers, collaborators or drinking buddies.

What are you waiting for? A personal invitation?

Fine! Here you go.

gif_invited_0100

 

Need a topic? Here are 10 I would like to see

  1. The 25 functions I use most.
  2. Uses of PROC FORMAT .
  3. Multinomial logistic regression.
  4. The many facets of PROC FREQ.
  5. Factor analysis
  6. SAS for basic biostatistics
  7. Macro for data cleaning
  8. Model selection procedures
  9. Mixed models vs PROC GLM
  10. SAS Graphs without SAS/Graph (because SAS/Graph appears to be written in Klingon)

My point is that if I sat here and thought of 10 off the top of my head after two glasses of Chardonnay and half a glass of the champagne someone who will remain nameless bought at Costco and brought here from a state in the WUSS region, then I’ll bet you could come up with something really awesome stone-cold sober and given more than 60 seconds.

Let’s recap what we have learned here, shall we?

  • Join SAS communities,
  • Attend conferences, whether national or global,
  • Don’t be a wallflower – present!
  • Texas steak and wine is a good combination (not particularly related to SAS but true nonetheless)

waiter carrying champagne

As you have no doubt brilliantly deduced from the title, this is installment number four in Mama AnnMaria’s Guide on How Not to Get Your Sorry Ass Fired.

dead guy

Dead guy

Do the work you are assigned to do.

This may seem like anyone with a brain functioning above zombie  level could figure this out. However, I have seen many people who do not appear to be zombies who can’t quite master this concept.

Variation 1: Doing work other than what you are assigned because you are more confident doing something else.

If you are supposed to be writing a new database program but instead you update the wiki because you don’t consider yourself an expert on SQL and PHP then you are on the road to getting your sorry ass fired. Unless you lied on your resume (in which case you deserve to be fired), I’m willing to bet that your boss knows you are not an expert and either:

  • Assigned you something that requires below expert level of expertise, or
  • Believes you can learn enough to accomplish the task.

In either case, do the work you are assigned to do.

Variation 2: Doing work you were assigned to do later instead of the work you were assigned to do now.

Again, this is often because you feel more confidence in your ability to plan the office Christmas party than updating the operating system. However, it is July and your company is still using Windows XP.

Get on it.

Variation 3: Finding an excuse why you cannot do the work.

This is the quickest path for getting your sorry ass fired. Let me explain how it looks to me:

I have given you work to do because I don’t have enough time to do it all myself. Instead of doing the work, you come back to me with more work, making it my problem instead of your problem. Do you really think I hired you because I was thinking to myself,

“Gee, I don’t have enough work to do. What I really need here is someone who will bring me more work.”

Some people might ask,

“But don’t you want me to tell you if there is a problem?”

Let me explain this to you in short words.

I want you to do the work I assigned you to do. That is why I assigned it to you instead of doing it myself.

This doesn’t mean that, for example, if you don’t know the password to log in to the server you shouldn’t ask someone. It does mean that most of the time, you should solve the problem yourself if possible.

The worst example of this I ever met was a woman who never could do any work because there was always some obstacle in her way. The final straw came the day she told her boss that she had not created and printed the company newsletter because they were out of paper.

Guess whose job it was to order the paper? When he pointed this out to her, she argued that her job description said to order office supplies but no one had specifically told her that the office was out of paper.

She got her sorry ass fired.

——-

8 fish in a stackWant to be smarter? Of course you do.

You still have a few hours left to back us on Kickstarter

 

If you totally missed out on the Kickstarter, don’t despair, you can buy Spirit Lake or Fish Lake here

 

view over the top of my ipad

It has been pretty well established that I am the worst soccer mom in the history of soccer moms. Most of the games I miss because I am somewhere else. My children have told me that my autobiography should be entitled, “I was out of town at the time” because most of the stories of their childhood begin this way.

Having come back in town shortly before the game this weekend, I was unaware that it was a two-day tournament 2 1/2 hours from home and that we were supposed to have reserved the hotel weeks ago. Hot tip: If you get your reservation last minute and have the choice of a close hotel or a nice hotel, get the nice one.

I fulfilled my obligation. I showed up. During the time The Spoiled One played, I watched. During half time and the breaks between the games I was able to write a couple of blog posts and test out SAS Studio.

If you look at the picture above you might see that I was working in a field surrounded by mountains. Not the best situation for Internet access, which I had via the hotspot on my iPhone.

SAS program screen

I was able to log on to SAS Studio with no problem. When I logged in on my iPad I had the screen shown above where I could just start typing my program in the code window.

To see folders, libraries, etc. tap the BROWSE link in the top left corner, as shown

list of folders and libraries

You can tap any of the categories to bring down the list of folders, libraries, etc. You can tap on a file to open it.

The one problem I did have, and depending on your situation, it may be a severe one, was that I could not get any of the libraries to open. I wanted to open the sashelp library and see if I could run some tasks using an open data set. This did not work. It is very possibly related to poor Internet due to laying in a soccer field ringed by mountains. I tried it last year in a movie theater and I was able to access the libraries. In this case, as you might guess from the top photo, the Internet was barely accessible.

Next, I tried simulating a homework problem a student might have, just typing in some data and running the program.

running a program

I have a bluetooth keyboard I use with my iPad and it all worked fine. I typed in data, tapped on the little running guy and my program ran fine. You can see the results below.

results of proc means

To save it, I held down the home button and the power button simultaneously, just like any time you take a screenshot on an iPad. Then, I emailed that screenshot to myself, so here you have results.

My point is that a student could do their homework using SAS Studio in the middle of a soccer field on an iPad, as long as it did not require external files, which most of the homework I assign does not. They could then email the results to their professor, still from the (dis)comfort of the field.

This is useful to know for three reasons:

  1. I travel frequently to areas where there is very limited bandwidth,
  2. Many of the students in my online courses live in areas with limited bandwidth,
  3. The Spoiled One’s team won their bracket in the State Cup, so it turns out that means they have more soccer games next weekend as they advanced in the tournament. This is not at the same field surrounded by mountains. It’s at a different field at the edge of the desert. Sigh.

Take-away points:

Your students should be able to use SAS Studio almost anywhere, even if all they have is an iPad.

This is doubly true if you don’t assign homework that requires accessing external datasets.

I’ll be able to review homework assignments for the course I am teaching next during the soccer tournament this weekend. (I really AM the worst soccer mom in the history of ever.)

girl playing soccer

—————— SHAMELESS PLUG

Our Kickstarter campaign is still going on, making adventure games to make math (and history and English) awesome.

We are 84% of the way to our goal!

Show your “blog appreciation” and help us get the last few steps by backing us now. 

 

Is that enough acronyms for you? I’ll be speaking at Celebrating Equity: Women in STEM at ELAC.

STEM = Science, Technology, Engineering and Mathematics

ELAC – East Los Angeles College

It’s 12:15 – 1:15 pm and it is free. There are six panelists (including me).

Download Women in STEM Poster

I presented last year and our company also had a booth. We hired two people who I met there.

Often, I hear people say that their company is all white/ Asian /under 40 because all of the developers / animators/ audio engineers  that applied just happened to fit that demographic. Here is a thought – perhaps you could go to, say, a college that is predominantly Hispanic and just maybe Hispanic potential employees might meet you there.

Here is another thought – perhaps if you attended events targeted at women in STEM, you might meet some there.

====

Wonder what a game would look like if it was created by a design and development team that was predominantly women?

Player needing help

 

Back us on Kickstarter, play an awesome game and wonder no more!

Getting ready to teach biostatistics in a few weeks and it seems to me that the real confusion in most cases is not the calculations, which can be fairly simple, but rather that there can be several ways of looking at the same question. Let’s take “risk” as an example.

What is the “risk” of diabetes?

You could answer this by prevalence – 9.3% of Americans have diabetes. So you could say you have about a 1 in 11 chance of having diabetes. Is that your risk?

On the other hand, incidence, the number of new cases per year is about 1.8 million, which comes out to around 0.6% in a population of 313 million. So, your chance of being newly diagnosed with diabetes is around 1 in 200. Is that your risk?

In discussing risk of a disease, it may be useful to consider the specific population. For example, the CONDITIONAL risk of having diabetes given the condition that your ethnicity is Asian-American of Chinese descent is 4.4 %. (Conditional risk of a disease is defined here as the prevalence given a specific condition.)

Conditional risk given that you are Puerto Rican is 14.8%.

What is the relationship between diabetes and ethnicity?

This is another simple-sounding question that can be answered in multiple ways. First of all, what is your reference group?

Is it, say, Puerto Ricans compared to the total prevalence of 9.3% ? Is it Puerto Ricans compared to non-Hispanic whites? To all Hispanics? To Americans of Chinese descent?  If the latter sounds silly, I’m not sure why it is any sillier than non-Hispanic whites, but perhaps someone can enlighten me.

Once you have a reference group, then what do you pick as the method of measuring relationship?

Risk difference is the absolute value of difference in probabilities between two groups.

So, if the probability of someone who is Puerto Rican having diabetes is 14.8%, which it happens to be, and the prevalence of diabetes among Central and South Americans in the U.S. is 8.5% (which it also is), the risk difference is 14.8 – 8.5 = 6.3%.

The relative risk is the risk of one group divided by the risk of the other group. So, the relative risk is 1.74.  Rounding it up, you could say that Puerto Ricans are twice as likely to have diabetes as Central or South Americans – which sounds considerably different than that the difference between the two ethnic group risks is .063.

Then there are odds ratios, which I have written about extensively, including here.  Proportional attributable fraction, proportional attributable risk.

Well, I can go on for weeks – and will, once class starts.

How to make it all less confusing

Start with this question, “What do you want to know and why do you want to know that?”

If you want to know what the probable demand for insulin will be in the next year, you might care most about prevalence + incidence. If you are interested in predicting diabetes 10 years from now, you might be very interested in differing probabilities within ethnic groups, as some have a much faster rate of growth than others.

If you are interested in screening or prevention, you would be very interested in which groups have the highest incidence.

I’m thinking a fun and useful thing to do for both biostatistics and epidemiology would be to have students make a flowchart with questions like : If you want to know this, then do that.

That’s a couple more posts, at least.

————————–

Feel smarter? Want to be even smarter?

Check out what I’m analyzing these days, data from games that make you smarter. You can back us on Kickstarter at $10 or more and get the newest game yourself.

Or, you can go to my session at SAS Global Forum and learn about preparing students for the real world of data with SAS Studio

Any time I hear someone brag,

“I’ve never used X in my life,”

I automatically assume that whatever it is, they haven’t learned it very well. Just about everything I’ve learned has come in useful, and the better I learned it, the more useful it is.

Take statistics, for example. There is nowhere in my life that knowledge of statistics isn’t helpful. Darling Daughter Number 3 competes in mixed martial arts and I’m the worrying type.

Ronda armbars

Darling Daughter 3 Defending World Title (Photo by @HansGutknecht )

Whenever her next fight is announced, the very first thing I do is check the fight odds. For the one coming up in Brazil, she is a 15-1 favorite. Knowing that makes my stress level go down a little. I’ll still drop by her gym a time or two during camp just to reassure myself that all is going well. As I said, I’m a worrier.

Player needing help

Back our Kickstarter game, Forgotten Trail!  Read more about what I’m worried about today here. Watch the video. It’s only 2 1/2 minutes!

The latest thing I’m worrying about is our Kickstarter campaign, but here again, statistics cheer me up. Two years ago, we did a Kickstarter campaign with a goal of $20,000. I should have researched a bit better in advance because even though Kickstarter touted  the 44% success rate that is an average (there’s that knowledge of statistics again). Things that were less likely to get funded were projects seeking over $10,000, game projects and projects not featured on Kickstarter. We fit all three. Pretty depressing. In fact, looking at the statistics after we had started our campaign last time I found that less than 5% of campaigns raised over $20,000.
Well, we made it. You’d think we have learned our lesson, but due to a couple of reasons, I’ll go into another day, we decided to do ANOTHER Kickstarter two years later. So, here we are today.

tired girls on hillThe bad news is that the success rate on Kickstarter has gone down. The overall success rate is now 39% .  The semi-good news is that the success rate for games actually ticked up a bit – it was 33% two years ago and it is 34% now.

The really good news: success tends to be all or nothing – 79% of projects that raised 20% of their goal ended successfully funded. Of projects that raised 41% of their goal, 94% went on to be successfully funded. We’re at 42% and we still have two-thirds of our campaign to run, so I’m feeling somewhat less worried.

So, now that you know what the odds are, help a sister out and go back us. I know you have access to the internet, because you’re reading this!

 

 

 

There is not nearly enough replication in scientific research. It’s unfortunate that funding agencies and academic journals always want to see a new twist – a different technique, a different population. Personally, I’m very interested in reading studies that say:

“I did the exact same study as Mary Lou Who and I found pretty much the same thing.”

One reason this is interesting is that it controls for the history effect. Maybe a specific event determined the outcome. A second reason I find replication interesting is that people are very quick to generate causal hypotheses to explain relationships after the fact. In a subsequent study, those hypotheses can be assessed. Do they still stand up?

Here is an example that comes up in my personal life a lot. People assume since Darling Daughter Number 3 is on TV and in the movies a lot that it helps my business.

Let’s take a look at the graph below:

chart of web statisticsThis shows website statistics for The Julia Group site. Those lines are average daily visits to this site in months when my little pumpkin had UFC world title fights. I used average daily visits to control for the fact that some months have more days than others. Contrary to expectations, the months when she had fights I had stagnant or declining number of visitors. Hearing this, some of the same people who had suggested her career would have a positive effect on business, without blinking an eye reversed themselves and said it must be because I was distracted and away from the office during those months.

chart2

Let’s replicate that graph with data from 2012-2013. You see a pretty similar trend between the top and bottom lines. Over the past couple of years, visits have been rising, so the average daily visitors is higher than in 2012-13 but the pattern is the same – an increase during the months from September to December and fewer visits in the summer months. December 2012 was a little unusual compared to most years – usually there is a drop over the holidays.

Because I see these same trends year after year, I realize it’s not at all attributable to how much Ronda is in the media in a given month. It’s a seasonal trend. Since I write about statistics and programming a lot, I’m pretty sure more people come to this blog during the academic year when they are taking a class. Also, people can read my blog at work and pretend it is work-related, even if I’m just ranting about something that day, because, hey there is a possibility that it COULD be about something relevant.

This assumption is further supported by the fact that the lowest days of the week for website visits are Saturday and Sunday.

It’s also interesting when you don’t find the same thing

If one defines “interesting” as not getting what you want, I had an interesting experience with a research project recently. Replicating the project a second year, we ran into all kinds of technical difficulties and the results were far from significant. In short, the subjects did not receive the planned intervention so no effect of intervention was observed. Much swearing ensued. I’m now analyzing data from the third year of the same project.

Multi-year studies make so much more sense to me and it troubles me that there are not more of them. I understand the reasons. For one thing, there is so much pressure to publish in many institutions that people put out as many articles as they can as quickly as they can (everyone except for YOU, of course). They are expensive and it is hard to justify funding to study something you already supposedly studied and reported the results.

Yeah, I get it, but just like those people who confidently explain my website statistics, without replication it is too easy to be persuaded that one’s first, or completely contradictory second, hypothesis is correct.

=============

chicken

Want to be even smarter? Back us on Kickstarter. You can check out the video to see what I am researching now. Yes, I collect data from video games with animated chickens. Don’t judge me.

Next Page →