Wednesday, January 6, 2010

R syntax

Comically, I spent untold hours and a meeting with my adviser trying to figure out what was a very simple syntactical error. I wrote two loops, where the outer loop changed the name of the column index, and the inner loop changed the name of the row index. I was having trouble getting the name of the column passed to the assignment function, and I experimented with at least four different ways of doing it. The matrix that the loops are running on is very large, so the thing took a long time to run. I finally created a toy problem that could run quickly to explore the problem; turns out my first approach was essentially correct, I just used unnecessary quotes. Ha. Now that's experiential learning. I learned a whole bunch of other functions in the process, though they didn't turn out to be useful in this case.

My adviser suggested a new approach based on the results of my work over break: since it appears that the patterns of the indicators are fairly stable for many years before bankruptcy, but then have bizarre behavior, it might be advantages to use a change point detection method rather than trying to use the slopes as a predictor. This would mark any abnormal behavior, and would in itself be a significant find.

No comments: