Introduction
State psychiatric hospitals face increasing referrals for the evaluation and restoration of individuals whose mental health symptoms render them incompetent to stand trial (IST). 1 As referrals can overwhelm capacity for admission, state hospitals at times are unable to admit IST patients in a timely fashion. The resulting use of “wait-lists” has the undesirable consequence of forcing symptomatic individuals to endure long waits (while jailed) for admission to a psychiatric hospital. These long wait times have been determined to be unconstitutional, resulting in litigation against the responsible state mental health authorities.Reference Bellisle 2 Unfortunately, available options to expedite hospital admission of these IST patients can have significant clinical and economic consequences. Simply admitting patients without sufficient treatment resources risks overcrowding, while building increased hospital capacity is time-consuming, costly, and contrary to the drive for community treatment for mental illness.
Another solution is to examine patient factors leading to a longer length of stay, with the goal to increase treatment efficiency. This in turn would reduce length of stay and increase overall availability of state hospital beds without the need to build additional capacity. Our study examined patient variables impacting length of stay, with the goals of identifying factors related to patient length of stay as well as identifying targets of treatment that could result in more efficient treatment delivery for IST patients.
The topic of competency restoration has a large literature base, but few studies have directly focused on the specific topic of hospital length of stay for IST patients. Previous research into the topic of pretrial competency has generally studied three broad areas: (1) factors regarding which arrestees are found incompetent,Reference Pirelli, Gottdiener and Zapf 3 (2) factors to identify who can and cannot be restored to competency,Reference Gay, Vitacco and Ragatz 4 –Reference Morris and Parker 6 and (3) length of hospitalization or time to restoration after being found incompetent.Reference Grossi, Green and Schneider 7 –Reference Renner, Newark and Bartos 13 However, most studies purporting to have investigated length of stay instead actually examined percentage of patients remaining hospitalized at predetermined time intervals (eg, patients restored to competency within 6 months, those restored within 1 year, etc.) or differences in time hospitalized between those found restorable compared to those found not restorableReference Grossi, Green and Schneider 7 , Reference Colwell and Gianesini 8 , Reference Morris and Parker 12 rather than actual hospital length of stay.Reference Toofanian Ross, Padula and Nitch 9 –Reference Mossman 11 , Reference Renner, Newark and Bartos 13
Research on the topic of length of stay has been marked by a lack of utilization of clinical variables. The studies mentioned above that investigated length of stay typically examined demographic variables (eg, age, sex, ethnicity, marital status) and a perhaps a single clinical variable, such as diagnosis. Clinical factors that could describe hospital course and response to treatment have not been investigated thoroughly. Our study sought to extend current research by investigating additional clinical variables likely to impact length of stay in IST patients. Specifically, we were interested in what the variable “number of violent acts while hospitalized” could reveal about hospital length of stay in IST patients, as our hospital’s annual reports on patient violence have informally documented a relationship between violence and increased length of stay. 14 We were also interested in how such a clinical variable compared (in terms of relative importance) to the other variables typically studied (such as the demographic variables) in a model used to describe length of stay in these patients. Our hypothesis was that individual patient clinical factors would be more important than demographic factors in a statistical model of patient length of stay.
Methods
This study was reviewed and approved by the California Health and Human Services Agency Committee for the Protection of Human Subjects, the Institutional Review Board (IRB) with oversight over all research with human subjects in the California Department of State Hospitals.
Description of setting
The California Department of State Hospitals (DSH) operates five different state hospitals across the state, with current populations ranging from 600 to 1500 patients at each facility. All facilities except the designated Sexually Violent Predator hospital treat IST patients. Typical housing is a dorm-style room with unit sizes ranging from 35 to 70 patients. All units are for IST patients are single-sex.
Subjects
The study subjects consisted of adult patients (age 18 and greater) admitted under the IST statutes (California Penal Code sections 1367-1376) between January 1st, 2010 and June 30th, 2018 and included n = 3748 females and n = 16 292 males with a mean age of 38.4 years (range = 18.0-89.2; SD = 12.6). The total number of patients admitted was 20 041; however, a single patient was discharged to an outside hospital on their day of admission and so was not included. Thus, the number of subjects included in the study was N = 20 040 (see Table 1 for a full description of subject demographics). Starting point for each patient in the study was their admission date on or after January 1, 2010 through to June 30, 2018. Each patient was tracked until their discharge date or December 31, 2018 (whichever occurred first) to ensure sufficient follow-up time was allowed to record any violent behavior. Patients not discharged by December 31, 2018 were treated as right-censored. Length of stay ranged from 1 day to 1247 days with a median of 105 and a mean of 157.4 days (interquartile range 58-189). As the median and interquartile range indicate, most patients were treated and discharged rapidly; only 9.3% of patients were hospitalized for longer than 365 days.
Summary of Subject Demographics by Ethnicity.

