Juvenile Delinquency Model

Juvenile Delinquency Model  preview image

1 collaborator

Default-person Allen Nie (Author)

Tags

delinquency rate 

Tagged by Marzieh Jahanbazi over 9 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 304 times • Downloaded 25 times • Run 0 times
Download the 'Juvenile Delinquency Model ' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [ 
  direct-control-parents
  direct-control-police
  community-unemployment
  community-norm
  domestic-violence-rate ;; this replaces "family disruption"
  school-violence
  school-involvement
  government-initial-income ;; ticks will affect this part
  government-total-income
  funding-apply-rate ;; this is decided by investment-method on the interface
  business-index ;; how thriving this area is
  total-number-of-crimes ;; counter, totally
]

patches-own [
  personal-stress
  personal-stress-base
  self-control
  propensity-to-aggression ;; genetic
  exposure-to-delinquent-peers
  exposure-to-delinquent-peers-base ;; base
  attachment-to-parents
  attachment-to-parents-base ;; base
  family-income
  personal-goal
  personal-goal-base ;; personal
  relations-with-peers
  relations-with-peers-base ;; base
  personal-belief
  personal-belief-base ;; genetic
  delinquent-likelihood
]

to setup
  clear-all
  check-user-input
  setup-enviornment-variables
  setup-patches
  reset-ticks
end 

to-report total-proportion
  let result proportion-of-family-subsidy + proportion-of-police-control + proportion-of-small-medium-business + proportion-of-educational-programs
  ifelse result > 1 [ user-message "can't be larger than 1" ]
  [ report result ]
end 

to check-user-input
  if proportion-of-family-subsidy + proportion-of-police-control + proportion-of-small-medium-business + proportion-of-educational-programs > 1
  [ error "can't be larger than 1" ]
end 

to setup-enviornment-variables
  set government-initial-income 10
  set government-total-income government-initial-income + additional-funding
  set community-unemployment 21 ;; NJ.com income less than $20,000 employment rate 21%
  set domestic-violence-rate 23 ;; 23% women receiving food welfare was abused in the past 12 months - page 4 http://www.vawnet.org/Assoc_Files_VAWnet/BCS15_BP.pdf
  
  set school-violence 30 ;;not sure about this
  set school-involvement 10 ;;not sure
  
  set direct-control-parents 10 ;; made up number
  set direct-control-police 20 ;; made up number (Think about "Charlestown" in the movie "The Town")
  
  if investment-method = "aggressive" [set funding-apply-rate [0.1 0.5 0.2 0.2] ] ;; Q1 -> 1, Q2 -> 2, Q3 -> 3, Q4 -> 0
  if investment-method = "smooth" [set funding-apply-rate [0.25 0.25 0.25 0.25] ]
  if investment-method = "delayed" [set funding-apply-rate [0.5 0.1 0.2 0.2] ]
  
  if community-attitude = "Positive" [ set community-norm 70 ]
  if community-attitude = "Neutral" [ set community-norm 50 ]
  if community-attitude = "Negative" [ set community-norm 30 ]
  if community-attitude = "Extremely Negative" [ set community-norm 10 ]
  
  set business-index 5
end 

to setup-patches
  foreach n-values 15 [?]
  [ let $x ? - 7
    foreach n-values 15 [?] ;;this is y variable
    [ let $y ? - 7
      ;; this is the initiation of all patches
      ;;set up individual value
      ask patch $x $y [
        set self-control 20 * abs random-normal 0 50 / 100 ;;only self-control is genetic (all in 100)
        set family-income 20 * abs random-normal 0 50 / 100 ;; 10-30 are low income, 30-60 medium, 60-90 high, 100 wealthy $13,000 is the wage for McDonald's worker
        set personal-goal-base 20 * abs random-normal 0 50 / 100 ;; different people have different dreams
        set personal-belief-base 20 * abs random-normal 0 50 / 100
        set personal-stress-base direct-control-parents * 0.1 + domestic-violence-rate * 0.5 + school-violence * 0.6
        set attachment-to-parents-base 20 * abs random-normal 0 50 / 100 ;; random attachment to parents
        set relations-with-peers-base 20 * abs random-normal 0 50 / 100
        set exposure-to-delinquent-peers-base 50 * abs random-normal 0 50 / 100
        
        set propensity-to-aggression 30 * abs random-normal 0 50 / 100 ;; genetic
      ]
    ]
  ]
