Earnings Management, Related Party Transactions and Corporate Performance: The Moderating Role of Internal Control

: The primary purpose of this study is to investigate the impacts of earnings management (EM) and related party transactions (RPTs) on corporate ﬁnancial performance in an emerging market, Iran. This paper also aims to examine the moderating role of internal control weakness (ICW) in the relationship between them. The study sample includes 108 Iranian manufacturing companies listed on the Tehran Stock Exchange (TSE) between 2013 and 2018, and panel data with random effects are used to test the hypotheses. When an accounting-based measure called ROA is deﬁned as a proxy for corporate performance, the results show that there is a negative association between real earnings management (REM) and corporate ﬁnancial situation, while accrual-based earnings management (AEM) and ﬁrm value are correlated positively. However, when Tobin’s Q index is deﬁned as a proxy for corporate performance, we do not ﬁnd any signiﬁcant association between them. Consistent with the tunneling hypothesis or agency theory, our ﬁndings conﬁrm RPTs damage corporate value (ROA and Tobin’s Q) because managers probably consider it a mechanism to exploit enterprise resources owing to existing conﬂictual interests. Moreover, purchase-related party transactions lead to lower ROA, whereas sale-related party transactions and Tobin’s Q are correlated negatively. Moreover, weak internal control has a positive moderating inﬂuence on the linkage between AEM and Tobin’s Q index. Finally, we provide robust evidence that there is a positive association between sale growth and institutional owners with ROA and Tobin’s Q, although ﬁnancial leverage and mergers and acquisitions (M&A) have a destructive effect on corporate value.


Introduction
Profit maximization seems to be one of the main objectives of firms in today's complex and highly competitive business world; thus, the important role of financial statements in capital markets cannot be ignored. According to International Accounting Standards Board (IASB), financial reporting aims to provide information that is useful to investors, creditors, Dakhlallh et al. 2020;Nobakht and Acar 2021), while some others have focused on the relationship between related party transactions and firm value (Cheung et al. 2006;Xiao and Zhao 2009;Kohlbeck and Mayhew 2010;Pozzoli and Venuti 2014;Tambunan et al. 2017;Fazli 2019;Hendratama and Barokah 2020;Ashrafi et al. 2020), each of which has had different results for various reasons. This gap is fully felt in the research literature to simultaneously examine the effects of earnings management as well as related party transactions on corporate financial performance during a financial crisis. Given the specific characteristics mentioned concerning the current situation of the Iranian market, this research seeks to figure out whether managers behave opportunistically or seek efficient profit management to improve the economic situation of companies. We want to know if managers consider RPTs as sound business exchanges to meet corporate economic needs or, because of conflictual interests, consider it as a tool to exploit enterprise resources. The question also arises as to whether weakness in the internal control system exacerbates opportunistic management behaviors. Therefore, the results of this research can fill the gap created in this field largely and create a strong bridge between the research literature in the past and present.
The remainder of the paper proceeds as follows. The next section frames the study into a theoretical framework, hypotheses development, and literature. Section 3 lays out the research design and outlines where data have been obtained and the sample selection procedure; part 4 then explains the main results and implications drawn from statistical analyses. Finally, the last part indicates the concluding remarks.

