HARKing
HARKing (hypothesizing after the results are known) is an acronym coined by social psychologist Norbert Kerr that refers to the questionable research practice of “presenting a post hoc hypothesis in the introduction of a research report as if it were an a priori hypothesis”. Hence, a key characteristic of HARKing is that post hoc hypothesizing is falsely portrayed as a priori hypothesizing. HARKing may occur when a researcher tests an a priori hypothesis but then omits that hypothesis from their research report after they find out the results of their test; inappropriate forms of post hoc analysis and/or post hoc theorizing then may lead to a post hoc hypothesis.

Types 
Several types of HARKing have been distinguished, including:
THARKing Transparently hypothesizing after the results are known, rather than the secretive, undisclosed, HARKing that was first proposed by Kerr (1998). In this case, researchers openly declare that they developed their hypotheses after they observed their research results.
CHARKing (or Pure HARKing) CHARKing or "pure HARKing" refers to the practice of constructing new hypotheses after the results are known and presenting them as a priori hypotheses. CHARKing is often regarded as the prototypical form of HARKing.
RHARKing RHARKing refers to retrieving old hypotheses from the existing literature after the results are known and presenting them as a priori hypotheses Note that RHARKed hypotheses can be considered to be a priori hypotheses in the sense that they were developed and published prior to knowledge of the current research results.
SHARKing Suppressing a priori hypotheses after the results of tests of those hypotheses are known.
Active and passive HARKing Active HARKing occurs when researchers HARK prior to submitting their research report for publication. Passive HARKing occurs when researchers HARK in response to requests by editors and reviewers during the peer review process.

Prevalence among researchers 

Concerns about HARKing appear to be increasing in the scientific community, as shown by the increasing number of citations to Kerr's seminal (1998) article. A 2017 review of six surveys found that an average of 43% of researchers reported HARKing “at least once”. This figure may be an underestimate if researchers (a) are concerned about reporting questionable research practices, (b) do not perceive themselves to be responsible for HARKing that is proposed by editors and reviewers (i.e., passive HARKing), or (c) do not recognize their HARKing due to hindsight or confirmation biases.

Researchers' motivation 
HARKing appears to be motivated by a desire to publish research in a publication environment that (a) values a priori hypotheses over post hoc hypotheses and (b) contains a publication bias against null results. In order to improve their chances of publishing their results, researchers may secretly suppress any a priori hypotheses that fail to yield significant results, construct or retrieve post hoc hypotheses that account for any unexpected significant results, and then present these new post hoc hypotheses in their research reports as if they are a priori hypotheses.

Prediction and accommodation 
HARKing is associated with the debate regarding prediction and accommodation. In the case of prediction, hypotheses are deduced from a priori theory and evidence. In the case of accommodation, hypotheses are induced from the current research results. One view is that HARKing represents a form of accommodation in which researchers induce ad hoc hypotheses from their current results. Another view is that HARKing represents a form of prediction in which researchers deduce hypotheses from a priori theory and evidence after they know their current results.

Potential costs to science 
Potential costs of HARKing include:

 Translating Type I errors into hard-to-eradicate theory
 Propounding theories that cannot (pending replication) pass Popper's disconfirmability test
 Disguising post hoc explanations as a priori explanations
 Not communicating valuable information about what did not work
 Taking unjustified statistical licence
 Presenting an inaccurate model of science to students
 Encouraging ‘fudging’ in other grey areas
 Making us less receptive to serendipitous findings
 Encouraging adoption of narrow, context-bound new theory
 Encouraging retention of too-broad, disconfirmable old theory
 Inhibiting identification of plausible alternative hypotheses
 Implicitly violating basic ethical principles

Rubin (2022) provided a critical analysis of Kerr's (1998) 12 costs of HARKing. He concluded that these costs "are either misconceived, misattributed to HARKing, lacking evidence, or that they do not take into account pre- and post-publication peer review and public availability to research materials and data."

HARKing and the replication crisis 
Some of the costs of HARKing are thought to have led to the replication crisis in science. Hence, Bishop (2019) described HARKing as one of “the four horsemen of the reproducibility apocalypse,” with publication bias, low statistical power, and p-hacking being the other three. An alternative view is that it is premature to conclude that HARKing has contributed to the replication crisis.

The preregistration of research hypotheses prior to data collection has been proposed as a method of identifying and/or deterring HARKing. However, the use of preregistration to prevent HARKing is controversial.

Ethical concerns 
Kerr (1998, p. 209) pointed out that “HARKing can entail concealment. The question then becomes whether what is concealed in HARKing can be a useful part of the “truth”...or is instead basically uninformative (and may, therefore, be safely ignored at an author's discretion)" (p. 209). Three different positions about the ethics of HARKing depend on whether HARKing conceals "a useful part of the 'truth'".

The first position is that all HARKing is unethical under all circumstances because it violates a fundamental principle of communicating scientific research honestly and completely. According to this position, HARKing always conceals a useful part of the truth. Consistent with this view, a 2017 Twitter poll found that 75.5% of 212 votes agreed that "it is fraud for an auth to assert that a study tested an a priori hypothesis that the auth knowingly thought of only after post hoc analysis."

A second position is that HARKing falls into a “gray zone” of ethical practice. According to this position, some forms of HARKing are more or less ethical under some circumstances. Hence, only some forms of HARKing conceal a useful part of the truth under some conditions. Consistent with this view, a 2018 survey of 119 USA researchers found that HARKing ("reporting an unexpected result as having been hypothesized from the start") was associated with "ambiguously unethical" research practices more than with "unambiguously unethical" research practices.

A third position is that HARKing is acceptable provided that (a) hypotheses are explicitly deduced from a priori theory and evidence, as explained in a theoretical rationale, and (b) readers have access to the relevant research data and materials. According to this position, HARKing does not prevent readers from making an adequately informed evaluation of (a) the theoretical quality and plausibility of the (HARKed) hypotheses and (b) the methodological rigor with which the hypotheses have been tested. In this case, HARKing does not conceal a useful part of the truth. Furthermore, researchers may claim that a priori theory and evidence predict their results even if the prediction is deduced after they know their results.

References 

Scientific method
Metascience
Ethically disputed research practices
Open science