Study variables
Variables were chosen based on previous research which showed a relation to length of stay, as well clinical expertise in what could reliably differentiate shorter-stay patients from longer-stay patients. As mentioned previously, the annual reports of violence in our hospital system have noted (informally) a link between the number of violent acts by a patient and length of stay; in this study, we wished to investigate this formally. 14
In the current study, the clinical variables of (1) diagnosis, (2) number of violent acts, (3) level of functioning at admission, and (4) history of previous California DSH hospitalization (potentially a sign of long-term illness chronicity) were included, as these were clinical variables available for all patients. While diagnosis had been studied before, to the best of our knowledge violent acts had not been studied, and the other clinical variables have rarely been included in studies such as this.
To judge the importance of clinical variables in such a model, we also included demographic variables typically included in previous investigations of this topic, such as (5) age at admission, (6) treating hospital, (7) ethnicity, and (8) sex. In this manner, we could examine how consistent our study was with past studies, as well as compare the importance of clinical variables to demographic variables in modeling patient length of stay.
Data collection
Patient demographic and legal class information were collected from system databases routinely used for census tracking. Data on violent incidents were collected through the computerized incident management module of the patient treatment planning database. Diagnosis and level of functioning were collected from the computerized patient treatment planning system.
Regarding diagnosis, for discharged patients, the formal discharge diagnosis (DSM-IV-TR or DSM-5) 15 , 16 given by the treating psychiatrist and team was used, as this would be the most accurate diagnosis. For censored (ie, not discharged) patients in the study, the most recent treatment team diagnosis was used. Since patients commonly had multiple diagnoses, only the primary diagnosis was used. Over 280 different primary diagnoses were collapsed according to the DSM-5 category or chapter title, and the following eight overarching categories were used: (1) any bipolar diagnosis, (2) any schizophrenia diagnosis, (3) any schizoaffective diagnosis, (4) any other psychotic disorder not schizophrenia or schizoaffective, (5) any neurocognitive or neurodevelopmental disorder, (6) any mood disorder, (7) any malingering diagnosis, and finally (8) an “other” category which included all diagnoses used which did not fall into any previously mentioned category. The number of patients in each category can be seen in Table 2.
Summary of Univariate Kaplan–Meier Analyses for Hospital LOS, in Days

