Re: [R] If loops?

2012-11-01 Thread kebrab67
2008 2008 > > #5 B 2008 2008 > > > > identical(dat2[,3],pmin(dat2[,2],2009)) > > #[1] TRUE > > > > identical(dat2[,4],pmin(dat2[,2],2009)) > [1] TRUE > > > A.K. > > > > > > > > - Original Message - > > From: kebrab67 &

[R] If loops?

2012-11-01 Thread kebrab67
I have a set of data with 205 988 observation sand 10 variables , three of which are Legal_status, Date_of_incorporation and Last_year. I set my time horizon from 1989 to 2009. Now I want to know when a company is dead. If Last_year is bigger or equal to 2009 then I say that a new "variable" last

[R] IV estimation

2012-04-30 Thread kebrab67
Hello, I have a set of 100 variables with 1560 observations. I did an O.L.S regression of three of these variables on a fourth. But there are problems of endogeneity... So I look in my dataset for instruments to do an IV. I can't find a good instrument because their correlation with my endogeneous

Re: [R] "Conditional" average

2012-04-25 Thread kebrab67
id age76 Wage76 Grade76 Black immigrt. ... 1 25 102456 12 1 0 2 27 15432 15 0 1 3 30 12340 16 1 1 Then I have lots of data variables 100 for 5000 indi

[R] "Conditional" average

2012-04-24 Thread kebrab67
Hello, I have a set of data including age, wage and education level each called age76, wage76 and grade76 I want to know how i can calculate the average wage of people age 15 to 65 (each year separetly) , only for those who have an education level of 10 12 and 16... -- View this message in contex

Re: [R] r ols help

2012-04-07 Thread kebrab67
I see what you mean as I go trgouh my courses (chapters related to type i and II errors) Is there any way in the therory for me to choose which variables in a set of variables explain more my Y. Or should I base my reflexion solely on economic theory and discriminate between variables? -- View thi

[R] r ols help

2012-04-07 Thread kebrab67
The eleventh variable is log(wage) and the 10 other variables are actually all at least theorically significant to the regression. like wether the person is black, immmigrant, it´s experience, age, if he works in a city... But i need only take a few variables out of this ten. Actually taking only

[R] R help

2012-04-07 Thread kebrab67
I have a 11*1562 set of data. I want to regress using ols all combination of the ten variables on the eleventh. Store the results of the t test of each regression and the r2 to compare which combination is better. the combination can use any amount o variables. How can I do that in R? -- View this