1 Research Purpose

This analysis examines whether the number of not-confirmed victims is associated with the number of confirmed victims in Bexar County, Texas, from fiscal years 2016 through 2025.

The analysis includes the Day Care Investigations (DCI) and Residential Child Care Investigations (RCI) programs administered by the Texas Department of Family and Protective Services.

The dependent variable is confirmed victim count. The primary independent variable is not-confirmed victim count. Fiscal year and investigation program are included as additional explanatory variables.

2 Load Packages

library(tidyverse)
library(car)
library(lmtest)

knitr::opts_chunk$set(
  echo = TRUE,
  warning = FALSE,
  message = FALSE
)

3 Import Public DFPS Data

The dataset is publicly available through the Texas Department of Family and Protective Services. The following code imports the information directly from the public data source.

dfps_url <- "https://data.texas.gov/api/v3/views/wv2p-kpcm/export.csv?accessType=DOWNLOAD"

dfps_data <- read_csv(
  dfps_url,
  show_col_types = FALSE
)

cat("Original dataset observations:", nrow(dfps_data), "\n")
## Original dataset observations: 3121
head(dfps_data)
## # A tibble: 6 × 6
##   `Fiscal Year` Program County     Region    `Confirmed Victims` `# of Victims`
##           <dbl> <chr>   <chr>      <chr>     <chr>                        <dbl>
## 1          2025 DCI     Hutchinson 1-Lubbock Not Confirmed                    1
## 2          2025 DCI     Lubbock    1-Lubbock Not Confirmed                   36
## 3          2025 DCI     Lubbock    1-Lubbock Confirmed Victim                 4
## 4          2025 DCI     Ochiltree  1-Lubbock Not Confirmed                    1
## 5          2025 DCI     Potter     1-Lubbock Not Confirmed                   13
## 6          2025 DCI     Potter     1-Lubbock Confirmed Victim                 1
str(dfps_data)
## spc_tbl_ [3,121 × 6] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
##  $ Fiscal Year      : num [1:3121] 2025 2025 2025 2025 2025 ...
##  $ Program          : chr [1:3121] "DCI" "DCI" "DCI" "DCI" ...
##  $ County           : chr [1:3121] "Hutchinson" "Lubbock" "Lubbock" "Ochiltree" ...
##  $ Region           : chr [1:3121] "1-Lubbock" "1-Lubbock" "1-Lubbock" "1-Lubbock" ...
##  $ Confirmed Victims: chr [1:3121] "Not Confirmed" "Not Confirmed" "Confirmed Victim" "Not Confirmed" ...
##  $ # of Victims     : num [1:3121] 1 36 4 1 13 1 23 2 1 1 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   `Fiscal Year` = col_double(),
##   ..   Program = col_character(),
##   ..   County = col_character(),
##   ..   Region = col_character(),
##   ..   `Confirmed Victims` = col_character(),
##   ..   `# of Victims` = col_number()
##   .. )
##  - attr(*, "problems")=<pointer: 0x79befe3700>

4 Filter Bexar County

The original dataset contains information from multiple Texas counties. The following procedure limits the analysis to Bexar County and the selected fiscal years.

bexar_data <- dfps_data |>
  filter(County == "Bexar") |>
  mutate(
    `Fiscal Year` = as.numeric(`Fiscal Year`),
    `# of Victims` = as.numeric(`# of Victims`)
  ) |>
  filter(
    `Fiscal Year` >= 2016,
    `Fiscal Year` <= 2025
  )

