# Fixed effect on my database

**URL:** <https://forum.dynare.org/t/fixed-effect-on-my-database/20631>\
**Category:** Uncategorized\
**Created:** [29 June 2022 15:29 UTC](https://forum.dynare.org/t/fixed-effect-on-my-database/20631 "2022-06-29T15:29:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loic](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/e9c0ed/32.png) [@Loic](https://forum.dynare.org/u/Loic)\
**Post date:** [29 June 2022 15:29 UTC](https://forum.dynare.org/t/fixed-effect-on-my-database/20631/1 "2022-06-29T15:29:19Z")

</div>

Hello,

Thanks a lot for your answer.

I have a question about fixed effect

I want to do a multivariate regression and I want to incorporate fixed effects by year and by company here is my equation:

𝐶𝐴𝑅=𝛽 +𝛽𝑀𝐴𝑆𝐶+𝛽𝑃𝑂𝑊𝐸𝑅+𝛽𝐼𝑁𝐷+𝛽𝐴𝑉𝑂𝐼𝐷+𝛽𝑇𝐸𝑅𝑀+𝛽𝐼𝑁𝐷𝑈𝐿𝐺

- 𝑌𝑐𝑜𝑛𝑡𝑟𝑜𝑙(i,t) + αi + δt + εi,t

αi = fixed effect by firms  
δt = fixed effect by years  
εi,t = error  
control = control variables

My question is the following: I know that there must be only unique peers in my database. But, unfortunately, I sometimes have the same two companies for two similar years (it is not a duplicate, it may be that the first one concerns the beginning of the year and the other one the middle of the year, but we are still in the same year). Can I still use the fixed effect?

Just another information.  
I have 2752 unique firms in a sample of 7183 observations.

Is my approach the right one?

I must admit that I am a novice in this field.

Do you have any suggestions?

Thanks you in advance

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [30 June 2022 06:36 UTC](https://forum.dynare.org/t/fixed-effect-on-my-database/20631/2 "2022-06-30T06:36:21Z")

</div>

This is a DSGE modeling forum, not an regression/applied economics one. You may want to try [https://economics.stackexchange.com/](https://economics.stackexchange.com/)

---

<div class="post-metadata">

**Author:** ![anthony.gaines](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/e19b73/32.png) [@anthony.gaines](https://forum.dynare.org/u/anthony.gaines)\
**Post date:** [18 October 2023 08:39 UTC](https://forum.dynare.org/t/fixed-effect-on-my-database/20631/3 "2023-10-18T08:39:42Z")

</div>

> [@Loic](#):
>
> Hello,
> 
> Thanks a lot for your answer.
> 
> I have a question about fixed effect
> 
> I want to do a multivariate regression and I want to incorporate fixed effects by year and by company here is my equation:
> 
> 𝐶𝐴𝑅=𝛽 +𝛽𝑀𝐴𝑆𝐶+𝛽𝑃𝑂𝑊𝐸𝑅+𝛽𝐼𝑁𝐷+𝛽𝐴𝑉𝑂𝐼𝐷+𝛽𝑇𝐸𝑅𝑀+𝛽𝐼𝑁𝐷𝑈𝐿𝐺
> 
> - 𝑌𝑐𝑜𝑛𝑡𝑟𝑜𝑙(i,t) + αi + δt + εi,t
> 
> αi = fixed effect by firms  
> δt = fixed effect by years  
> εi,t = error  
> control = control variables
> 
> My question is the following: I know that there must be only unique peers in my database. But, unfortunately, I sometimes have the same two companies for two similar years (it is not a duplicate, it may be that the first one concerns the beginning of the year and the other one the middle of the year, but we are still in the same year). Can I still use the fixed effect?
> 
> Just another information.  
> I have 2752 unique firms in a sample of 7183 observations.
> 
> Is my approach the right one?
> 
> I must admit that I am a novice in this field.
> 
> Do you have any suggestions?
> 
> Thanks you in advance

In your multivariate regression model, you want to incorporate fixed effects for both companies (αi) and years (δt) to account for potential individual and time-specific variations. However, you’ve mentioned that you have multiple observations for the same companies in similar years (e.g., beginning and middle of the same year). It’s important to handle this situation correctly.

When you have multiple observations for the same company within the same year, you need to decide whether you should include these observations in your fixed effects model. The choice depends on the nature of your [lead data enrichment](https://www.globaldatabase.com/what-is-lead-enrichment) and your research question.