Abbreviation: LOS, length of stay.
Violence during the study was defined as physical assaults directed against either another patient or a staff member, as defined in the California DSH policies (see our earlier article for a full description).Reference Broderick, Azizian and Kornbluh 17 Analogous codes and definitions also exist for verbal aggression and property damage, but were not used in this study as we examined only physical violence. A total count of physically violent acts where the patient was determined to be the aggressor was obtained and was studied as the variable of interest. Out of the 20 040 patients in this study, 5240 (26.1%) had one or more violent acts during their hospitalization (full range for the study population was 0-90), with 2618 (13.1%) having two or more violent acts.
Level of functioning at admission level of functions was collected from the patient admission diagnosis, which included the admission global assessment of functioning (GAF) score. While not formally a part of DSM-5, admission GAF scores were still determined by DSH psychiatrists as it served as a quick and standardized method of describing a patient’s level of functioning when admitted. 18 The remaining variables (treating hospital, age at admission, previous DSH hospitalization, ethnicity, and sex) were all obtained from the databases used for census tracking and population reports.
Statistical analyses
Data preparation and analyses were performed with R version 3.5.1. 19 Data files were provided by the centralized data management office of the California DSH for all patients who were in residence or admitted to the hospitals during the periods 2010 to 2018; from these were extracted the records of all patients resident or admitted to a hospital between January 1, 2010 and June 30, 2018 inclusive and the IST patients were determined based on their legal code at admission. Data files were also provided for all the records of violent acts by patients, which were again further refined to extract just the acts in which physical contact was made or attempted, recorded during the period between January 1, 2010 and December 31, 2018 inclusive.
We first carried out a univariate descriptive analysis of variables potentially related to hospital length of stay using Kaplan–Meier analyses, to evaluate statistical significance of each variable individually. We then conducted a multivariate survival regression utilizing a Weibull parametric survival model to obtain direct quantification of improvement of survival time based on the variables of interest, as compared to the reference level for each variable.Reference Harrell 20 A Weibull parametric survival model was chosen because this would facilitate comparisons of length of stay, as well as other distinct advantages over other models.Reference Carroll 21 Since the demographic data showed differences in the average age across ethnicities, and we had hypothesized that age would also be related to length of stay, we included the interaction between ethnicity and age at admission in the model as a variable to control for this. Lastly, we evaluated the variables in the model to delineate which variables were most important, as these could potentially be priorities to target in treatments.
Results
Full demographic data are available in Table 1, as well as a detailed breakdown by ethnicity. Of the 20 040 study subjects, the primary diagnosis was missing for 83 and admission GAF was missing for 867 subjects. Inspection of the missing admission GAF scores showed that the missing data were evenly distributed across all years, with no discernible pattern. No data were missing for any patients on the remainder of the variables (age at admission, violence, hospital, ethnicity, sex, or previous admission).
Univariate analyses were conducted on all subjects with the data available for that variable. Multivariate analyses could only be conducted on subjects with complete data for all variables. Since the patients with missing data comprised only 4.7% of the total and complete data were available for 19 091 patients, we decided to drop the cases with missing data from the multivariate analysis, rather than impute missing data.
Each variable was first examined in a univariate analysis. Table 2 provides the results of the univariate analyses conducted on each variable, using Kaplan–Meier statistics, showing the median length of stay in days for each variable. For categorical variables, the Kaplan–Meier analysis were carried out by stratifying the levels of the categorical variables; for continuous variables, the variable was divided into blocks and the resulting blocks became the stratification levels (eg, age at admission was divided into blocks comprised of those aged 18-19, 20-29, 30-39, etc.).
Evaluation of the multivariate model characteristics showed adequate validity of the Weibull distribution for the data when compared to both (1) the quantile–quantile probability plot of observed vs theoretical values and (2) comparison of Weibull residuals to Kaplan–Meier residuals.Reference Harrell
20 The results of the multivariate analysis are shown in Table 3, which presents the maximum likelihood estimates of the Weibull model parameters (the β-coefficients) and the exponentiated coefficients (the column labeled “
$ {e}^{\beta } $
”).
Summary of Multivariate Parametric Survival Model Statistics