cat("Bexar County records:", nrow(bexar_data), "\n")
## Bexar County records: 40
head(bexar_data)
## # A tibble: 6 × 6
##   `Fiscal Year` Program County Region        `Confirmed Victims` `# of Victims`
##           <dbl> <chr>   <chr>  <chr>         <chr>                        <dbl>
## 1          2025 DCI     Bexar  8-San Antonio Not Confirmed                  115
## 2          2025 DCI     Bexar  8-San Antonio Confirmed Victim                16
## 3          2025 RCI     Bexar  8-San Antonio Not Confirmed                  283
## 4          2025 RCI     Bexar  8-San Antonio Confirmed Victim                11
## 5          2024 DCI     Bexar  8-San Antonio Not Confirmed                  129
## 6          2024 DCI     Bexar  8-San Antonio Confirmed Victim                31
summary(bexar_data)
##   Fiscal Year        Program         County         Region   Confirmed Victims
##  Min.   :2016   Length   :40   Length   :40   Length   :40   Length   :40     
##  1st Qu.:2018   N.unique : 2   N.unique : 1   N.unique : 1   N.unique : 2     
##  Median :2020   N.blank  : 0   N.blank  : 0   N.blank  : 0   N.blank  : 0     
##  Mean   :2020   Min.nchar: 3   Min.nchar: 5   Min.nchar:13   Min.nchar:13     
##  3rd Qu.:2023   Max.nchar: 3   Max.nchar: 5   Max.nchar:13   Max.nchar:16     
##  Max.   :2025                                                                 
##   # of Victims  
##  Min.   :  7.0  
##  1st Qu.: 17.0  
##  Median : 75.5  
##  Mean   :135.5  
##  3rd Qu.:160.2  
##  Max.   :756.0

5 Restructure the Dataset

The original dataset separates confirmed and not-confirmed victims into different records.

The following procedure reorganizes the information so both classifications appear in the same program-year observation. Duplicate records within a program-year classification are combined by adding their victim counts.

bexar_long <- bexar_data |>
  select(
    `Fiscal Year`,
    Program,
    `Confirmed Victims`,
    `# of Victims`
  ) |>
  group_by(
    `Fiscal Year`,
    Program,
    `Confirmed Victims`
  ) |>
  summarise(
    Victims = sum(`# of Victims`, na.rm = TRUE),
    .groups = "drop"
  )

required_categories <- c(
  "Not Confirmed",
  "Confirmed Victim"
)

if (!all(required_categories %in%
         unique(bexar_long$`Confirmed Victims`))) {
  stop("One or both victim classifications are missing.")
}

bexar_wide <- bexar_long |>
  pivot_wider(
    names_from = `Confirmed Victims`,
    values_from = Victims
  ) |>
  rename(
    Fiscal.Year = `Fiscal Year`,
    Not.Confirmed = `Not Confirmed`,
    Confirmed = `Confirmed Victim`
  ) |>
  mutate(
    Program = as.factor(Program),
    Fiscal.Year.c = Fiscal.Year - 2020
  ) |>
  arrange(Fiscal.Year, Program)

print(bexar_wide)
## # A tibble: 20 × 5
##    Fiscal.Year Program Confirmed Not.Confirmed Fiscal.Year.c
##          <dbl> <fct>       <dbl>         <dbl>         <dbl>
##  1        2016 DCI            24           109            -4
##  2        2016 RCI            16           359            -4
##  3        2017 DCI            15           109            -3
##  4        2017 RCI            12           414            -3
##  5        2018 DCI            19           101            -2
##  6        2018 RCI             7           349            -2
##  7        2019 DCI            27            81            -1
##  8        2019 RCI            17           336            -1
##  9        2020 DCI            30           103             0
## 10        2020 RCI            21           603             0
## 11        2021 DCI            17            77             1
## 12        2021 RCI            74           756             1
## 13        2022 DCI            30            88             2
## 14        2022 RCI            10           382             2
## 15        2023 DCI            16            85             3
## 16        2023 RCI            11           254             3
## 17        2024 DCI            31           129             4
## 18        2024 RCI            20           264             4
## 19        2025 DCI            16           115             5
## 20        2025 RCI            11           283             5
cat(
  "Final analytic observations:",
  nrow(bexar_wide),
  "\n"
)
## Final analytic observations: 20
if (nrow(bexar_wide) != 20) {
  stop("Expected 20 program-year observations. Check the dataset.")
}

