OptinMon

Loops in Stata: Making coding easy

October 21st, 2014 by

We’ve already discussed using macros in Stata to simplify and shorten code.

Another great tool in your coding tool belt is loops. Loops allow you to run the same command for several variables at one time without having to write separate code for each variable.

This discussion could go on for pages and pages because there is much you can do with a loop. (more…)


Macros in Stata, Why and How to Use Them

October 17th, 2014 by

We finished the last article about Stata with the confusing coding of:

local continuous educat exper wage age

foreach var in `continuous'{
graph box `var’, saving(`var’,replace)
}

I admit it looks like a foreign language.  Let me explain how simple it is to understand. (more…)


Using Stata Efficiently to Understand Your Data

October 3rd, 2014 by

Most statistical software packages use a spreadsheet format for viewing the data. This helps you get a feeling for what you will be working with, especially if the data set is small.

But what if your data set contains numerous variables and hundreds or thousands of observations? There is no way you can get warm and fuzzy by browsing through a large data set.

To help you get a good feel for your data you will need to use your software’s command or syntax editor to write a series of code for reviewing your data. Sounds complicated.
(more…)


How to Get SPSS GENLINMIXED Output Without the Model Viewer

September 26th, 2014 by

I love working with my clients.

I love working with my clients for many reasons, but one of them is I learn so much from them.

Just this week, one of my clients showed me how to get SPSS GENLINMIXED results without the Model Viewer.

She’s my new hero.

If you’ve ever used GENLINMIXED, the procedure for Generalized Linear Mixed Models, you know that the results automatically appear in this new Model Viewer.  (more…)


Model Building Strategies: Step Up and Top Down

September 19th, 2014 by

How should I build my model?Stage 2

I get this question a lot, and it’s difficult to answer at first glance–it depends too much on your particular situation.

There are really three parts to the approach to building a model: the strategy, the technique to implement that strategy, and the decision criteria used within the technique. (more…)


Why Use Stata?

September 15th, 2014 by

Like many people with graduate degrees, I have used a number of statistical software packages over the years.

Through work and school I have used Eviews, SAS, SPSS, R, and Stata.

Some were more difficult to use than others but if you used them often enough you would become proficient to take on the task at hand (though some packages required greater usage of George Carlin’s 7 dirty words).

There was always one caveat which determined which package I used. (more…)