search for: thomsonj

Displaying 2 results from an estimated 2 matches for "thomsonj".

Did you mean: thomson
2013 Jan 30
1
Creating dummy variables in r
Hello, Semi-new r user here and still learning the ropes. I am creating dummy variables for a dataset on stock prices in r. One dummy variable is called prev1 and is: prev1 <- ifelse(ret1 >= .5, 1, 0) where ret1 is the previous day's return. The variable "prev1" is created fine and works in my regression model and for running conditional statistics. However, when I call the
2013 Jan 08
3
Conditional Statistics
Hello, I am a new user of R. I am coming from SAS and do statistics on stock market data, economic data, and social data. My question is this: How can you get the mean, standard dev, etc. of a variable based on a conditional statement on either the same variable or a different variable in the same data set? So if I had the closing prices of the S&P from 01/01/1990-12/31/1990, how could I get