str(bexar_wide)
## tibble [20 × 5] (S3: tbl_df/tbl/data.frame)
##  $ Fiscal.Year  : num [1:20] 2016 2016 2017 2017 2018 ...
##  $ Program      : Factor w/ 2 levels "DCI","RCI": 1 2 1 2 1 2 1 2 1 2 ...
##  $ Confirmed    : num [1:20] 24 16 15 12 19 7 27 17 30 21 ...
##  $ Not.Confirmed: num [1:20] 109 359 109 414 101 349 81 336 103 603 ...
##  $ Fiscal.Year.c: num [1:20] -4 -4 -3 -3 -2 -2 -1 -1 0 0 ...

6 Data Quality Assessment

The following procedures examine missing values, duplicate observations, and the final structure of the dataset.

colSums(
  is.na(
    bexar_wide[, c(
      "Fiscal.Year",
      "Program",
      "Not.Confirmed",
      "Confirmed"
    )]
  )
)
##   Fiscal.Year       Program Not.Confirmed     Confirmed 
##             0             0             0             0

Check for duplicate program-year observations.

bexar_wide |>
  count(Fiscal.Year, Program) |>
  filter(n > 1)
## # A tibble: 0 × 3
## # ℹ 3 variables: Fiscal.Year <dbl>, Program <fct>, n <int>

Examine the fiscal years and investigation programs included in the final dataset.

table(bexar_wide$Fiscal.Year)
## 
## 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 
##    2    2    2    2    2    2    2    2    2    2
table(bexar_wide$Program)
## 
## DCI RCI 
##  10  10
summary(bexar_wide)
##   Fiscal.Year   Program    Confirmed     Not.Confirmed   Fiscal.Year.c 
##  Min.   :2016   DCI:10   Min.   : 7.00   Min.   : 77.0   Min.   :-4.0  
##  1st Qu.:2018   RCI:10   1st Qu.:14.25   1st Qu.:102.5   1st Qu.:-2.0  
##  Median :2020            Median :17.00   Median :191.5   Median : 0.5  
##  Mean   :2020            Mean   :21.20   Mean   :249.8   Mean   : 0.5  
##  3rd Qu.:2023            3rd Qu.:24.75   3rd Qu.:351.5   3rd Qu.: 3.0  
##  Max.   :2025            Max.   :74.00   Max.   :756.0   Max.   : 5.0

7 Descriptive Statistics

Descriptive statistics provide an initial understanding of the distribution of confirmed and not-confirmed victim counts.

summary(bexar_wide$Not.Confirmed)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    77.0   102.5   191.5   249.8   351.5   756.0
summary(bexar_wide$Confirmed)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    7.00   14.25   17.00   21.20   24.75   74.00
mean(bexar_wide$Not.Confirmed)
## [1] 249.85
median(bexar_wide$Not.Confirmed)
## [1] 191.5
sd(bexar_wide$Not.Confirmed)
## [1] 189.7007
mean(bexar_wide$Confirmed)
## [1] 21.2
median(bexar_wide$Confirmed)
## [1] 17
sd(bexar_wide$Confirmed)
## [1] 14.25556

8 Descriptive Statistics by Program

The following analysis compares average victim counts across the two investigation programs.

program_statistics <- bexar_wide |>
  group_by(Program) |>
  summarise(
    Observations = n(),
    Mean_Not_Confirmed = mean(Not.Confirmed),
    Mean_Confirmed = mean(Confirmed),
    Median_Not_Confirmed = median(Not.Confirmed),
    Median_Confirmed = median(Confirmed),
    .groups = "drop"
  )

program_statistics
## # A tibble: 2 × 6
##   Program Observations Mean_Not_Confirmed Mean_Confirmed Median_Not_Confirmed
##   <fct>          <int>              <dbl>          <dbl>                <dbl>
## 1 DCI               10               99.7           22.5                  102
## 2 RCI               10              400             19.9                  354
## # ℹ 1 more variable: Median_Confirmed <dbl>

