Although the judge has discretion whether or not to detain a defendant pending trial, if the PSA and the parties’ argument recommend against detention and there is a legal presumption in favor of pretrial release, the judge must provide a factual explanation in support of his or her decision to order detention. An order of detention may be successfully appealed if it can be established that the judge abused his or her discretion by failing to offer a rational explanation, disregarded established practices, or considered impermissible factors in deciding to order detention.