end 

to go
  if ticks >= 40 [ stop ] ;; stop after 40 quaters (10 years)
  first-iteration ;;affects all Enviornmental factors
  patch-iteration ;;affects all agent attributes (patch)
  tick
end 

to first-iteration
  
  set direct-control-parents direct-control-parents + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-family-subsidy * 0.1 + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-small-medium-business * 0.1
  set domestic-violence-rate domestic-violence-rate + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-family-subsidy * -0.2
  set school-involvement school-involvement + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-family-subsidy * 0.1 + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-educational-programs * 0.5
  set direct-control-police direct-control-police + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-police-control * 0.5
  set school-violence school-violence + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-police-control * -0.15 + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-educational-programs * -0.1
  set community-unemployment community-unemployment + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-small-medium-business * -0.1
  set community-norm community-norm + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-educational-programs * 0.2

  ;; this should also be tied to deliquent rate, direct-police control
  set business-index business-index + item remainder ticks 4 funding-apply-rate * government-total-income * proportion-of-small-medium-business * 0.15
end 

to patch-iteration
foreach n-values 15 [?]
  [ let $x ? - 7
    foreach n-values 15 [?] ;;this is y variable
    [ let $y ? - 7
      ;; this is the random initiation of all patches
      ;; color range from lowest blue 105 to 109, then to magenta 129 to 125 (red 15 flash means crime)
      
      ;;set up individual value
      ask patch $x $y [
        ;; these two are not very certain, adjust them if you must
        set personal-stress personal-stress-base + direct-control-parents * 0.1 + domestic-violence-rate * 0.5 + school-violence * 0.6 + 10 * abs random-normal 0 50 / 100 ;; plus random events
        set exposure-to-delinquent-peers exposure-to-delinquent-peers-base + direct-control-parents * -0.25 + direct-control-police * -0.25 + school-violence * 0.5
        
        set family-income family-income + business-index / 50 + random-normal 0 1 * business-index ;; first part base, second part adjust the base
        
        set personal-goal personal-goal-base + community-unemployment * 0.15 + school-involvement * 0.1
        set attachment-to-parents attachment-to-parents-base + domestic-violence-rate * -0.23
        set relations-with-peers relations-with-peers-base - school-violence * 0.3 + school-involvement * 0.2
        
        set personal-belief personal-belief-base + community-norm * 0.25
        
        set delinquent-likelihood propensity-to-aggression * 0.5 + personal-stress * 0.23 - self-control * 0.165 + exposure-to-delinquent-peers * 0.556 - attachment-to-parents * 0.155 - family-income * 0.009 - personal-goal * 0.1 - relations-with-peers * 0.165 - personal-goal * 0.08
        
        ;; set up patch color dependent on the delinquent-likelihood
        
        set pcolor scale-color blue delinquent-likelihood 100 0
        
        ;; this should be the right way to do it
        
        if delinquent-likelihood > 0 [
            let crime-dice random delinquent-likelihood
            if crime-dice >= 35 [ 
              set pcolor 15 
              set total-number-of-crimes total-number-of-crimes + 1
            ]
        ]
        
      ]
    ]
  ]
end 

There is only one version of this model, created over 10 years ago by Allen Nie.

Attached files

File Type Description Last updated
Juvenile Delinquency Model .png preview Preview for 'Juvenile Delinquency Model ' over 10 years ago, by Allen Nie Download

This model does not have any ancestors.

This model does not have any descendants.