9 Histograms

Histograms provide a visual examination of the distributions of the two victim-count variables.

9.1 Not-Confirmed Victims

hist(
  bexar_wide$Not.Confirmed,
  main = "Distribution of Not-Confirmed Victims",
  xlab = "Not-Confirmed Victim Count",
  col = "steelblue",
  border = "black"
)

9.2 Confirmed Victims

hist(
  bexar_wide$Confirmed,
  main = "Distribution of Confirmed Victims",
  xlab = "Confirmed Victim Count",
  col = "darkseagreen",
  border = "black"
)

10 Boxplot by Investigation Program

The boxplot provides a visual comparison of confirmed victim counts across investigation programs.

boxplot(
  Confirmed ~ Program,
  data = bexar_wide,
  main = "Confirmed Victims by Investigation Program",
  xlab = "Investigation Program",
  ylab = "Confirmed Victim Count",
  col = "lightblue"
)

11 Relationship Between Confirmed and Not-Confirmed Victims

The following scatterplot examines the relationship between confirmed and not-confirmed victim counts.

ggplot(
  bexar_wide,
  aes(
    x = Not.Confirmed,
    y = Confirmed,
    color = Program
  )
) +
  geom_point(size = 3) +
  geom_smooth(method = "lm") +
  labs(
    title = "Relationship Between Confirmed and Not-Confirmed Victims",
    x = "Not-Confirmed Victim Count",
    y = "Confirmed Victim Count",
    color = "Investigation Program"
  )

12 Pearson Correlation

The Pearson correlation examines the direction and strength of the linear association between the two victim-count variables.

cor(
  bexar_wide$Not.Confirmed,
  bexar_wide$Confirmed
)
## [1] 0.3724998
correlation_result <- cor.test(
  bexar_wide$Not.Confirmed,
  bexar_wide$Confirmed,
  method = "pearson"
)

correlation_result
## 
##  Pearson's product-moment correlation
## 
## data:  bexar_wide$Not.Confirmed and bexar_wide$Confirmed
## t = 1.7029, df = 18, p-value = 0.1058
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08384129  0.69968523
## sample estimates:
##       cor 
## 0.3724998

13 ANOVA

ANOVA examines whether average confirmed victim counts differ across the investigation programs.

program_anova <- aov(
  Confirmed ~ Program,
  data = bexar_wide
)

summary(program_anova)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Program      1     34    33.8   0.159  0.695
## Residuals   18   3827   212.6

14 ANOVA Using a Linear Model

ANOVA is a special case of a linear model. The following analysis examines the same differences between investigation programs using the lm() command.

program_lm <- lm(
  Confirmed ~ Program,
  data = bexar_wide
)

summary(program_lm)
## 
## Call:
## lm(formula = Confirmed ~ Program, data = bexar_wide)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -12.90  -7.60  -3.70   2.25  54.10 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   22.500      4.611   4.879 0.000121 ***
## ProgramRCI    -2.600      6.521  -0.399 0.694807    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 14.58 on 18 degrees of freedom
## Multiple R-squared:  0.008754,   Adjusted R-squared:  -0.04632 
## F-statistic: 0.159 on 1 and 18 DF,  p-value: 0.6948

15 Multiple Linear Regression

The primary research model examines whether not-confirmed victim counts are associated with confirmed victim counts after accounting for fiscal year and investigation program.

The regression model is:

Confirmed = β0 + β1(Not-Confirmed) + β2(Fiscal Year) + β3(Program) + ε

research_model <- lm(
  Confirmed ~ Not.Confirmed +
    Fiscal.Year.c +
    Program,
  data = bexar_wide
)