Earnings Management and Corporate Performance
Since financial statements inform owners, creditors, and other users about the economic condition of a company, they can be used as a tool to measure a company's performance, particularly in evaluating the managers (Bergstresser and Philippon 2006). However, executives often distort profits to mislead their stakeholders about the company's real economic performance (Huang and Ho 2020;Salehi et al. 2020). Trueman and Titman (1988) argue that since managers think that investors pay more for a firm with a smoother income stream, they often engage in income smoothing, taking actions to dampen fluctuations in their firms' publicly reported net income. Not only can earnings management mask a company's real performance, but it also leads to erroneous predictions about a company's future financial outlook because the real growth of corporate profits is hidden (McNichols and Stubben 2008). Agency theory argues that earnings management activities may happen when directors have the motivation to improve their self-interest by compromising stockholder's interest as the consequence of information asymmetry (Ross 1973;Ngunjiri 2017). Information asymmetry is due to the fact shareholders cannot fully predict the performance and prospects of the company when they have less information than managers. In such an environment, management can use the flexibility of its authority to manage reported earnings. The manager's ability to use discretionary accounting methods with the aim of profit management increases in proportion to the increase in information asymmetry between them and shareholders. Accordingly, information asymmetry can intensify the amount of earnings management (Ndung'U 2017). Further, according to signaling theory, when a company shows higher profitability in its financial statements, it is sending positive signals to the market that can attract many investors. Thus, managers are expected to take part in earnings management actions owing to the signaling effect that financial reports have on the financial performance of a firm (Ndung'U 2017).
The research literature shows that profit management activities are divided into two general categories including accrual-based earnings management and real earnings management (Enomoto et al. 2015;Shette et al. 2016;Dakhlallh et al. 2020). Accrual-based earnings management aims to obscure true economic performance by changing accounting methods or estimates within the generally accepted accounting principles (GAAP), whereas real earnings management alters the execution of real business transactions (Braam et al. 2015). Perhaps the question now arises as to what kind of profit management executives prefer to engage in more. Finding the answer to this challenging question largely depends on the structure and current financial condition of the company. The point to keep in mind is that managers will face costs when using any form of profit manipulation. For example, managers who apply accrual-based earnings management (AEM) may encounter reversal impacts in the future. This means that profits that have increased in a particular year because of accrual choices are likely to decrease in the following year (Peasnell et al. 2000;Constantatos 2018). However, some firms tend to change the way their firm does business and use real profit management methods. In some cases, firms are seen to decrease advertising or R&D expenses so that they can improve their earnings, but it harms future cash flows and may negatively affect shareholder wealth (Peasnell et al. 2000). Tabassum et al. (2013) show real earnings management has a negative influence on firm value in the Pakistan market. Constantatos (2018) argues that as the cost of applying AEM practice is less than choosing an inappropriate operating decision such as REM, managers are likely to prefer accrual EM to be the first alternative before they choose more costly real changes in investment and operating activities. They also think that when managers' goals for reported earnings are short-term, AEM is much more efficient. Besides, Zang (2012) indicates AEM practice is common among companies that have poor financial conditions and are heavily controlled by institutional owners or associated with higher tax expenses. Compared to REM, since AEM is more difficult for auditors to detect, corporate executives often prefer to use AEM to avoid damaging the company's reputation (Garcia Osma 2008).
Efficient and opportunistic are two kinds of earnings distortion. If managers use their discretion for communicating private information about firm profitability that the historical cost-based earnings are yet to reflect, it is efficient earnings management. On the other hand, it is opportunistic if directors use their discretion for maximizing their utility. Efficient earnings management adds value to a firm, whereas opportunistic earnings management worsens corporate image (Subramanyam 1996;Abbas and Ayub 2019). So far, a lot of research has been done on the impact of earnings management on companies' financial performance, which has led to different results. For example, Gill et al. (2013) concluded the more intense the practice of earnings management, the greater the adverse effect on Indian firms' return on assets. Darmawan et al. (2019) also indicated that real earnings management harms manufacturing firms' value on the Indonesia Stock Exchange from 2013 to 2017. In Nigeria, Okafor et al. (2018) realized that earnings management and corporate value are correlated negatively. In another emerging market, Jordan, Dakhlallh et al. (2020) suggested that the association between discretionary accrual and abnormal cash flow from operations with Tobin's Q is significantly negative. Using the data related to 1169 international listed companies for the period 2006, Rodriguez-Ariza et al. (2016 showed that discretionary accounting practices affect the corporate image negatively. Similarly, the findings of Tabassum et al. (2013) and Frankel and Sun (2018) witnessed a negative association between earnings management and firm performance. In the Iranian market, Mehrani and Noruzi (2015) indicated that investors conceive earnings management negatively, and earnings management has a negative effect on firm value; however, this negative effect is reduced among corporations with high-quality corporate governance. According to Zhang and Ayisi (2020), the existence of negative linkage often comes because of strictness and reassessment of reports by investors and regulators using other financial information.
On the other hand, the results of many research have shown that profit management leads to the improved financial condition of companies (Sayari and Omri 2017;Khuong et al. 2019;Abbas and Ayub 2019;Mostafa 2020;Zhang and Ayisi 2020;Nobakht and Acar 2021). For example, Sayari and Omri (2017) saw a positive relationship between discretionary accruals and Tunisian firms' stocks, indicating that discretionary accruals allow Tunisian investors to construct their stocks portfolios optimally. Abbas and Ayub (2019) also examined the behavior of earnings management for Pakistani non-financial listed firms for the period of 15 years from 2003 to 2017. They found a positive connection between real and accrual earnings management with firm value. Zhang and Ayisi (2020) found that earnings management through both AEM and REM strategies has a positive effect on corporate performance in the Ghana market. Furthermore, in the Iranian context, Nobakht and Acar (2021) found that AEM through discretionary accruals and REM through abnormal production costs and abnormal operating cash flows have a positive and significant effect on the firm value obtained from free cash flow. However, there was no significant relationship between REM through abnormal discretionary expenses and the firm value obtained from free cash flow. In addition, REM through abnormal discretionary expenses has had a positive and significant effect on the firm's value obtained from economic value added. The reason for the positive impact of earnings management on the firms' value seems to be largely rooted in poor regulations and weak perceptions about reported figures (Khuong et al. 2019;Zhang and Ayisi 2020).
Managers have different incentives such as reducing political and agency costs, maximizing compensation, gaining some contractual benefits, absorbing more investors and creditors, and so on to distort profits (Guttman et al. 2010;Lambrecht and Myers 2012;Syed et al. 2018;Kamiya et al. 2020;El Diri et al. 2020;Zhang and Ayisi 2020). In general, companies with unfavorable financial conditions are expected to engage in income-increasing management, while income-decreasing strategies are more common among companies with good economic performance (Zhang and Ayisi 2020). In low-performance periods, managers tend to distort earnings to safeguard their positions from losses to evade concealing negative performance, which is seen more among companies with huge accruals (Iatridis and Kadorinis 2009). It is often seen that the existence of profit manipulation incentives is an outgrowth of corporate financial conditions. The remarkable point is that when listed companies on an exchange have financial problems, most of the time, their income levels fall so much that they no longer satisfy the expectations of investors, causing many investors to want to sell their shares, and consequently, the firms' value reduces drastically (Li et al. 2020). In this regard, Li et al. (2020) suggest that a disastrous financial situation can also raise the firms' costs to issue debts and render debt financing more difficult. Various research has been done so far that shows that firms with financial problems in capital markets can have strong incentives to manipulate their earnings (Jiang and Wang 2008;Chu et al. 2011;Du and Lai 2018). What is worth mentioning is that the Iranian market has faced the most severe economic sanctions during recent years. Since the majority of Iranian companies are at risk of bankruptcy, many investors cannot be optimistic about investing in these companies or creditors, and bankers rarely lend to them (Salehi et al. 2018aMoradi et al. 2021). In such catastrophic conditions, managers try to provide good information to the capital market by manipulating accounts so they can absorb more investors (Izadinia et al. 2015). Additionally, since management performance is mainly evaluated based on corporate profitability, Iranian managers try to manage profits as much as possible to receive more rewards and not lose their jobs (Salehi et al. 2018a). Therefore, considering the unfavorable financial conditions of Iranian companies, it is predicted that managers have strong incentives to manage profits to better show their financial situation. Therefore, the first two hypotheses of the research are stated as follows.

Hypothesis 1 (H1).
There is a positive relationship between real earnings management and corporate financial performance.

Hypothesis 2 (H2).
There is a positive relationship between accrual-based earnings management and corporate financial performance.

Related Party Transactions and Corporate Performance
Related party transactions (RPTs) are regarded as a transfer of resources, services, or obligations between a reporting entity and a related party, regardless of whether a price is charged. Controlling shareholders, directors, and every other group can be a related party; hence, as related parties affect the firm's decisions, they can transfer resources in or out of the company (Pozzoli and Venuti 2014). In general, there are two different views on the nature of RP. The first vision is based on the principle that RPTs can meet the economic needs of a company and contribute to corporate financial growth. According to existing research literature, this kind of RPT is called a "propping" or "efficient transaction hypothesis" (Friedman et al. 2003;Peng et al. 2011;Pozzoli and Venuti 2014). RPTs may be a mechanism to optimize a firm's economic activity in the context of a group attempting to minimize transaction expenses created by local market inefficiencies (Chang and Choi 1988;Pozzoli and Venuti 2014); hence, no regulation prohibits RPTs entirely (Djankov et al. 2008). Some studies have shown that RPTs can diminish transaction costs and raise efficiency through the establishment of an internal market within the corporate group (Claessens et al. 2006;Gordon et al. 2004;Jian and Wong 2010). For instance, Buysschaert et al. (2004) realized intra-group equity transactions create value for NCSs. Peng et al. (2011) also indicated that the Chinese market reacts positively to the declaration of transactions between a company and controlling shareholders when firms have financial difficulties. Tambunan et al. (2017) also showed that related party transactions of sales and incomes, as well as purchases and expenses, significantly have a positive effect on firm value in the Indonesia Stock Exchange. Further, Friedman et al. (2003) infer that when there is a moderate adverse shock, entrepreneurs should support the company so that it continues to stay in business.
On the other hand, related party transactions (RPT) has been identified as one of the main causes of corporate financial scandals over the past two decades (Gordon and Henry 2005;Pizzo 2013;Tong et al. 2014;Marchini et al. 2018;Ashrafi et al. 2020). Regulators, standard setters, investors, and other stakeholders commonly consider such transactions as an alarm bell that may have a negative impact on the company's performance (Pozzoli and Venuti 2014). The attitude of the second group about RPTs is that they can be a tool to exploit company resources due to existing conflictual interests, leading to corporate performance weakness. The research literature considers this kind of RPT as a "tunneling" or "conflict of interests transaction hypothesis" (Friedman et al. 2003;Peng et al. 2011;Pozzoli and Venuti 2014;Hendratama and Barokah 2020). In general, RPTs may be done in the favor of insiders' interests such as managers and controlling shareholders to expropriate wealth from outside investors such as non-controlling shareholders (Gordon et al. 2004;Claessens et al. 2006;Amzaleg and Barak 2011;Pozzoli and Venuti 2014). Numerous studies have shown that RPTs make companies' financial situation worse (Cheung et al. 2006;Xiao and Zhao 2009;Kohlbeck and Mayhew 2010;Fazli 2019;Hendratama and Barokah 2020;Ashrafi et al. 2020). For example, based on 274 observations from publicly listed firms in Indonesia, Hendratama and Barokah (2020) confirm that RPTs have a significant and negative influence on firm value. Wang et al. (2019) found that while related party trades are negatively associated with firm performance, firms with higher similarity in industry attributes or a higher degree of vertical integration within business groups lead to higher performance via related party trades. Fazli (2019) also figured out that RPTs, family directorship, and family ownership have a negative effect on Pakistani firm performance. In addition, using data related to 100 companies on the Tehran Stock Exchange between 2013 and 2018, Ashrafi et al. (2020) found a negative association between RPTs and the firms' value. Tariq and Mousa (2020) also conducted a study among listed firms from six emerging markets namely, Bahrain, Kingdom of Saudi Arabia, Pakistan, Kuwait, Jordan, and the United Arab Emirates. They figured out that related party transactions associated with key management compensation are negatively linked to a firm's market value, whereas payables-related RPTs have a significant positive effect on corporate performance. By contrast, the other RPTs such as purchases, sales, and receivables are not significantly associated with a firm's market value.
Another interesting point is that RPTs can be one of the best tools for doing profit management actions (Sarlak and Akbari 2014). If a firm's executives or board members engage in related party transactions to expropriate a firm's resources, then they have incentives to manage earnings either to justify (or increase) these perquisites or possibly to mask such expropriation (Jian 2003;Gordon and Henry 2005;Marchini et al. 2018). Based on research conducted in the Iranian market, it was determined that doing transactions with related parties is likely to be based on a conflict of interest hypothesis and may lead to the loss of shareholder wealth. Therefore, assets of a company may be taken out of the ownership of a company in favor of the related parties, and the manager may distort profits to cover it (Sarlak and Akbari 2014). As mentioned earlier, the assessment of the managers' performance is based on companies' profitability in the Iran context (Salehi et al. 2018a). Accordingly, directors may resort to these transactions in order not to lose their job and to receive an appropriate reward. In an interesting study, Jamalikazemini et al. (2020) investigated the connection between management compensation and related party transactions. They concluded that Iranian managers tend to manipulate earnings and, consequently, adjust their rewards through non-routine transactions with related parties. Their results also confirmed different kinds of RPT such as purchase, sale, and loans that are a method of reward enhancing indirectly. In general, given a conflict of interest between managers of Iranian companies and their shareholders exists, and also, assessment of the managers' performance is based on profitability; it is predictable there is a significant relationship between RPTs and their components with corporate financial performance.

Hypothesis 3 (H3).
There is a negative relationship between related party transactions and corporate financial performance.

Hypothesis 4 (H4).
There is a negative relationship between purchase-related transactions and corporate financial performance.

Hypothesis 5 (H5).
There is a negative relationship between sale-related transactions and corporate financial performance.
Hypothesis 6 (H6). There is a negative relationship between loan-related transactions and corporate financial performance.

The Moderating Role of Internal Control Weakness
Following the major financial scandals in 2002, special attention has been paid to internal controls. Internal control is a process established by a company's board of directors, managers, and other employees to ensure reasonably that objectives such as the effectiveness and efficiency of operations, financial reporting reliability, and compliance with rules and regulations are met (Li et al. 2020). According to the Public Company Accounting Oversight Board (PCAOB), internal control weakness is a material deficiency or combination of material deficiencies that lead to more than a remote likelihood that a material misstatement of the annual or interim financial statements will not be banned or detected. In the Sarbanes-Oxley Act of 2002 (SOX), Section 404 requires that managers retain adequate internal controls over financial reporting and provide an auditor-attested assessment of their effectiveness in the annual report (Ogneva et al. 2007;Tong et al. 2014). In the Iranian market, the instruction of internal controls was adopted in April 2012, requiring the board of directors to have at least once a year to review the company's internal control system to make sure that appropriate and effective internal controls are used (Lashgari and Gawradar 2015). After the financial scandals of the world's largest companies, a lot of research has been done on the effects of internal control on opportunistic management behaviors (Ashbaugh-Skaife et al. 2008;Järvinen and Myllymäki 2016). For example, Doyle et al. (2007) experienced a positive linkage between weak internal control and accrual earnings management. Lenard et al. (2016) also indicated that weak internal control and real earnings management are positively correlated. Moreover, Järvinen and Myllymäki (2016) stressed that firms with internal control weaknesses tend to engage in the manipulation of real activities, since it is difficult for auditors and regulators to detect. The studies of Cohen et al. (2008) show that real earnings management has increased after SOX law implementation, while accruals-based earnings management has decreased dramatically.
RPTs may misrepresent financial statements resulting in greater information asymmetry and a general erosion of investors' confidence in the firm (Tong et al. 2014). Thus, strong corporate governance can be a deterrent to related party transactions (Kohlbeck and Mayhew 2004;Gordon et al. 2004;Lo et al. 2010). It is clear that as internal control aims to improve operational outcomes to achieve the strategic objective, an effective internal control system can stop insiders from tunneling the firm (Kohlbeck and Mayhew 2004). Tong et al. (2014) find that internal controls of a higher quality reduce unfair RPTs for private benefits at the cost of firm value and, therefore, raise the company value. In another study, Lashgari and Gawradar (2015) find that Iranian companies with a high level of internal control weakness face financial and reporting problems. Given the above important points, it seems that an effective internal control system can influence the opportunistic behaviors of managers, which in turn, will affect the financial performance of companies. Therefore, the next hypotheses of this research predict as follows.
Hypothesis 7 (H7). Internal control weakness modifies the relationship between REM and corporate financial performance.

Hypothesis 8 (H8).
Internal control weakness modifies the relationship between AEM and corporate financial performance.
Hypothesis 9 (H9). Internal control weakness modifies the relationship between RPTs and corporate financial performance.
Hypothesis 10 (H10). Internal control weakness modifies the relationship between purchaserelated transactions and corporate financial performance.
Hypothesis 11 (H11). Internal control weakness modifies the relationship between sale-related transactions and corporate financial performance.

Hypothesis 12 (H12).
Internal control weakness modifies the relationship between loan-related transactions and corporate financial performance.

Research Design and Method
The data-gathering method is descriptive-correlation research and is targeted in the applied research category in terms of purpose. The present article uses the combined data method. This technique (panel/combined), which combined time-series data and cross-sectional data, is broadly employed by many scholars. This method is used for the issues that cannot be investigated in time-series and cross-sectional or when the number of data is low. The integration of time-series and cross-sectional data and the need for using them more likely is owing to increasing the number of observations, raising degrees of freedom, reducing heteroscedasticity of variance, and decreasing collinearity between variables . Besides, panel data with random effects have been used to test the hypotheses of this study, and the period of this research is 6 years, which is from 2013 to 2018. In this paper, the F-Limer test is used to examine if a model estimation should be based on the ordinary least squares (OLS) or panel data method. After that, the Hausman test is employed to identify whether panel data with fixed effects should be used or panel data with random effects. Moreover, the Wald test for evaluating heteroscedasticity and the variance inflation factor (VIF) index for measuring the severity of multicollinearity is used in this study. To identify the problem of serial autocorrelation among residuals, Durbin-Watson is employed, too. Finally, other statistical tests such as the residual cross-section dependence test, unit root test, and the regressor endogeneity test have been performed.

Research Sample
The statistical sample of this research is all the manufacturing companies listed on TSE during the period 2013-2018. In this study, to determine the sample size, the systematic elimination method has been used based on the following criteria:

•
The audited financial information of each of the companies under study must be available.

•
The financial periods of companies should be finished at the end of the solar year (20 March).

•
The companies should not have changed their fiscal year during the study period, and they should not have more than six months trading halts. The type of the business activity should be productive; hence, investment companies, leasing, credit, and financial institutions and banks are not included in our sample due to these companies have quite different natures in terms of reporting and ownership structure (Salehi et al. 2018aMoradi et al. 2021).
Taking account of the conditions of Table 1 that have been used in many local studies (Salehi et al. 2018a(Salehi et al. , 2018bTarighi 2019;Behmanesh et al. 2020;Moradi et al. 2020Moradi et al. , 2021, a sample size of 108 TSE manufacturing firms has been selected. Companies whose information is not available or have been removed from the stock exchange (129) The remaining firms in the sample 108

Research Models and Variables
Given that financial problems double the motivation of managers to carry out profit management activities (Jiang and Wang 2008;Chu et al. 2011;Du and Lai 2018), this study first seeks to examine the effect of such activities on the corporate financial performance in Iran's market during the economic sanctions. Furthermore, according to the efficient transaction hypothesis, related party transactions (RPT) meet the economic needs of a firm; however, the agency theory suggests RPTs are sometimes used opportunistically by managers (Marchini et al. 2018). Thus, the second purpose of this study is to test if Iranian executives engage in RPTs to expropriate firms' resources. Finally, given that the lack of a proper internal control system can create conditions leading to opportunistic managerial behaviors (Ashbaugh-Skaife et al. 2008;Järvinen and Myllymäki 2016;Lenard et al. 2016), this study intends to know whether internal control weakness (ICW) modifies the connection between earnings management and RPTs with corporate performance. Therefore, to test all the above hypotheses, the first model of research is explained as follows.
Corporate Performance it = a 0 + a 1 REM it + a 2 AEM it + a 3 RPTs it + a 4 SIZE it + a 5 AGE it + a 6 Growth it + a 7 Lev it + a 8 Current it + a 9 Institutional Owner it + a 10 Maneger Tenure it + a 11 M&A it + a 12 ICW it + a 13 ICW * REM it + a 14 ICW * AEM it + a 15 ICW * RPTs it + ε it (First Research Model) Statistically, in a regression model, independent variables should not be strongly correlated. It is noteworthy that the strong correlation between the independent variables causes the determinant size of the matrix of independent variables to approach zero, which deprives us of the correct calculation of parameters of a regression model. Hence, to avoid the collinearity problem, the components of RPTs, namely, RPT-Purchase, RPT-Sale, and RPT-Loan, are considered separately in the second model. Since the RPTs variable consists of the sum of three variables of RPT-Purchase, RPT-Sale, and RPT-Loan, it cannot be placed next to other independent variables, because it will create the collinearity issue in a regression model. Therefore, to avoid such a problem, the fourth, fifth, sixth, tenth, eleventh, and twelfth hypotheses of this research are tested in the following model. In other words, the second model aims to examine the relationship between the components of RPTs and firm value. Using additional analysis, we want to know if material weakness in an internal control system moderates the association between them.
In general, in scientific research, modeling and selection of research variables are either based on supportive theories or rely on data mining. In this research, modeling is based on supportive theories and rational arguments. The number of variables that have a sufficient theoretical basis to participate in the research model sometimes may be very large, in which case it is better to choose those variables that are consistent with the parsimony principle. Thus, in this paper, we have tried to use the variables that have been used many times in previous studies and also have a very strong theoretical relationship with the research topic. First of all, it is necessary to provide a thorough explanation of how to select the dependent variable. In both research models, corporate performance is defined as a dependent variable. Among the various variables of measuring corporate financial performance, due to the widespread use of the ratios of ROA and Tobin's Q in most domestic research of the Iranian market and international studies around the world, these two variables have been used in this study to compare our results with others homogeneously and uniformly. Thus, following many previous studies (Bhagat and Bolton 2008;Alipour 2013;Tabassum et al. 2013;Pozzoli and Venuti 2014;Shahzad et al. 2015;Kumari and Pattanayak 2017;Constantatos 2018;Appiah et al. 2020;Zhang and Ayisi 2020;Keskin et al. 2020;Moradi et al. 2020Moradi et al. , 2021Khanifah et al. 2020;Pitenoei et al. 2021), both accounting-based (return on assets-ROA) and market-based (Tobin's Q) measures of corporate financial performance are used in this study. Given the points made earlier in the research literature section, a company's financial performance can be severely affected by activities related to earnings management and related party transactions. Therefore, REM, AEM, and RPTs are regarded as independent variables in the first model, while each of the components of RPTs is defined as an independent variable in the second model.
As for control variables, the research literature has clearly shown that each of them is closely related to corporate economic performance. For example, as large companies have more information resources than small companies, they can generate higher financial performance and value. With the increase in companies' assets, their market value also increases (Alarussi and Alhaderi 2018; Nobakht and Acar 2021). Thus, a potential increase in profit will affect the company's market value. To control this effect, the firm size variable has been selected as a control variable in this study. One of the other control variables of this research is firm age. While some studies have reported the positive connection between firm age and profitability (Papadogonas 2007;Ilaboya and Ohiokha 2016), some others have confirmed the negative relationship between them (Dogan 2013;Liu 2020). The theory of learning by doing explains the positive relationship between firm age and corporate profitability because when the age of a firm increases, there is the likelihood of improvement in their productive efficiency over time by learning from their experience. However, the negative relationship can be viewed from the perspective of liability of obsolescence in which organizational performance declines with age (Ilaboya and Ohiokha 2016). In addition, since sale growth can affect corporate profitability, it is considered a control variable (Febriyanto 2018). We also consider leverage as a control variable. The interest rate on debt is fixed, notwithstanding the company's rate of return on assets. The financial leverage engaged by a corporate entity is aimed at earning more on the financial leverage fund than its costs. Financial leverage and debt are moved in the same directions, which means its debt increases, then financial leverage also rises. The primary purpose of financial leverage is to maximize the shareholder's return in favorable economic conditions. It is expected that the debt has a fixed rate of interest, which can be realized at a cost lower than the rate of return on net assets. If a firm has more debt in comparison to equity and preference capital, the company is said to be more levered (Taqi et al. 2020). In the same vein, some research has shown that financial leverage has a positive effect on the economic situation of companies (Anetoh and Anetoh 2016;Taqi et al. 2020), while some scholars have concluded that it will have a detrimental effect on the body of economic units (Shahzad et al. 2015;Alarussi and Alhaderi 2018;Appiah et al. 2020).
Moreover, the current ratio as another control variable tells us how much a company can repay short-term debt (Salehi et al. 2018a). The figure obtained from the current ratio mainly needs to be close to 1; if this number is much less than one, it indicates a company may have trouble repaying its debts. However, if this ratio is too high, it shows a company's liquidity is not properly controlled and informs investors that a company does not use liquidity properly for profitability. The results of the effect of the current ratio on financial performance are contradictory; some indicate the impacts of positivity (Amanda 2019) and negativity (Sukmawardini and Ardiansari 2018); others emphasize its ineffectiveness (Amir and Wuu 2020;Qamara et al. 2020). Besides, the ownership structure of companies listed on TSE indicates that approximately 66 percent of institutional owners in Iran's Stock Exchange are state-owned and quasi-governmental organizations (Moradi et al. 2012;Salehi et al. 2018b), which due to the indirect involvement of the government in the macro decisions of companies, the impact of institutional ownership on the financial situation of companies has been controlled in this study. On the one hand, as institutional ownership is one of the corporate governance mechanisms controlling the agency's problems and improves the protection of the interests of investors (Shleifer and Vishny 1997;Salehi et al. 2018b), it is expected to have a positive impact on firm value (Harasheh and Nijim 2010;Hutchinson et al. 2015). On the other hand, the presence of institutional owners can have negative effects (Shin-Ping and Tsung-Hsien 2009;Fazlzadeh et al. 2011), although some studies have pointed to the lack of a significant relationship between institutional owners and company performance (Epps and Cereola 2008;Salehi et al. 2018b). Another variable that can affect the financial performance of companies is the managers' tenure. According to the Horizon issue, managers who are in the final year of their tenure are highly motivated to manage profits (Ali and Zhang 2015). When management position is more stable, they are less likely to pursue the interests of shareholders, and this increase in management tenure length may affect the supervisory activities of the board.
It is also notable that mergers and acquisitions are one of the most common strategies for companies to gain a competitive advantage (Haeruddin 2017;Sinclair and Keller 2017). Reducing capital financing costs, tax advantages, obtaining easier access to a skilled labor force, seizing market power in a particular area, and strengthening current products by uniting complementary product portfolios are some examples of M&A advantages (Pavliuk and Nechay 2019). Based on the value creation theory, M&A can increase labor productivity and financial performance, whereas the transfer theory implies M&A is a wealth transfer from workers to shareholders without changing productivity at the acquired company. To the extent that the transfer theory is correct, the M&A can increase ROA and Tobin's Q because it increases the shareholder share in the acquired company (Fukuda 2020). Accordingly, we considered M&A as a control variable in this study to recognize how it can affect financial performance. Internal control weakness (ICW) is defined as another control variable. According to the instructions of internal controls approved by the Securities and Exchange Organization of Iran (SEO), from 2012 onwards, the company's auditor is obliged to review the company's internal controls carefully and disclose in the audit report the cases that indicate non-compliance or improper implementation of internal controls. Hence, given the important role of internal control in the financial performance of companies (Ibrahim et al. 2017;Wang et al. 2018;Muhunyo and Jagongo 2018), this research tends to know if material weakness in internal control affects corporate value. The rest of the research model variables have a moderating role. In fact, we intend to determine what role a material weakness in the internal control system can play in the relationship between the independent and dependent variables of this study. For instance, ICW *REM and ICW *AEM want to investigate if material weakness in internal control modifies the association between real earnings management and accrual-based profit management with corporate performance. ICW *RPTs also aims to investigate if a weak internal control system causes the financial performance of companies to be significantly affected by RPTs. Besides, the purpose of three variables of ICW* RPT-Purchase, ICW* RPT-Sale, and ICW* RPT-Loan is to determine whether the internal control system weakness, respectively, could affect the relationship between the components of RPTs with financial performance. Eventually, after providing a complete explanation of the reasons for the selection of the research variables and also the theoretical relationship between them and the subject of research, the Table 2 summarizes how to calculate and define each of them.

Tobin Q Dependent
It is the ratio of the market value of a company's assets (Khanifah et al. 2020).

AEM Independent
AEM is calculated by the modified Jones model. ABACC is non-discretionary accruals that are calculated by the following relation: The below relation uses for calculating the required model coefficients (β it and α it ).
After calculating the special parameters of the enterprise and non-discretionary accruals of the estimation period, the discretionary accruals equation for every company is as below:

RPTs Independent
RPT is calculated as the sum of disclosed related-party transaction prices such as RPT-Purchase, RPT-Sale, and RPT-Loan in notes to the annual financial statements divided by beginning assets of the firms (Sarlak and Akbari 2014; Jaafar Nodeh and Gerayli 2020).

RPT-Purchase Independent
It is calculated as the sum of disclosed purchase-related party transaction prices in notes to the annual financial statements divided by the beginning assets of the firms (Sarlak and Akbari 2014; Jaafar Nodeh and Gerayli 2020).

RPT-Sale Independent
It is calculated as the sum of disclosed sale-related party transaction prices in notes to the annual financial statements divided by the beginning assets of the firms (Sarlak and Akbari 2014; Jaafar Nodeh and Gerayli 2020).

RPT-Loan Independent
It is calculated as the sum of disclosed loan-related party transaction prices in notes to the annual financial statements divided by the beginning assets of the firms (Sarlak and Akbari 2014; Jaafar Nodeh and Gerayli 2020).

Firm Size Control
The natural logarithm of a company's total assets (Raguseo et al. 2020 (Salehi et al. 2018a).

Institutional Owner Control
It represents the percentage of shares held by insurance institutions, financial and investment firms, banks, governmental corporations, and other parts of the state that is calculated by dividing the institutional ownership stake by the total number of ordinary shares at the end of the period (Salehi et al. 2017).

Manager Tenure Control
The number of years that a manager has been in charge of a company's management (Schwenk 1993;Ali and Zhang 2015).

ICW
Control ICW is a dummy variable that is equal to one when there is a material weakness in internal control, otherwise zero (Lashgari and Gawradar 2015).

M&A Control
M&A is an indicator that takes 1 if a company has merged and integrated during the given period and 0 otherwise (Lashgari and Gawradar 2015).

Descriptive Statistics
Descriptive statistics show dispersion values and central indices. Information about descriptive statistics is a step towards understanding the data average and the relationship between them, as well as examining the status of their distribution. The results of descriptive statistics of this study include mean, median, standard deviation, minimum, and maximum present in Table 3. What stands out from Table 3 is that the average rate of return on assets is approximately 14%, reflecting the weak financial performance of Iranian companies in recent years. However, the result of Tobin's Q ratio is completely different. As the Tobin Q index is 1.79 and greater than one, it indicates that Iranian firms have been able to use their assets optimally. Among the different types of earnings management, Iranian companies are more inclined to engage in accrual-based earnings manipulation compared to REM, since the possibility of detecting it by auditors is more difficult. In addition, on average, sale-related transactions are more popular among managers compared to transactions associated with purchases and loans. The companies under study are on average 40 years old and have the necessary experience in the market. Another interesting point is that the structure of Iranian companies is such that two-thirds of their shares are owned by the institutional owners, meaning the government has a key role in decision making. We also find that the duration of the management period among Iranian companies has been less than 4 years, which indicates that this management instability has put directors under severe pressure to have good financial performance in the short term.
As for the qualitative variables of this study in the Table 4, we can say there is a material weakness in almost half of corporate internal control reports, indicating that the usefulness of the financial information of many Iranian companies is very low and that investors and other users cannot trust such information for their economic decisions. Moreover, due to the competitive advantages of mergers and acquisitions (M&A) in the market, nearly more than a third of companies tend to engage in such activities.

Conclusive Statistics
Panel data point to a dataset based on which observations are examined by many sectional variables often selected randomly during a given period. Since the panel data contain both aspects of time-series data and sectional ones, employing appropriate statistical explanatory models that describe the specifications of the variables is more difficult than the models used in sectional and time-series data (Salehi et al. 2018a.

F-Limer Test
According to the principles of statistics and econometrics, first, it is necessary to use the F-Limer test (Chow test) to examine whether a model should be estimated based on the ordinary least squares (OLS) or the panel data method. Based in this test, the null hypothesis (H0) suggests that there is no difference between the estimated coefficients for individual cross-section and the estimated coefficient for individual mass, meaning there is no necessity to estimate the model by using the panel data (Salehi et al. 2018aMoradi et al. 2021). Generally in our study, the results of the F-Limer test show that as the p-value of the H0 for models one and two is less than 0.05, the preference of the OLS method is failed to accept, and the panel data method is confirmed to be employed.

Hausman Test
In the second step, in the case of confirming the use of the panel data method, the Hausman test is employed to identify whether panel data with fixed effects should be used or panel data with random effect (Salehi et al. 2018a;Bell et al. 2019;Moradi et al. 2021). The Hausman test is formed based on the presence or absence of a correlation between the error of the regression and independent variables. The randomeffects model will be practical when such a relationship exists, and if it does not, the fixed-effects model will be used. The statistic of the test will have a chi-square (×2) distribution with k-1 degrees of freedom if the calculated chi-square statistic is greater than the critical value. This means that the p-value of the test is less than 5 percent, in this case, H0 is failed to accept, and the fixed-effects model is superior to the random-effects model . According to the results obtained from the Hausman test in this study, it can be noted that since the p-value for both research models is greater than 0.05, they will have to be estimated based on a model with random effects.

Heteroskedasticity, Multicollinearity, and Autocorrelation
Similar to our research, when there are panel data with random effects, the adjusted Wald chi-square test will evaluate the heteroscedasticity issue, whereas if there are panel data with fixed effects, the likelihood ratio test (LRT) test can be employed for investigating heteroscedasticity problem . In both models, our outcomes indicate that as the p-value for the Wald test is more than 5 percent, H0 will be accepted, and the error terms have no heteroskedasticity problem. Furthermore, to measure the severity of multicollinearity in a regression analysis, we can use the variance inflation factor (VIF). The VIF index measures how much the variance of an estimated regression coefficient is increased due to collinearity. As for the VIF value, if the VIF of the estimated model coefficients is less than 10, there would be no linearity problem (Akinwande et al. 2015;Thompson et al. 2017;Salehi et al. 2018a;Kim 2019;Tarighi 2019). Our findings confirm that the value of all independent variables in both models is less than five, which means that there is no linearity concerning the research hypotheses. One of the other important regression assumptions states that error sentences should not be correlated significantly. Hence, when errors are correlated together, they are proved to be involved in autocorrelation. To identify the problem of serial autocorrelation among residuals, Durbin-Watson can be employed (Savin and White 1977;Anetoh and Anetoh 2016;Salehi et al. 2018a). When the figure of the Durbin-Watson test is between 1.5 and 2.5, it can be concluded that the error terms do not have serial autocorrelation. The values of the Durbin-Watson test for models one and two are 1.891 and 2.153, in turn, so there is no serial autocorrelation among the error terms.

Endogeneity Test
It is usually assumed that since the values of the explanatory variables are created in the outside world, they are exogenous; however, since the error terms are derived from the relations within the model, they are endogenous. Based on one of the main regression assumptions, there should be no correlation between the explanatory variables of a research model and the error terms. If this hypothesis is rejected, the estimator of ordinary least squares is no longer consistent, and the resulting parameters cannot be relied on because they have a bias, which is called endogeneity bias. In the econometric literature, instrumental variables are used to overcome the endogeneity bias problem. In Eviews software, two-stage least squares (2SLS), generalized method of moments (GMM), and limited information maximum likelihood (LIML) can be used to estimate the model with the approach of instrumental variables. In this regard, Larcker and Rusticus (2010) argue that instrumental variable (IV) methods are commonly used in accounting research such as earnings management when the regressor variables are endogenous. In both models of this study, an endogeneity test was performed concerning our independent variables. As a result, since the amount of the p-value for the regressor endogeneity test is more than five percent, we can say that the exogeneity of the variables has been confirmed with a 95% confidence level.

Residual Cross-Section Dependence Test
When the number of periods in the combined data is much larger than the crosssections, the sentence of model error in cross-sectional dimension may be subject to dependence (Greene 2000). In financial and accounting research, where the number of companies is usually much higher than the number of years of research, the probability of residual cross-sectional dependence is not very high. However, to be more sure, various statistical tests such as Breusch-Pagan LM, Pesaran scaled LM, and Pesaran CD is used to identify the problem of cross-sectional dependence. In general, since the p-value of all these tests in both models is more than five percent, it can be concluded that there are no issues regarding cross-section dependence.

Unit Root Test
In statistics, a unit root test examines if a time series variable is non-stationary and possesses a unit root. The null hypothesis is generally defined as the presence of a unit root and the alternative hypothesis is stationary (Moradi et al. 2021). In general, since augmented Dickey-Fuller (ADF) and Phillips-Perron (PP) have always been among the most popular unit root tests, both of them are used in Table 5. According to the outcomes of the unit root tests, given the amount of p-value for all variables is less than 0.05%, it can be interpreted our research variables are stationary, representing efficient regression and very accurate results. In other words, our evidence witnessed that the variables of this paper are real and stationary, and they can be used in the regression or panel data model with high reliability.

Results of the First Research Model
The results of the first research model are presented in Table 6 as follows. As mentioned earlier, two ratios of ROA (accounting-based measure) and Tobin's Q (market-based measure) have been used to evaluate corporate financial performance. Our findings confirm that when corporate performance is evaluated based on a marketbased measure called Tobin's Q, there is no significant relationship between AEM and REM with the firm value. However, when an accounting-based measure called ROA is defined as a proxy for corporate performance, the results appear quite meaningful. Our outcomes witness a negative association between real earnings management (REM) and ROA, while accrual-based profit manipulation (AEM) and ROA are positively correlated. This finding is consistent with the studies of Tabassum et al. (2013), Sayari and Omri (2017), Darmawan et al. (2019), Abbas andAyub (2019), andLi et al. (2020), whereas it is not similar to some studies such as Rodriguez-Ariza et al. (2016), andDakhlallh et al. (2020). In general, it seems that AEM used among Iranian companies has been efficient profit management, for it has led to economic value being added (Abbas and Ayub 2019). However, the REM policies used by managers have been a kind of opportunistic behavior because directors have used their discretion for maximizing their utility, which ultimately damages the corporate image. Besides, managers may have used overproduction as one of the real profit management strategies, which causes firms to incur the costs of producing and maintaining overproduced items that may not be recycled through current sales.
The most important point is that since it is a little difficult for auditors to identify actual earnings management (Garcia Osma 2008), they are more likely to use AEM to better reflect their financial situation. Those companies that implement AEM practices enjoy higher market valuation because the market, investors, and other stakeholders do not detect and cannot penalize such practices. Further, AEM practice is more popular among managers who have poor financial conditions and are heavily controlled by institutional owners or associated with higher tax expenses (Zang 2012), which is exactly in line with current market conditions. The most important point is that the positive relationship between AEM and firm value is a result of poor regulations and weak perceptions about reported figures (Khuong et al. 2019;Zhang and Ayisi 2020). By examining the moderator variables, when corporate performance is based on Tobin's Q index, we found that weak internal control has a positive moderating influence on the linkage between AEM and financial performance. This implies that when there is a material weakness in an internal control system, Iranian opportunistic managers can easily show a more attractive picture of the company's financial situation through accrued earnings management activities. However, the results indicate that the material weakness in the internal control system does not have a vital role in the connection between REM, RPTs, and corporate value. The results also show that related party transactions damage corporate performance (ROA and Tobin's Q measures), confirming the view of "tunneling" or "conflict of interests transaction hypothesis. In other words, Iranian managers probably employ RPTs to exploit company resources due to existing conflictual interests. Our result is in line with the studies of Xiao and Zhao (2009), Kohlbeck and Mayhew (2010), Pozzoli andVenuti (2014), Fazli (2019), Wang et al. (2019), Hendratama and Barokah (2020), and Ashrafi et al. (2020), although it does not match the results of Claessens et al. (2006), Jian and Wong (2010), and Tambunan et al. (2017). It should be suggested that the Iranian opportunistic managers may carry out profit management actions using RPTs, leading to damaging corporate performance. Based on Sarlak and Akbari's (2014) view, carrying out transactions with related parties in Iran's market is likely to be in line with the conflict of interest hypothesis and may cause the loss of shareholder wealth. Consequently, assets of a company can be taken out of the ownership of a company in favor of the related parties. Besides, given that the performance evaluation of Iranian managers is mainly based on profitability (Salehi et al. 2018a), they have enough motivation to manage profits through RPTs so they can maintain their jobs and receive maximum rewards (Jamalikazemini et al. 2020).
By detailed analysis of control variables, we find that larger companies have a better return on assets while lower Tobin Q. Perhaps it can be interpreted that large companies have been able to make better use of their assets to generate profits, while the market value of these companies is less than the value of their assets. Of course, the negative relationship between firm size and Tobin's Q index can be justifiable from the point of view of structural inertia theory, indicating that as the organization becomes larger, the volume of bureaucracy increases, and this may cause stiff resistance to change, which will ultimately decrease the level of profit (Ilaboya and Ohiokha 2016). We also find that Iranian firms that have increased their sales compared to the previous year have a better economic situation. Furthermore, the greater a company's ability to repay short-term debt, the better its financial position compared to its competitors. Financial leverage not only gives companies higher returns but also increases their investment risk. The more firms use financial leverage, the more risk they must take. Given the negative coefficient of the leverage variable, it seems that Iranian companies that have used more financial leverage for investment suffered large losses. Anyway, higher use of debt increases the risk of insolvency of companies (Ball and Foster 1982;Ngunjiri 2017). Consistent with prior research literature indicating that institutional shareholders contribute to enhancing firm performance and constructing sustainable corporate governance mechanisms (Cornett et al. 2007; Sakawa and Watanabel 2020), our outcomes highlight that there is a positive linkage between institutional ownership and corporate value. Finally, contrary to value creation and transfer theories, we provide robust evidence that there is a negative association between mergers and acquisitions activities and financial performance. The extent of success in M&A processes will depend on readiness, extensive planning, and careful implementation (Blake and Mouton 1984;Jemison and Sitkin 1986). M&A failure will not only damage projected competitive advantages but also induce morale suffering for the employees and managers of both organizations. The failure of mergers and acquisitions can take many forms, such as productivity issues, a decline in shareholder value, absenteeism, and loss of effective human resources (Haeruddin 2017).

Results of the Second Research Model
The primary purpose of the second model is to evaluate the association between components of RPTs with firm value. Another goal is to examine whether internal control weakness plays a moderating role in the relationship between them. The results of each of the above association show in Table 7.
The results witness a reverse relationship between purchase-related party transactions and ROA ratio, while sale-related party transactions affect the Tobin's Q index negatively. Iranian managers seem to engage in purchases and sale of goods or contract services acquired from the related party to mask the extraction of the firm's resources. Regarding control variables, the results suggest that firm size, sale growth, current ratio, and institutional ownership are positively connected with corporate performance, even though there is a negative linkage between financial leverage and M&A with firm value. We also find that material weakness in internal control does not have a significant influence on the connection between components of RPTs and firm value. In fact, despite the weaknesses in the internal control system, opportunistic managers have not been able to take action with the help of related parties to extract the company's assets and resources. However, the most important point is that in fraudulent financial reporting, executives often violate controls that have operational effectiveness. Having relationships with a significant influence over the parties to a business unit increases the risk of violating internal controls by CEOs, as such relationships may provide more incentives and opportunities for CEOs to commit fraud. For example, the existence of the financial interests of CEOs in some related parties may provide incentives to violate controls by directing the business against its interests, to conduct a transaction in favor of related parties, or to collude with those.

Conclusions
Based on the existing research literature, the tendency of well-known firms' managers to carry out profit management activities and related party transactions has been recognized as one of the main reasons for the collapse of such firms during financial crises (Kumari and Pattanayak 2017;Marchini et al. 2018). Besides, after the financial corruption of large companies such as Enron and WorldCom, the Sarbanes-Oxley Act (SOX) was passed in 2002, drawing particular attention to the quality of corporate internal control systems (Li et al. 2020). Since Iran is facing the worst financial crisis due to severe economic sanctions and most of its companies are in financial straits, Iranian executives seem to have a lot of motivation for opportunistic behavior (Moradi et al. 2021). Thus, this paper aimed to examine whether various types of profit management activities in the Iranian market were aimed at maximizing shareholder wealth or are opportunistic. This study also tended to know if directors consider RPTs as sound business exchanges to meet the corporate economic needs or, owing to conflicting interests, consider it as a tool to exploit enterprise resources. Additionally, considering the important role of the proper internal control system in preventing the occurrence of opportunistic managerial behaviors, this study sought to investigate whether the material weaknesses in the internal control system affects the relationship between REM, AEM, RPTs, and firm value.
In conclusion, when corporate performance is evaluated based on an accounting-based measure called ROA, the results confirm that there is a negative association between real earnings management (REM) and corporate financial situation, while accrual-based profit manipulation (AEM) and firm value are correlated negatively. Our findings are in line with Tabassum et al. (2013), Sayari and Omri (2017), Abbas and Ayub (2019), and Li et al. (2020), while it is inconsistent with some studies such as Rodriguez-Ariza et al. (2016), and Dakhlallh et al. (2020). However, when Tobin's Q (market-based measure) is defined as a proxy for corporate performance, we do not find any significant association between REM, AEM, and firm value. What is worth mentioning is that in addition to the specific conditions of each market, the use of different metrics to measure company performance by different researchers can lead to various results in different markets. Given the huge financial problems caused by severe economic sanctions against Iran, directors tend to undertake more accrual earnings management and less real earnings management to improve their financial performance. Given the many financial problems of Iranian companies that have arisen as a result of economic sanctions, as well as considering institutional ownership in the structure of most Iranian companies, they are more inclined to engage in AEM practice to better demonstrate their financial performance because the market activists, auditors, investors, and other stakeholders do not detect and cannot penalize such practices easily. Moreover, the negative impact that REM has on the financial performance of Iranian companies can be interpreted as overproduction having likely caused companies to incur the costs of producing and maintaining overproduced items that could not be recycled through current sales. As a result, companies that have carried out REM practice in the current period by manipulating real activities such as overproduction have experienced lower operating profits in the next period.
Inconsistent with the "propping" or "efficient transaction hypothesis, we find that RPTs damage corporate value because managers probably consider it a mechanism to exploit enterprise resources owing to existing conflictual interests. Our findings are similar to the studies of Jian and Wong (2010) and Peng et al. (2011), although it is in line with the results of Cheung et al. (2006), Xiao and Zhao (2009), Kohlbeck and Mayhew (2010), Hendratama and Barokah (2020), and Ashrafi et al. (2020). Further analysis shows that managers have been able to misuse the company's resources by buying or selling with related parties. In other words, since RPTs are transactions with firm insiders and are difficult to audit, managers are interested in doing aggressive accounting actions through related party transactions (Jian 2003;Gordon and Henry 2005). The outcomes also indicate that material weakness in the internal control system positively moderates the relation between accrual-based earnings manipulation and Tobin's Q index. The lack of effective internal control and corporate governance exacerbates the opportunistic behaviors of managers in times of financial crisis. Looking at the details, we figure out that companies with higher sales growth rates have been able to make better financial progress. Besides, in the financial crisis of the Iranian market, the results confirm that having sufficient liquidity has been one of the main factors for the success of companies. For example, the result of the current ratio highlights the fact that the greater a company's ability to repay short-term debt, the better its financial position than its competitors. Besides, the less financial leverage companies use, the better their financial situation. As said before, nearly two-thirds of corporate owners are institutional types, which shows that the government is very influential in the structure of Iranian companies and has somehow controlled the market. According to our expectations, institutional ownership improved firms' value during Iran's economic crisis, as the government is always able to seize market power with its monetary policies and make state-owned companies prosper.
What fascinates different scholars about this study is that the period under study is unique because of the many financial problems experienced by Iranian companies. This research will make investors and stakeholders aware of the fact that when companies are in poor financial condition, the likelihood of doing accrual earnings management is more than real earnings management because it is less visible. In addition, the results of this study will inform policymakers that a high-quality control system can be a deterrent to managers' opportunistic behavior. Besides, this study can make users of financial statements aware of the fact that sometimes in times of financial crisis, RPTs may be of a negative nature and comply with the tunneling hypothesis.
When conducting any research, there are some restrictions on the researcher, and our study is no exception. How to calculate the measurement variables of each study may be slightly different from other research, so in generalizing or comparing the results, researchers are advised to pay attention to these cases. Furthermore, given that the period of the present study in Iran coincides with a financial crisis caused by sanctions, and that the sample companies may be different in terms of size, organizational structure, and type of products, generalization of our results should be made with caution. Finally, researchers are strongly advised to evaluate the hypotheses of this research in developed markets, where companies have good economic conditions, to determine how their managers will behave in relation to earnings management and related party transactions.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.