Abbreviation: CI, confidence interval.
Clinicians will most likely be interested in the exponentiated coefficients. In the Weibull model, exponentiated coefficients are traditionally called “accelerated failure time” statistics, which in this context are better described as “accelerated time to event” statistics (the “event” in this case being discharge). Exponentiated coefficients less than 1 are indicative of a shorter length of stay relative to the reference group (or for continuous variables, indicative of increasing acceleration to discharge, as the value decreases from 1). Exponentiated coefficients greater than 1 indicate a longer length of stay relative to the reference group (for continuous variables, exponentiated coefficients greater than 1 indicate increasing time to discharge, the higher the value). As an example, Table 3 shows that a diagnosis of bipolar disorder has an exponentiated coefficient value of 0.558 (95% confidence interval [CI] 0.536-0.581), indicating an “accelerated time to discharge” (ie, decreased length of stay) by a factor of 0.558 when compared to the reference level diagnosis of schizophrenia.
Using these coefficients in the model, one can calculate the projected length of stay for categories of patients. Extending the example mentioned in the previous paragraph, using a prototypic patient with reference or median values (eg, a diagnosis of schizophrenia, median age = 36.01, no violent acts, treating hospital D, admission GAF score median = 31, White, male, with no previous admission), one can compute a median length of stay of 123.94 days. By altering the diagnosis to bipolar but keeping all other variables constant, the calculated median length of stay is 69.16 days. As can be seen, dividing these numbers and rounding yields 0.558, showing that the time to discharge for the example bipolar patient was “accelerated,” and that the length of stay differed proportionally by the exponentiated coefficient for bipolar disorder, when compared to the reference diagnosis of schizophrenia.
Summarizing the multivariate results presented in Table 3, all diagnoses had a significantly shorter length of stay than the reference diagnosis (schizophrenia) with the exception of neurocognitive disorders (which also included neurodevelopmental disorders). Age at admission had the effect of increasing the length of stay as age increased,
$ {e}^{\beta } $
= 1.016 (95% CI 1.015-1.018). Violent acts had the effect of increasing length of stay as the number of violent acts increased,
$ {e}^{\beta } $
= 1.099 (95% CI 1.091-1.107). The findings for the variable treating hospital were mixed as two hospitals had a statistically significant longer length of stay than the reference hospital (which had the most admissions); the remaining hospital also had a longer length of stay but the result was not statistically significant. Level of functioning at admission (as measured by the admission GAF score) was also significant with an exponentiated coefficient of
$ {e}^{\beta } $
= 0.992 (95% CI 0.990-0.993), indicating that patients with a higher level of functioning had a shorter length of stay. Regarding ethnicity, due to differences in the median age across groups, an interaction term was included in the model to control for these differences. Compared to the reference group (whites), both Hispanics = 1.106 (95% CI 1.008-1.215) and Native-Americans = 2.178 (95% CI 1.292-3.670) had a longer length of stay. Compared to males (the reference group), females had a shorter length of stay with
$ {e}^{\beta } $
= 0.902 (95% CI 0.875-0.930). Having a previous admission increased the length of stay
$ {e}^{\beta }$
= 1.038 (95% CI 1.012-1.064) compared to not having had a previous admission.
To better aid clinicians in identifying target variables for treatment prioritization, we evaluated each variable for its importance in the model. We first used the traditional method of computing the proportion of explainable log-likelihood for each variable (the chi-square statistic minus its degrees of freedom) for assessing the partial effect of each variable in the model.Reference Harrell 20 Using these results to guide order of entry, each variable was then entered into the model one step at a time and we computed (1) the deviance for each variable, (2) the deviance penalized by degrees of freedom, and (3) the Bayesian Information Criteria, for each variable.Reference Hilbe 22
As can be seen in Table 4, these various methods consistently found that (1) diagnosis, (2) number of violent acts, and (3) age at admission were the most important variables in the model. The other variables (treating hospital, level of functioning at admission, ethnicity, sex, previous admission), while statistically significant, were not as influential in the model as these three variables.
Summary of Variable Importance in the Multivariate Model

