Attribute VB_Name = "a02_Economics_2" Option Explicit ' -- Global variables below calculated in Call Calculate_Deltal Public dtalip(50 To 106) As Double Public dtalpp(50 To 106) As Double Public explife(50 To 106) As Double Public Arvsvinstfaktor(0 To 106) As Double 'This variable is used to generate sigma_my from Init-module. It is redimensioned _ too zero when not needed anymore. Public randomValues() As Single Public helpArrayRandomValues() As Single Public lnesumma As Double Public estlnesumma As Double Public numberofln As Long Public Sub new_economy_2() '! Calculate various income for different status Dim i As Long Dim grund_niv As Double Dim max_niv As Long Dim ak_min As Double Dim ak_max As Double Dim ak_lev As Double Dim ak_sjuk As Double Dim dagers As Long Dim ZTAK As Double Dim CSGIMA As Double Dim DPLA As Long Dim inc_sickness As Long status "Economy 2" Printdok "new_economy_2" '-- Initialization of pension parameters and macrodata Call Calculate_Deltal(m_ap_norm, 1 + ((m_interest_long / 100) - m_favg_pp)) m_dtalip_65 = dtalip(65) '-- For reporting m_dtalpp_65 = dtalpp(65) '-- For reporting m_arvsvinst_60 = Arvsvinstfaktor(60) '-- For reporting '*** Update h_max_inc_taxable and h_sum_inc_taxable ReDim h_max_inc_taxable(1 To m_hcount) ReDim h_sum_inc_taxable(1 To m_hcount) Printdok " -- i loop in new_economy_2: Update_Survivors_pension" Printdok " -- i loop in new_economy_2: Calculate_Occupational_pension_benefits" Printdok " -- i loop in new_economy_2: Calculate_Public_Pension_Benefits" Printdok " -- i loop in new_economy_2: Calculate_Disability_Pension" For i = 1 To m_icount ' -- Updating survivors pension (Note: All individualls in all status) Call Update_Survivors_pension(i) i_inc_earning(i) = 0 i_inc_selfemployed(i) = 0 i_inc_taxable(i) = 0 i_inc_taxed(i) = 0 i_inc_market(i) = 0 i_inc_work(i) = 0 i_trf_parentleave(i) = 0 i_trf_unemployed(i) = 0 i_trf_pension(i) = 0 i_trf_sickleave(i) = 0 i_income(i) = income_2(i) * m_wage_change99 Select Case i_status(i) '*** Children have no income 'Case 1 '*** Retired Case 2 'Call Calculate_Occupational_pension_benefits(i) '-- Private pension payout time If i_status1(i) <> 2 And i_wealth_pension_total(i) > 0 Then If Rnd > 0.7 Or i_wealth_pension_total(i) > 20 * m_basbelopp_income Then i_pp_payout_time(i) = -99 '-- Annuity Else i_pp_payout_time(i) = 5 '-- Fixed 5 year period End If End If i_trf_pension(i) = f_Public_Pension_Benefits(i) + _ f_Private_Pension_Benefits(i, i_pp_payout_time(i)) + _ f_Occupational_pension_benefits(i) '*** Students Case 3 i_inc_earning(i) = f_income_students(i) i_inc_earning(i) = i_inc_earning(i) * m_wage_change99 i_income(i) = i_inc_earning(i) ' For calculation of sickness benefits '-- Study grants and loans calculated i a05_Rules '*** Disabled Case 4 Call Calculate_Disability_Pension(i) i_trf_pension(i) = i_ftp(i) ' Parental leave (only women) lneindexerat tak och grundniv Case 5 Select Case (base_year + model_time) Case Is < 2002 grund_niv = 60 * 365 max_niv = 7.5 * m_basbelopp Case 2002 grund_niv = 120# * 365# max_niv = 7.5 * m_basbelopp Case 2003 grund_niv = 150# * 365# max_niv = 7.5 * m_basbelopp Case 2004 grund_niv = 180# * 365# max_niv = 7.5 * m_basbelopp Case 2005 grund_niv = 180# * 365# max_niv = 7.5 * m_basbelopp Case 2006 grund_niv = 180# * 365# max_niv = m_basbelopp * (7.5 + 10) / 2 Case 2007 grund_niv = 180# * 365# max_niv = m_basbelopp * 10 Case 2008 grund_niv = 180# * 365# max_niv = m_basbelopp * 10 Case Else grund_niv = 180# * 365# * m_wage_change09 max_niv = 10 * m_basbelopp * m_realwage_change09 End Select i_trf_parentleave(i) = maxi(0.8 * mini(i_income(i), max_niv), grund_niv) '*** Unemployed (100 dagar med frhjd ersttning fr.o.m. 2001 => 164 med lgre) '*** 070301 Antar att perioderna infaller s att 80 dagar fr hgre ersttning (fr 2003) '*** 070301 Antar att perioderna 2007 => infaller s att 164 dagar fr hgre ersttning (fr 2003) '*** 070319 Implemmenterar 5 karensdagar (rtt alshet men fr hga utbetalningar tidigare) Case 6 Select Case (base_year + model_time) Case Is < 2001 ak_min = 240 ak_max = 580 ak_lev = 80 Case 2001 ak_min = (240 + 270) / 2 ak_max = (100# * (580 + 50) + 164# * 580) / 264 ak_lev = 80 Case 2002 ak_min = (270 + 320) / 2 ak_max = (100# * ((580 + 680) / 2 + 75) + 164# * (580 + 680) / 2) / 264 'Ger 658 i snitt ak_lev = 80 Case 2003 ak_min = 320 'ak_max = (100# * (680 + 50) + 164# * 680#) / 264 ak_max = (80# * (680 + 50) + 184# * 680#) / 264 ak_lev = 80 Case 2004 ak_min = 320 'ak_max = (100# * (680 + 50) + 164# * 680#) / 264 ak_max = (80# * (680 + 50) + 184# * 680#) / 264 ak_lev = 80 Case 2005 ak_min = 320 'ak_max = (100# * (680 + 50) + 164# * 680) / 264 ak_max = (80# * (680 + 50) + 184# * 680) / 264 ak_lev = 80 Case 2006 ak_min = 320 'ak_max = (100# * (680 + 50) + 164# * 680) / 264 ak_max = (80# * (680 + 50) + 184# * 680) / 264 ak_lev = 80 Case 2007 ak_min = 320 ak_max = 680 'ak_lev = (200# * 80 + 64# * 70) / 264 ak_lev = (164# * 80 + 100# * 70) / 264 Case 2008 ak_min = 320 ak_max = 680 'ak_lev = (200# * 80 + 64# * 70) / 264 ak_lev = (164# * 80 + 100# * 70) / 264 Case Else ak_min = m_wage_change09 * 320 ak_max = m_wage_change09 * 680 'ak_lev = (200# * 80 + 64# * 70) / 264 ak_lev = (164# * 80 + 100# * 70) / 264 End Select '*** Individuals that were not working the previo mg=qǨCrt)r}ǂ^;Vsr)S+H|M|M?ϥMIz͵zϱ{>~ʼi)N:^ַNVW'c->J´ W:*Pkk<ޝ_t'>jWJm}O8gG#o}> ^ ƭ?כ}=7z5squIS:S6m i>~t{{}~>*] wij ->~l ޏ?N_ O}/mt(8_:nj_}:1qu谽 ?ڽcN_Wq=GCVG˥Ryn]6hot-NxT.sSM Mѫ߮igISiO/Z]z- I^5zfYUjhմ9ڤRS[VOR||Wu~?O6[٤ZJgSϭkLtcoqk }߳ƟK䟪i