Thank you for your advice, ill try to be more explicit now, 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
so i  want to run the regression just for these firms

ind_2d = is industry 2-digit codes in the dataset

when i want to see the overall effect of the independent variables, i dont 
define any industry dummy 
but to see the effect of the independent variables on the 11th industry i 
defined a dummy variable such as:
ind=(ind_2d==11)#
this supposed to mean, ind is equal to 11th industry in other words
just take into account the firms which has the code 11, am i mistaken
here?

and then run the regression,

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  -0.17647  -0.02301   0.14901   7.74957
>
> Coefficients:
>              Estimate Std. Error  t value Pr(>|t|)
> (Intercept)  0.8980397  0.0050451  178.001  < 2e-16 ***
> lnC          0.0672255  0.0006523  103.065  < 2e-16 ***
> lnM          0.7990819  0.0006579 1214.596  < 2e-16 ***
> lnL          0.0171633  0.0004004   42.870  < 2e-16 ***
> lnE          0.0670030  0.0006716   99.770  < 2e-16 ***
> ecoTRUE      0.0162249  0.0045672    3.552 0.000382 ***
> innoTRUE     0.0966967  0.0030160   32.062  < 2e-16 ***
> indTRUE     -0.1251466  0.0031509  -39.717  < 2e-16 ***
> ---
> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ 
> ’ 1
>
> Residual standard error: 0.2924 on 146159 degrees of freedom
>  (407 observations deleted due to missingness)
> Multiple R-squared: 0.9709,     Adjusted R-squared: 0.9709
> F-statistic: 6.957e+05 on 7 and 146159 DF,  p-value: < 2.2e-16


but when i got the result, i see that the regression has been made for all the 
observations 
and not just for the industry which i defined with the dummy variable.

so i want to know how to regress the same independent variables just for one 
industry but not on all the industries?

Thank you again
                                          
_________________________________________________________________
Yeni Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun 
bilgisayarı bulun.
http://windows.microsoft.com/shop
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to