search for: dummy_var

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

Did you mean: dummyvar
2009 Dec 20
1
"Object is not a matrix" Error
I'm trying to follow this guide here: http://www.ats.ucla.edu/stat/r/modules/dummy_vars.htm In which I'm creating categorical variables using the factor function. I am able to go through the example listed above and have everything work, however, when I try to input my own numbers, I get an error. I input the following: > hits = read.csv(file.choose()) > attach(hits)...
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