Emotional Neglect vs Attachment Security

Published: 29 October 2024| Version 1 | DOI: 10.17632/tykm44dsty.1
Contributor:
Sunil Maria Benedict

Description

The scatter plot serves as a powerful visual tool to analyze the relationship between emotional neglect and attachment security. In our simulated data analysis, we generated two variables: levels of emotional neglect and corresponding levels of attachment security. The data was structured such that higher levels of emotional neglect were associated with lower levels of attachment security.

Files

Steps to reproduce

import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Set the random seed for reproducibility np.random.seed(42) # Number of samples n = 200 # Generate simulated data with more permutations # Varying the mean and standard deviation for emotional neglect emotional_neglect = np.random.normal(loc=50, scale=15, size=n) # Reduced scale for tighter clustering # Attachment security inversely related to neglect with added variability attachment_security = 100 - emotional_neglect + np.random.normal(0, 10, n) # Increased noise # Create DataFrame data = pd.DataFrame({'Emotional_Neglect': emotional_neglect, 'Attachment_Security': attachment_security}) # Plot: Emotional Neglect vs. Attachment Security plt.figure(figsize=(12, 8)) # Scatter plot with different markers and alpha for better visibility sns.scatterplot(x='Emotional_Neglect', y='Attachment_Security', data=data, color='purple', alpha=0.6, edgecolor='w', s=100) # Adding a regression line to visualize the trend sns.regplot(x='Emotional_Neglect', y='Attachment_Security', data=data, scatter=False, color='orange', line_kws={"linewidth":2}) plt.title("Emotional Neglect vs. Attachment Security", fontsize=16) plt.xlabel("Emotional Neglect", fontsize=14) plt.ylabel("Attachment Security", fontsize=14) plt.xlim(0, 100) # Set limits for better visualization plt.ylim(0, 100) plt.grid(True) plt.axhline(y=50, color='r', linestyle='--') # Add a horizontal line at y=50 for reference plt.axvline(x=50, color='g', linestyle='--') # Add a vertical line at x=50 for reference plt.show()

Institutions

Independent

Categories

Child Development, Emotion Expression, Emotion Regulation, Emotional Child Neglect, Emotional Abuse, Emotion Perception

Licence