Nov 13
Finite mixture models in Matlab
Here are some options for estimating finite mixture models in Matlab. Some allow simple univariate analysis while others allow finite regression mixtures. You have a choice of an EM or Bayesian approach.
Nov 13
Here are some options for estimating finite mixture models in Matlab. Some allow simple univariate analysis while others allow finite regression mixtures. You have a choice of an EM or Bayesian approach.
Jul 20
Quick tip: the default Archive Utility in Leopard can’t handle password protected files. If you don’t have a copy of stuffit to hand, you can always open up the terminal and use the command unzip [filename] which will prompt you for the password.
Jan 17
Here is some simple code to transform those pesky CRSP dates (YYYYMMDD) to Stata compatible dates: insheet using "/Users/michaelewens/Archive/UCSD/returns_paper/data/stock_indices/sp_daily.csv"
rename caldt date
* Date Transformation gen year = floor(date/10000)
gen month = floor((date - year*10000)/100)
gen day = floor(date - year*10000 - 100*month)
* replace the date
replace date = mdy(month, day, year)
format date %td
Nov 26
Here are some things I learned today about my Mac:
Nov 26
The new Mac OS Leopard uses a different graphics engine which Matlab 7.4+ does not like. Working in the UI is painful. No more! Just follow this simple solution to bring back smooth, fast scrolling.
Nov 23
After I upgraded to Leopard from 10.4.x, my PHP processes stopped working. The new OS overwrote some configuration files. Check out this post on how to get things working again.
Oct 07
Working with Stata’s do file editor is one of the most painful exercises. The lack of syntax highlighting means a large do file is basically unreadable. Enter TextMate. One can edit and send .do files to Stata directly from a Textmate project. If you have the standard Stata Intercooled, then download and install the Stata bundle. Next, go to “Bundles –> Bundle Editor –> Show Bundle Editor” and find the Stata bundle. Select the “Send File to Stata” command and edit the first line “StataMP” to read “Stata.” Do the same with the “Send Selection to Stata.” Now open Stata, cd to the project directory, open your do file in TextMate and start editing. Bask in the glory that is syntax-highlighting.
Sep 04
Corporations like Google and Cisco and spending a increased amount of their cash reserves on start-ups in the US and abroad. Moreoever, in contrast to the corporate VC activity of the late 1990s, they are taking a longer-term view:
Intel has restructured its fund to emphasize financial returns and is investing in follow-up rounds in its portfolio companies—something it didn’t do before. “There’s no strategic value unless each individual investment is successful,” says Intel Capital President Arvind Sodhani. “A bankrupt company is not very strategically valuable to Intel—or to anybody for that matter.”
Sep 01
Suppose you have a string variable with a finite number of values (e.g. US states, industry, etc). The encode command plus the generate command will create a new variable that assigns unique ids to each string value:
encode your_string_variable, gen(new_string_as_int)
The labels in the edit/browse view will look like strings, so make sure you use ‘nolabel’ on any export or tab commands.
Aug 22
If you want to edit remote files in TextMate (say with Transmit over FTP), opening them up usually means individual windows. No more. Follow these simple instructions and you can have a project with tabs whenever you edit a remote file.