summary(research_model)
## 
## Call:
## lm(formula = Confirmed ~ Not.Confirmed + Fiscal.Year.c + Program, 
##     data = bexar_wide)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -19.225  -5.861   1.021   5.512  17.334 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    11.91036    3.64398   3.269 0.004829 ** 
## Not.Confirmed   0.10213    0.01987   5.140 9.89e-05 ***
## Fiscal.Year.c   0.81441    0.74647   1.091 0.291428    
## ProgramRCI    -33.26986    7.32164  -4.544 0.000332 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.486 on 16 degrees of freedom
## Multiple R-squared:  0.6271, Adjusted R-squared:  0.5572 
## F-statistic:  8.97 on 3 and 16 DF,  p-value: 0.00102

16 Regression Coefficients and Model Fit

The following procedures examine the regression coefficients, confidence intervals, and overall model fit.

summary(research_model)$coefficients
##                  Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)    11.9103614 3.64397939  3.268504 0.0048292225
## Not.Confirmed   0.1021307 0.01987138  5.139590 0.0000988666
## Fiscal.Year.c   0.8144076 0.74647441  1.091005 0.2914282749
## ProgramRCI    -33.2698612 7.32163785 -4.544046 0.0003319212
confint(research_model)
##                     2.5 %      97.5 %
## (Intercept)     4.1854702  19.6352527
## Not.Confirmed   0.0600053   0.1442562
## Fiscal.Year.c  -0.7680475   2.3968627
## ProgramRCI    -48.7910400 -17.7486823
summary(research_model)$r.squared
## [1] 0.6271249
summary(research_model)$adj.r.squared
## [1] 0.5572109
summary(research_model)$fstatistic
##     value     numdf     dendf 
##  8.969939  3.000000 16.000000

17 Regression Assumptions

Multiple linear regression relies on several assumptions. These include linearity, independence of errors, homoscedasticity, normality of residuals, and the absence of problematic multicollinearity.

17.1 Linearity

The residual plot provides an initial examination of whether the relationship is linear.

plot(
  research_model,
  which = 1
)

17.2 Independence of Errors

The Durbin-Watson test examines potential correlation between regression errors.

durbinWatsonTest(research_model)
##  lag Autocorrelation D-W Statistic p-value
##    1     -0.03029906      2.047995   0.904
##  Alternative hypothesis: rho != 0

Because the observations are repeated across fiscal years within two programs, this test should be interpreted cautiously. It does not establish that all observations are independent.

17.3 Homoscedasticity

The following plot examines whether the variance of the residuals remains relatively constant.

plot(
  research_model,
  which = 3
)

The Breusch-Pagan test provides an additional examination of residual variance.

bptest(research_model)
## 
##  studentized Breusch-Pagan test
## 
## data:  research_model
## BP = 14.943, df = 3, p-value = 0.001866

17.4 Normality of Residuals

The Q-Q plot examines whether the regression residuals approximately follow a normal distribution.

plot(
  research_model,
  which = 2
)

The Shapiro-Wilk test provides an additional examination of residual normality.

shapiro.test(
  research_model$residuals
)
## 
##  Shapiro-Wilk normality test
## 
## data:  research_model$residuals
## W = 0.98213, p-value = 0.9585

17.5 Multicollinearity

The variance inflation factor examines whether the independent variables are excessively correlated with one another.

vif(research_model)
## Not.Confirmed Fiscal.Year.c       Program 
##      3.000418      1.021758      2.978659

Values below 5 are generally considered less concerning. However, these values should be interpreted cautiously because the analysis contains only 20 observations.

17.6 Influential Observations

Cook’s distance identifies observations that may have an unusually large influence on the regression model.

plot(
  research_model,
  which = 4
)

cooks.distance(research_model)
##            1            2            3            4            5            6 
## 0.0183305293 0.0182347803 0.0223369283 0.0298340001 0.0013225490 0.0195022048 
##            7            8            9           10           11           12 
## 0.0242322834 0.0120061081 0.0200217687 0.5458949232 0.0045951275 4.9935729391 
##           13           14           15           16           17           18 
## 0.0224568850 0.0347920582 0.0255060989 0.0152815952 0.0054444470 0.1375995103 
##           19           20 
## 0.1479565319 0.0005002478

