Home > Stata > New Stata function: vlgen

New Stata function: vlgen

I wrote a small Stata program (Stata is statistics software, if you didn’t know), called -vlgen-, for variable and label generator.  In Stata, you can create labels for your variables to help you remember exactly what they contain.  So, you might have a variable called rfI, and to remind yourself what exactly that is, you might give it the label “rainfall in Iowa”.  Now suppose you have a model that depends on the square of rainfall (I don’t know why, but just suppose you do have such a model).  Then you might generate a variable (rfI)^2, and this variable would either have no label, or the label would probably be “(rfI)^2” depending on how you generated it.  Now, if you use -vlgen-, the label would automatically be “( rainfall in Iowa ) ^ 2”, which might be more helpful, especially if you couldn’t remember what  rfI stood for in the first place.

This function is up on SSC as of yesterday.  (SSC is a statistics program archive, mostly composed of Stata programs.)

Advertisements
Categories: Stata
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: