Displaying 4 results from an estimated 4 matches for "ind_2d".
2010 May 03
1
question about the degrees of freedom
...w, i wasnt in the first mail because i thought it is a simple question to answer,
so; i have a panel data which contains 48858 observations during 3 year therefore, there are 146574 observations in total,
i have 22 different industries defined by 2-digit codes
such as 11, 13,14,16...40 therefore, ind_2d contains 22 2-digit codes
for example; i want to do a by-industry analysis and this requires to estimate the same model for all 22 industry!
as i said total number of observations are 48858(each year), but the 11th industry has 9466 industries. i mean the code 11 corresponds to 9466 indsustries...
2010 Apr 23
1
creating dummy with loop command
...) but i couldnt how to find a solution for that.
i am using 2 digit industry codes and 3 digit industry codes for my model, and i need to create dummies for the industries. The case is simple for the 2-digit industries since there are not that mcuh of them, so i am creating my dummies as following
ind_2da<-(ind_2d==11)#for the 11th industry
ind_2dc<-(ind_2d==12)#for the 12th industry and so on so forth ... then i directly put the dummy into the regression which works well.
but creating dummies for the 3-digit is rather complicated since there are alot of sub-industries, for example:111,112,1...
2010 May 03
2
question about the degrees of freedom
...stic: 8.027e+05 on 6 and 146160 DF, p-value: < 2.2e-16
as we can see from the last row there are 146160 DF (407 deleted) this is ok!
but when i want to use for example just one of the industry lets say just the 11th industry
1st: i create the dummy for this industry such as;
>ind1=(ind_2d==11)# so here the R supposed to consider just the 11th industry!!
> abc<-lm(lnQ~lnC+lnM+lnL+lnE+eco+inno+ind, data=ds)
> summary(abc)
Call:
lm(formula = lnQ ~ lnC + lnM + lnL + lnE + eco + inno + ind,
data = ds)
Residuals:
Min 1Q Median 3Q Max
-11.03392...
2010 Apr 23
1
creating dummy with loop command
...>
>> i am using 2 digit industry codes and 3 digit industry codes for my model,
>> and i need to create dummies for the industries. The case is simple for the
>> 2-digit industries since there are not that mcuh of them, so i am creating
>> my dummies as following
>> ind_2da<-(ind_2d==11)#for the 11th industry
>> ind_2dc<-(ind_2d==12)#for the 12th industry and so on so forth ... then i
>> directly put the dummy into the regression which works well.
>>
>> but creating dummies for the 3-digit is rather complicated since there are
>> a...