Abbreviation: BIC, Bayesian Information Criteria.
Discussion
This study examined the significance and relation of clinical and demographic variables to hospital length of stay for patients involuntarily committed to California state psychiatric hospitals under the state’s IST statutes. In addition to finding significant differences in length of stay for the clinical and demographic variables studied, our study found that the most important variables in the model for determining length of stay were diagnosis, number of violent acts, and age at admission. These findings highlight that variables describing a patient’s clinical status and response to treatment were important in the model determining length of stay, more so than demographic variables typically used in many previous studies. Clinicians, policy makers, and researchers looking at this topic should be actively seeking ways to include more patient clinical variables in their studies to better inform treatment and policy decisions.
Regarding diagnosis, our study found that patients diagnosed with schizophrenia (the largest single patient group) had statistically significant longer lengths of stay at the hospital than all other diagnoses, with the exception of those diagnosed with a neurocognitive disorder. While our study cannot definitively answer “why” diagnoses had different lengths of stay, the finding that patients diagnosed with schizophrenia or a neurocognitive disorder had longer lengths of stay than other diagnoses raises several issues. A concern with treating psychosis or neurocognitive disorders is the issue of patients not benefitting from treatment, or “treatment resistance,” which is typically described as affecting up to 30% of patients with a psychotic mental disorder.Reference Kinon 23 While the length of stay for study subjects overall was relatively short (median length of stay overall was 105 days, interquartile range 58-189 days), the rate of patients hospitalized longer than a year was 9.3% for all diagnoses, 22.5% for patients with a neurocognitive disorder, and 12.4% for those with a primary diagnosis of schizophrenia.
Recent research examining treatment resistance in schizophrenia has pointed out several factors, including issues of cognitive functioning or cognitive disability in schizophrenia.Reference Kinon 23 , Reference Bak, Ebdrup and Oranje 24 A study which conducted long-term follow-up of schizophrenia patients showed that those with the poorest response to treatment typically had higher rates of negative symptoms and worse cognitive functioning at baseline.Reference Chang, Ho and Tang 25 Likewise, another study recently found that measures of cognitive functioning accurately predicted treatment response to antipsychotic medication, even when there were no differences in measures of psychopathology between treatment responders and nonresponders.Reference Bak, Ebdrup and Oranje 24
Given the relation between poor treatment response and cognitive functioning, it is worth noting that cognitive impairment of some form is considered a hallmark of schizophrenia.Reference Elvevag and Goldberg 26 –Reference MacCabe 28 Generally, in our hospitals, we have found most patients actively psychotic are stabilized with the use of antipsychotic medication early in their hospital stay. However, treatments to restore trial competency are not just pharmacological but are also didactic and involve procedures that can be cognitively challenging.Reference Colwell and Gianesini 8 , Reference Schwalbe and Medalia 29 For example, competency restoration activities such as a “mock trial” entail role-playing, behavioral rehearsal, and abstract reasoning about case factors as well as anticipating arguments from the prosecution and weighing alternative ideas, such as chance of success for various alternatives. A factor in longer length of stay for patients diagnosed with schizophrenia and neurocognitive disorders could be cognitive issues which impact their ability to learn relevant facts and apply this learning to their case in a manner that demonstrates to a treatment team enough understanding and progress to be returned to court as restored to competency.
While it could be argued that the same cognitive deficits are also found in other serious mental illness disorders (such as bipolar disorder), recent research focused on this question has found that cognitive deficits in those diagnosed with bipolar disorder are much less severe, and if present have the greatest impact during acute episodes and not while under treatment.Reference Palmer, Loughran and Meeks 30 , Reference Reichenberg, Weiser and Rabinowitz 31 Also, in patients diagnosed with bipolar disorder, severity of the cognitive impairment is directly related to the severity of the psychotic symptoms.Reference Lewandowski, Whitton and Pizzagalli 32 This may explain why relative to those diagnosed with schizophrenia, the patients diagnosed with bipolar disorders had a much shorter length of stay, while those diagnosed with schizoaffective disorder had a length of stay more consistent with the patients diagnosed with schizophrenia.
Regarding violence while hospitalized, to the best of our knowledge, ours was the first study to examine patient violence as a factor in length of stay in IST patients. In our study, patient violence while hospitalized was both statistically significant in the model and was also one of the most important variables influencing length of stay. This was consistent with our belief that clinical variables reflective of a patient’s current level of psychopathology or response to treatment are more informative about their length of stay than demographic variables. This was also consistent with our clinical experience, in which we have noted a pattern to violence, response to treatment, and subsequent length of stay. 14
We should note that not all patients in the study were violent. Although all study subjects were involuntarily hospitalized while facing felony charges and considered “dangerous” due to this, only 26.1% were violent during their hospital stay. However, our analyses (both univariate and multivariate) showed that if a patient was violent during their hospitalization, this behavior was meaningful and had a significant impact on extending their length of stay.
Consistent with the other studies that directly investigated length of stay, this study showed that younger patients typically had a shorter length of stay than older patients. Again, while our study cannot directly point to “why” this is, it could be possible that age acted as a proxy variable for the long-term effects of life-long chronic mental illness, that is, older patients have had the disease longer and are more likely to be impacted by the debilitating disease effects on domains such as cognition and learning, in addition to medical problems associated with other factors (eg, cardiovascular disease, metabolic syndrome, etc.).Reference Fagiolini and Goracci 33 Thus, it is possible the impact of age on length of stay could be due to the interplay between serious mental illness and its longer-term debilitating effects on health and cognition over the course of the patient’s life.
The finding that treating hospital had a statistically significant impact on length of stay is also consistent with previous research.Reference Morris and Parker 12 , Reference Renner, Newark and Bartos 13 In our study, the hospital that treated the most forensic patients had the shortest median length of stay. This is consistent with the finding by Morris, who found that the state hospital dedicated to treating forensic patients had the shortest length of stay, when compared to the other hospitals which did not specialize in treating these forensic patients.Reference Morris and Parker 12 This finding emphasizes that hospitals not well-practiced in specialized programs required for IST treatment could likely have longer lengths of stay. 1
Our finding that level of functioning at admission, while statistically significant, was not as important as other variables is understandable in that most patients actively psychotic can be stabilized relatively quickly with medication. However, treatment for restoration of competency, as discussed earlier, is extensive beyond just psychiatric stabilization. Treatment for competency restoration also involves didactic teaching and cognitively challenging tasks addressed at having the patient anticipate and prepare for hypothetical circumstances in court as well as anticipating ways to mitigate challenges and engage resources (such as cooperating with their attorney) for a better court outcome. We should note, however, the measure used (admission GAF score) has known limitations and potentially a more focused measure of functioning could have been more informative. 18
Demographic variables such as ethnicity and sex, while statistically significant, were not as important statistically as the clinical variables discussed above. Of concern was the finding that Native-American patients overall had a significantly longer length of stay. Due to the small number in the study (compared to other ethnic groups), there was large variation in individual patient length of stay, which limits conclusions. However, this finding merits future study. Likewise, previous admission was statistically significant, yet not as important as the other variables examined.
Clinicians often ask, “Which variable is most important?” to receive guidance on treatment prioritization. Variable importance is a complicated topic (especially in terms of “clinical” vs “statistical” importance). However, there are several methods of evaluating variables for their importance in an analysis. While the differing methods yielded slight differences, all the currently accepted methods of determining variable importance consistently placed diagnosis, violence while hospitalized, and age at admission in the top three most important variables. Our results add to, and are consistent with another study, which studied a smaller subset of variables consisting largely of demographic (but not clinical) variables.Reference Renner, Newark and Bartos 13 , Reference Scurich 34 This emphasizes the importance of utilizing clinical variables when studying clinical outcomes, such as length of stay.
The present study is not without its limitations. With the size of the staff involved, lack of inter-rater reliability checks among the diagnosing psychiatrists is a limitation, but a reality that exists in clinical settings. The use of a system-specific special incident tracking tool for violence limits comparability with other studies. However, the fact that the violence reporting form was integrated into regular nursing duties likely was advantageous, as it meant that the nursing staff did not view completing the form as an extra duty and enabled the collection of data for a far longer period of time than in previous studies. This also likely reduced under-reporting. The fact that the prevalence of violence in our study was at levels comparable to other studies, or even higher than some other studies, provides assurance that violent incidents were routinely reported and were not systematically overlooked. The collapsing of the patient’s diagnoses into overarching DSM-IV-TR or DSM-5 diagnostic categories undoubtedly led to a loss of specificity. However, given the fact that there were over 280 different primary Axis I diagnoses, few options existed for us to present diagnostic data in a concise, meaningful way.
Conclusions
Our study found significance between length of stay and the clinical and demographic variables studied. Our analysis indicated that the most important variables in the model were (1) diagnosis, (2) number of physically violent acts, and (3) age at admission. These findings point to the need for implementing treatments aimed at mitigating these factors. The fact that patients diagnosed with schizophrenia or neurocognitive disorders spent significantly longer time hospitalized compared to other diagnostic groups shows that assessment and treatment of learning and cognitive abilities should be highlighted early in admission. These patients may need smaller groups and more focused interventions addressed at their cognitive strengths, rather than traditional treatment interventions. Age at admission may be an important factor as it can impact various aspects of a patient’s functioning and health, such as increasing health issues in older patients, long-term effects of comorbid medical issues commonly found in the seriously mentally ill (eg, cardiovascular disease, diabetes), as well as cognitive issues seen in older patients with serious mental illness.
The finding that violence by a patient while hospitalized significantly increased length of stay points to the need to assess patients for violence risk factors early in their hospital stay, and to conduct routine violence risk assessments throughout the duration of their stay. Violence should also be considered a clinical target for both psychopharmacological and psychosocial treatment. While the issue of violence by the mentally ill in the general population may be controversial, the issue of violence in patients recently jailed for serious crimes and involuntarily hospitalized for competency restoration should be a treatment priority routinely addressed in this population.
Acknowledgments
The findings and conclusions in this article are those of the author(s) and do not necessarily represent the views or opinions of the California Department of State Hospitals or the California Health and Human Services Agency.
Funding
This research received no specific grant from any funding agency, commercial, or not-for-profit sectors.
Disclosure
The authors have nothing to disclose.