18 Regression Residuals

Residuals represent the differences between the observed confirmed victim counts and the values predicted by the regression model.

hist(
  residuals(research_model),
  main = "Distribution of Regression Residuals",
  xlab = "Residuals",
  col = "lightblue",
  border = "black"
)

19 Hypothesis Testing

The primary coefficient of interest is the coefficient for not-confirmed victims.

Null Hypothesis:

There is no association between not-confirmed victim counts and confirmed victim counts after accounting for fiscal year and investigation program.

Alternative Hypothesis:

There is an association between not-confirmed victim counts and confirmed victim counts after accounting for fiscal year and investigation program.

regression_results <- summary(research_model)$coefficients

primary_result <- regression_results[
  "Not.Confirmed",
]

primary_result
##     Estimate   Std. Error      t value     Pr(>|t|) 
## 0.1021307398 0.0198713791 5.1395899270 0.0000988666

The significance level is 0.05.

p_value <- primary_result["Pr(>|t|)"]

if (p_value < 0.05) {
  cat(
    "The primary regression coefficient is statistically significant at the 0.05 level. Reject the null hypothesis."
  )
} else {
  cat(
    "The primary regression coefficient is not statistically significant at the 0.05 level. Fail to reject the null hypothesis."
  )
}
## The primary regression coefficient is statistically significant at the 0.05 level. Reject the null hypothesis.

20 Automated Results Summary

The following section summarizes the primary findings from the descriptive statistics, correlation analysis, and multiple regression model.

cat("RESEARCH RESULTS SUMMARY\n\n")
## RESEARCH RESULTS SUMMARY
cat(
  "Number of observations:",
  nrow(bexar_wide),
  "\n"
)
## Number of observations: 20
cat(
  "Mean not-confirmed victims:",
  round(mean(bexar_wide$Not.Confirmed), 2),
  "\n"
)
## Mean not-confirmed victims: 249.85
cat(
  "Mean confirmed victims:",
  round(mean(bexar_wide$Confirmed), 2),
  "\n"
)
## Mean confirmed victims: 21.2
cat(
  "Pearson correlation:",
  round(
    cor(
      bexar_wide$Not.Confirmed,
      bexar_wide$Confirmed
    ),
    4
  ),
  "\n"
)
## Pearson correlation: 0.3725
cat(
  "Regression coefficient:",
  round(primary_result["Estimate"], 4),
  "\n"
)
## Regression coefficient: 0.1021
cat(
  "Regression standard error:",
  round(primary_result["Std. Error"], 4),
  "\n"
)
## Regression standard error: 0.0199
cat(
  "Regression p-value:",
  round(primary_result["Pr(>|t|)"], 4),
  "\n"
)
## Regression p-value: 1e-04
cat(
  "R-squared:",
  round(summary(research_model)$r.squared, 4),
  "\n"
)
## R-squared: 0.6271
cat(
  "Adjusted R-squared:",
  round(summary(research_model)$adj.r.squared, 4),
  "\n"
)
## Adjusted R-squared: 0.5572

21 Conclusion

This analysis examined the relationship between confirmed and not-confirmed victim counts in Bexar County child abuse and neglect investigations from fiscal years 2016 through 2025.

The analysis included descriptive statistics, histograms, boxplots, Pearson correlation, ANOVA, and multiple linear regression.

Fiscal year and investigation program were included as additional explanatory variables to examine whether the relationship between confirmed and not-confirmed victim counts remains after accounting for these differences.

The findings should be interpreted cautiously because the analysis uses a relatively small number of aggregated program-year observations. The data do not contain individual-level information, and the statistical analysis cannot establish causation.

The findings provide an exploratory examination of administrative patterns in child welfare investigations and may help identify areas where additional demographic and program-level information could improve future research.