411 REFERENCE · Wikibooks
Social Science Research/Predicting Violence Against Women
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Social Science Research Predicting Violence Against Women Loneliness and Social Support for Older Adults Statistics on Women in Low-Middle-Income Countries
On Zenodo, the project "A Questionnaire for the Assessment of Violent Behaviors in Young Couples: The Italian Version of the Dating Violence Questionnaire (DVQ) | PLOS One" can be found here: https://zenodo.org/records/16073 and the related study https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0126089 concern violent behaviors in young Italian couples, investigated using the Dating Violence Questionnaire (DVQ).
Presaghi, F., Manca, M., Rodriguez-Franco, L., & Curcio, G. (2015). A QUESTIONNAIRE FOR THE ASSESSMENT OF VIOLENT BEHAVIORS IN YOUNG COUPLES: THE ITALIAN VERSION OF THE DATING VIOLENCE QUESTIONNAIRE (DVQ) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.16073
The demographic sample participating in the study consisted primarily of university students.
Specifically:
The initial sample consisted of 418 university students.
Of these, 310 were female and 92 were male. Sixteen participants did not indicate their gender.
The mean age of participants was 23 years old with a standard deviation of 4.71, ranging in age from 16 to 26 years old.
The sample therefore included late adolescents (16-21 years old) and young adults (21-26 years old).
A portion of this sample (223 students) also participated in a retest phase. This subsample consisted of 75 males and 134 females, with missing gender information for 14 participants and a mean age of approximately 22 years (SD = 1.45, range 16-26). The final retest sample consisted of 139 participants due to missing responses.
Participants were recruited from undergraduate students taking regular psychology courses and received course credit for participating in the study.
Research Question
Using the project dataset provided in Zenovo with the corresponding R code, we aim to predict potential negative partner reactions to the relationship breakup, including stalking behaviors.
The predictor variables are 8 different factors: Detachment (D), Humiliation (H), Sexual Violence (S), Coercion (C), Physical Violence (P), Derision (Der), Emotional Punishment (EP), Instrumental Violence (I), and 4 additional parameters: Extraversion, Psychoticism, Neuroticism, and the Lying Scale.
Creating predictor variables in R
Loading data:
df <- read.csv("df.csv")
attach(df)
Creating the Detachment (D) variable: This factor refers to behaviors in which the partner ignores feelings, feels incompetent for what happens in the relationship, or both. Examples of questions in the DVQ are: "He ignored your feelings" and "He doesn't feel responsible for what happens in the relationship or for what happens to both of you."
detachment<-cbind(cuv6a,cuv14a,cuv22a,cuv30a,cuv32a,cuv33a,cuv37a)
detachment<-as.matrix(data.frame(detachment))
df$detachment<- rowSums(detachment)
Calculating the frequency table for the variable detachment, we see that it takes integer values from 0 to 25 and that the percentage of respondents with a detachment greater than 8 is 7.57%.
table(df$detachment)
paste("detachment=",round(mean(df$detachment>8, na.rm = T)*100,2),"%", sep = "")
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 23 25
92 80 64 32 36 16 13 15 6 8 2 5 4 4 3 1 1 1
[1] "detachment=7.57%"
Humiliation (H): This factor concerns behaviors aimed at belittling and denigrating your partner, both privately and publicly. Example items include: "Humiliates you in public" and "Insults you in front of your friends or parents."
humiliation<-cbind(cuv7a,cuv15a,cuv23a,cuv31a,cuv36a,cuv40a,cuv41a)
humiliation<-as.matrix(data.frame(humiliation))
df$humiliation<- rowSums(humiliation)
Sexual Violence (S): This factor refers to situations in which a partner coerces or forces their partner into unwanted sexual activity. Example items include: "You feel like you have to have sex with him/her just to avoid having to explain yourself" and "He/she forces you to undress when you don't want to."
sexual_violence<-cbind(cuv2a,cuv10a,cuv18a,cuv26a,cuv34a,cuv39a)
sexual_violence<-as.matrix(data.frame(sexual_violence))
df$sexual_violence<- rowSums(sexual_violence)
Coercion (C): This factor involves controlling and manipulative behaviors, often through threats or emotional blackmail. Example items include: "Talks to you about your imaginary romantic relationships" and "Threatens to commit suicide or harm themselves if you leave them."
coercion<-cbind(cuv1a, cuv9a, cuv17a, cuv25a, cuv38a,cuv42a)
coercion<-as.matrix(data.frame(coercion))
df$coercion<- rowSums(coercion)
Physical Violence (P):This factor refers to direct physical aggression. Examples of items include: "He punched you" and "He hurt you with an object."
physical_violence<-cbind(cuv5a, cuv13a, cuv20a, cuv21a,cuv29a)
physical_violence<-as.matrix(data.frame(physical_violence))
df$physical_violence<- rowSums(physical_violence)
Derision (Der): This factor concerns behaviors in which the partner ridicules or insults in a general way, often referring to men or women. Examples of items include: "Derides men or women" and "Ridicules or insults men or women."
derision<-cbind(cuv3a,cuv11a,cuv19a,cuv27a,cuv35a)
derision<-as.matrix(data.frame(derision))
df$derision<- rowSums(derision)
Emotional Punishment (EP): This factor refers to the use of withholding support, affection, or esteem as a form of punishment. Example items include: "To punish you, the person withholds his/her support, affection, or esteem" and "Threatens to leave you."
emotional_punishment<-cbind(cuv8a,cuv16a,cuv24a)
emotional_punishment<-as.matrix(data.frame(emotional_punishment))
df$emotional_punishment<- rowSums(emotional_punishment)
Instrumental Violence (I): This factor includes behaviors in which the partner exploits or materially harms the partner. Example items include: "Stole from you" and "Pushed you into debt."
instrumental_violence<-cbind(cuv12a,cuv4a,cuv28a)
instrumental_violence<-as.matrix(data.frame(instrumental_violence))
df$instrumental_violence<- rowSums(instrumental_violence)
The documents provided describe the Eysenck Personality Questionnaire-Revised Short Form (EPQR-S). It is a 48-item questionnaire with a "Yes" or "No" response. This instrument is used to assess three main personality domains:
Extroversion (12 items): Measures an individual's level of sociability, activity, and stimulation seeking.
df$epq.ext <- df[, c('ey3')] +
df[, c('ey7')] +
df[, c('ey11')] +
df[, c('ey15')] +
df[, c('ey19')] +
df[, c('ey23')] +
df[, c('ey32')] +
df[, c('ey36')] +
df[, c('ey44')] +
df[, c('ey48')] +
(1-df[, c('ey27')]) +
(1-df[, c('ey41')])
Neuroticism (12 items): Assesses the tendency to experience negative emotions such as anxiety, worry, and sadness.
df$epq.nev <- df[, c('ey1')] +
df[, c('ey5')] +
df[, c('ey9')] +
df[, c('ey13')] +
df[, c('ey17')] +
df[, c('ey21')] +
df[, c('ey25')] +
df[, c('ey30')] +
df[, c('ey34')] +
df[, c('ey38')] +
df[, c('ey42')] +
df[, c('ey46')]
Psychoticism (12 items): Measures traits such as impulsivity, aggression, lack of Empathy and social nonconformity.
df$epq.psy <- df[, c('ey10')] +
df[, c('ey14')] +
df[, c('ey22')] +
df[, c('ey31')] +
df[, c('ey39')] +
(1-df[, c('ey2')]) +
(1-df[, c('ey6')]) +
(1-df[, c('ey18')]) +
(1-df[, c('ey26')]) +
(1-df[, c('ey28')]) +
(1-df[, c('ey35')]) +
(1-df[, c('ey43')])
The remaining 12 items of the The questionnaire consists of the "lie scale," used to assess a respondent's tendency to present an overly positive self-image.
df$epq.lie <- df[, c('ey4')] +
df[, c('ey16')] +
df[, c('ey45')] +
(1-df[, c('ey8')])+
(1-df[, c('ey12')])+
(1-df[, c('ey20')])+
(1-df[, c('ey24')])+
(1-df[, c('ey29')])+
(1-df[, c('ey33')])+
(1-df[, c('ey37')])+
(1-df[, c('ey40')])+
(1-df[, c('ey47')])
The variable stalk.ind to predict represents a composite score for each participant, obtained by adding the responses to the 7 items of the Breaking Relationship Scale (BRS), which aim to assess the negative reaction of the (former) partner following the breakup. Participants were asked to describe their partner's reaction when the relationship ended, based on the presence or absence of specific behaviors.
BRS items include the following examples:
“He/she sent me aggressive or obscene messages”
“He/she called me without speaking”
“He/she spied on me”
“He/she tried to put me in a bad light with my friends”
“After the breakup of the relationship, I was in a state of alertness”
“After the breakup, I changed my habits”
“I changed my cell number”
####### Breaking Relationship as.factor (BRS):
# Partner's violent reaction to the breakup of the relationship
stalk.ind <-cbind(
df[,'brs1'],
df[,'brs2'],
df[,'brs3'],
df[,'brs4'],
df[,'brs5'],
df[,'brs6'],
df[,'brs7'])
stalk.ind<-as.matrix(data.frame(stalk.ind))
df$stalk.ind<-rowSums(stalk.ind)
Exporting data with the variables created in csv format:
df<-df[,275:287]
write.csv(df, file = "df.csv", row.names = F)
Creation of predictive model in python
We use the RandomForest algorithm to train a predictive model of a partner's violent reaction to a breakup (variable stalk.ind) using previously created predictors, achieving an accuracy of 61.23%.
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report
# Carichiamo i dati
data = pd.read_csv('df.csv')
# Convertiamo la variabile da predire in int e le altre in object
data= data.astype(object)
data=data[data['stalk.ind'].notna()]
data['stalk.ind']=data['stalk.ind'].astype('int')
# Separiamo la variabile target dai predittori
y = data['stalk.ind']
X = data.drop(['stalk.ind'], axis=1)
# Dividiamo i dati in un training set del 75% e in un validation set del 25%
X_train, X_valid, y_train, y_valid = train_test_split(X, y, train_size=0.75, test_size=0.25,
random_state=0)
categorical_cols = X_train.columns
# Preprocessiamo le variabili categoriche
categorical_transformer = Pipeline(steps=[
('imputer', SimpleImputer(strategy='most_frequent')),
('onehot', OneHotEncoder(handle_unknown='ignore'))
])
preprocessor = ColumnTransformer(
transformers=[
('cat', categorical_transformer, categorical_cols)
])
model = RandomForestClassifier()
# Mettiamo il preprocessing e il modello in una pipeline
my_pipeline = Pipeline(steps=[('preprocessor', preprocessor),
('model', model)
])
# addestriamo il modello sul training set
my_pipeline.fit(X_train, y_train)
# otteniamo la previsione sul validation set
preds = my_pipeline.predict(X_valid)
print(classification_report(y_valid, preds))
precision recall f1-score support
0 0.61 1.00 0.76 30
1 0.00 0.00 0.00 13
2 0.00 0.00 0.00 5
3 0.00 0.00 0.00 1
accuracy 0.61 49
macro avg 0.15 0.25 0.19 49
weighted avg 0.37 0.61 0.46 49
Prediction example
With the following example person, the model predicts 0, meaning no violent reaction to the breakup:
new_person= {
"detachment": 2,
"humiliation": 3,
"sexual_violence": 2,
"coercion": 4,
"physical_violence": 2,
"derision":1,
"emotional_punishment":1,
"instrumental_violence":0,
"epq.psy":2,
"epq.ext":0,
"epq.nev":1,
"epq.lie":0
}
new_person_df=pd.DataFrame([new_person])
my_pipeline.predict(new_person_df)
array([0])