En este pedazao deberemos de meter la imagen

Teoria

lm() es la funcion de R para ajustar modelos lineales. Es el modelo màs bàsico que existe y más facil de interpretar. Para interpretarlo se usa la medida R-cuadrada, que significa qué tan cerca están los datos de la linea de regresión ajustada. (va de 0 a 1, donde es es que el modelo explica toda la viarabilidad).

Modelo Predictivo

# Importar base de datos
base_de_datos <- read.csv("/Users/pedrovillanueva/Downloads/seguros.csv")

# Entender la base de datos
resumen <- summary(base_de_datos)
resumen
##     ClaimID           TotalPaid       TotalReserves     TotalRecovery      
##  Min.   :  777632   Min.   :      0   Min.   :      0   Min.   :     0.00  
##  1st Qu.:  800748   1st Qu.:     83   1st Qu.:      0   1st Qu.:     0.00  
##  Median :  812128   Median :    271   Median :      0   Median :     0.00  
##  Mean   : 1864676   Mean   :  10404   Mean   :   3368   Mean   :    66.05  
##  3rd Qu.:  824726   3rd Qu.:   1122   3rd Qu.:      0   3rd Qu.:     0.00  
##  Max.   :62203364   Max.   :4527291   Max.   :1529053   Max.   :100000.00  
##                                                                            
##  IndemnityPaid      OtherPaid       TotalIncurredCost ClaimStatus       
##  Min.   :     0   Min.   :      0   Min.   : -10400   Length:31619      
##  1st Qu.:     0   1st Qu.:     80   1st Qu.:     80   Class :character  
##  Median :     0   Median :    265   Median :    266   Mode  :character  
##  Mean   :  4977   Mean   :   5427   Mean   :  13706                     
##  3rd Qu.:     0   3rd Qu.:   1023   3rd Qu.:   1098                     
##  Max.   :640732   Max.   :4129915   Max.   :4734750                     
##                                                                         
##  IncidentDate       IncidentDescription ReturnToWorkDate   ClaimantOpenedDate
##  Length:31619       Length:31619        Length:31619       Length:31619      
##  Class :character   Class :character    Class :character   Class :character  
##  Mode  :character   Mode  :character    Mode  :character   Mode  :character  
##                                                                              
##                                                                              
##                                                                              
##                                                                              
##  ClaimantClosedDate EmployerNotificationDate ReceivedDate      
##  Length:31619       Length:31619             Length:31619      
##  Class :character   Class :character         Class :character  
##  Mode  :character   Mode  :character         Mode  :character  
##                                                                
##                                                                
##                                                                
##                                                                
##     IsDenied       Transaction_Time Procesing_Time     ClaimantAge_at_DOI
##  Min.   :0.00000   Min.   :    0    Min.   :    0.00   Min.   :14.0      
##  1st Qu.:0.00000   1st Qu.:  211    1st Qu.:    4.00   1st Qu.:33.0      
##  Median :0.00000   Median :  780    Median :   10.00   Median :42.0      
##  Mean   :0.04463   Mean   : 1004    Mean   :   62.99   Mean   :41.6      
##  3rd Qu.:0.00000   3rd Qu.: 1440    3rd Qu.:   24.00   3rd Qu.:50.0      
##  Max.   :1.00000   Max.   :16428    Max.   :11558.00   Max.   :94.0      
##                    NA's   :614                                           
##     Gender          ClaimantType       InjuryNature       BodyPartRegion    
##  Length:31619       Length:31619       Length:31619       Length:31619      
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##    BodyPart         AverageWeeklyWage1    ClaimID1        BillReviewALE    
##  Length:31619       Min.   : 100.0     Min.   :  777632   Min.   : -448.0  
##  Class :character   1st Qu.: 492.0     1st Qu.:  800748   1st Qu.:   16.0  
##  Mode  :character   Median : 492.0     Median :  812128   Median :   24.0  
##                     Mean   : 536.5     Mean   : 1864676   Mean   :  188.7  
##                     3rd Qu.: 492.0     3rd Qu.:  824726   3rd Qu.:   64.1  
##                     Max.   :8613.5     Max.   :62203364   Max.   :46055.3  
##                                                           NA's   :14912    
##     Hospital         PhysicianOutpatient       Rx          
##  Min.   : -12570.4   Min.   :   -549.5   Min.   :  -160.7  
##  1st Qu.:    210.5   1st Qu.:    105.8   1st Qu.:    22.9  
##  Median :    613.9   Median :    218.0   Median :    61.5  
##  Mean   :   5113.2   Mean   :   1813.2   Mean   :  1695.2  
##  3rd Qu.:   2349.1   3rd Qu.:    680.6   3rd Qu.:   189.0  
##  Max.   :2759604.0   Max.   :1219766.6   Max.   :631635.5  
##  NA's   :19655       NA's   :2329        NA's   :20730

Plot de la base de datos

base_de_datos$ClaimStatus <- as.factor(base_de_datos$ClaimStatus)
base_de_datos$IncidentDate <- as.factor(base_de_datos$IncidentDate)
base_de_datos$IncidentDescription <- as.factor(base_de_datos$IncidentDescription)
base_de_datos$ReturnToWorkDate <- as.factor(base_de_datos$ReturnToWorkDate)
base_de_datos$ClaimantOpenedDate <- as.factor(base_de_datos$ClaimantOpenedDate)
base_de_datos$ClaimantClosedDate <- as.factor(base_de_datos$ClaimantClosedDate)
base_de_datos$EmployerNotificationDate <- as.factor(base_de_datos$EmployerNotificationDate)
base_de_datos$ReceivedDate <- as.factor(base_de_datos$ReceivedDate)
base_de_datos$Gender <- as.factor(base_de_datos$Gender)
base_de_datos$ClaimantType <- as.factor(base_de_datos$ClaimantType)
base_de_datos$InjuryNature <- as.factor(base_de_datos$InjuryNature)
base_de_datos$BodyPartRegion <- as.factor(base_de_datos$BodyPartRegion)
base_de_datos$BodyPart <- as.factor(base_de_datos$BodyPart)

Generando la regresion

# Generar regresion (modelo lineal)
regresion <- lm(TotalIncurredCost ~  + Transaction_Time + Procesing_Time + ClaimantAge_at_DOI + Gender + ClaimantType + InjuryNature + BodyPartRegion + BodyPart + AverageWeeklyWage1 + BillReviewALE + Hospital + PhysicianOutpatient + Rx,  data=base_de_datos)
summary(regresion)
## 
## Call:
## lm(formula = TotalIncurredCost ~ +Transaction_Time + Procesing_Time + 
##     ClaimantAge_at_DOI + Gender + ClaimantType + InjuryNature + 
##     BodyPartRegion + BodyPart + AverageWeeklyWage1 + BillReviewALE + 
##     Hospital + PhysicianOutpatient + Rx, data = base_de_datos)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -106359   -4614    -317    3125  676050 
## 
## Coefficients: (6 not defined because of singularities)
##                                                                       Estimate
## (Intercept)                                                         -4.900e+03
## Transaction_Time                                                     4.511e+00
## Procesing_Time                                                       3.467e+01
## ClaimantAge_at_DOI                                                   4.350e+01
## GenderMale                                                           1.190e+03
## GenderNot Available                                                  1.228e+03
## ClaimantTypeMedical Only                                            -2.306e+04
## ClaimantTypeReport Only                                             -2.275e+04
## InjuryNatureAsbestosis                                               1.009e+04
## InjuryNatureBurn                                                     1.667e+03
## InjuryNatureCarpal Tunnel Syndrome                                  -4.096e+03
## InjuryNatureConcussion                                               2.616e+04
## InjuryNatureContagious Disease                                       9.031e+03
## InjuryNatureContusion                                                3.910e+03
## InjuryNatureCrushing                                                 6.999e+03
## InjuryNatureDermatitis                                               5.482e+03
## InjuryNatureDislocation                                             -3.132e+03
## InjuryNatureDust Disease, NOC                                        1.041e+04
## InjuryNatureElectric Shock                                           3.895e+03
## InjuryNatureForeign Body                                             2.991e+03
## InjuryNatureFracture                                                 6.603e+03
## InjuryNatureHearing Loss Or Impairment                              -6.828e+03
## InjuryNatureHeat Prostration                                         1.103e+03
## InjuryNatureHernia                                                  -2.791e+03
## InjuryNatureInfection                                                8.078e+02
## InjuryNatureInflammation                                             3.083e+03
## InjuryNatureLaceration                                               5.080e+03
## InjuryNatureLoss of Hearing                                         -1.344e+04
## InjuryNatureMental Stress                                           -1.597e+04
## InjuryNatureMultiple Physical Injuries Only                          4.898e+03
## InjuryNatureMyocardial Infarction                                   -1.263e+04
## InjuryNatureNo Physical Injury                                       2.024e+03
## InjuryNatureNon-Standard Code                                        2.225e+03
## InjuryNaturePoisoning?Chemical (Other Than Metals)                   5.131e+03
## InjuryNaturePuncture                                                 6.089e+03
## InjuryNatureRespiratory Disorders                                    3.725e+03
## InjuryNatureRupture                                                 -2.687e+04
## InjuryNatureSeverance                                               -2.708e+03
## InjuryNatureSprain                                                   1.823e+03
## InjuryNatureStrain                                                   4.969e+03
## InjuryNatureSyncope                                                 -3.494e+02
## BodyPartRegionLower Extremities                                      1.281e+04
## BodyPartRegionMultiple Body Parts                                    1.344e+04
## BodyPartRegionNeck                                                   1.730e+04
## BodyPartRegionNon-Standard Code                                     -3.840e+03
## BodyPartRegionTrunk                                                  1.154e+04
## BodyPartRegionUpper Extremities                                      1.171e+04
## BodyPartAnkle                                                       -1.085e+03
## BodyPartArtificial Appliance                                         5.923e+02
## BodyPartBody Systems and Multiple Body Systems                      -7.043e+03
## BodyPartButtocks                                                    -3.594e+03
## BodyPartChest                                                        2.401e+02
## BodyPartDisc-Trunk                                                  -1.089e+03
## BodyPartEar(S)                                                       1.348e+04
## BodyPartElbow                                                        9.459e+02
## BodyPartEyes                                                         1.396e+04
## BodyPartFacial Bones                                                 1.610e+04
## BodyPartFinger(S)                                                   -1.265e+03
## BodyPartFoot                                                        -1.502e+03
## BodyPartGreat Toe                                                   -6.436e+03
## BodyPartHand                                                        -1.104e+02
## BodyPartHeart                                                       -4.913e+03
## BodyPartHip                                                          6.819e+03
## BodyPartInsufficient Info to Properly Identify?Unclassified         -6.321e+02
## BodyPartInternal Organs                                             -4.789e+03
## BodyPartKnee                                                         3.666e+03
## BodyPartLower Arm                                                    7.616e+02
## BodyPartLower Back Area                                              5.431e+03
## BodyPartLower Leg                                                    1.923e+03
## BodyPartLumbar and/or Sacral Vertebrae (Vertebra NOC Trunk)          1.530e+03
## BodyPartLungs                                                       -9.781e+02
## BodyPartMouth                                                        9.824e+03
## BodyPartMultiple Body Parts (Including Body Systems and Body Parts)  2.483e+02
## BodyPartMultiple Head Injury                                         1.368e+04
## BodyPartMultiple Lower Extremities                                   5.846e+03
## BodyPartMultiple Neck Injury                                        -2.686e+03
## BodyPartMultiple Trunk                                               5.063e+03
## BodyPartMultiple Upper Extremities                                   3.058e+03
## BodyPartNo Physical Injury                                                  NA
## BodyPartNon-Standard Code                                                   NA
## BodyPartNose                                                         9.933e+03
## BodyPartPelvis                                                      -3.191e+03
## BodyPartSacrum And Coccyx                                           -9.186e+03
## BodyPartShoulder(S)                                                  2.730e+03
## BodyPartSkull                                                        4.735e+03
## BodyPartSoft Tissue-Neck                                            -4.144e+03
## BodyPartSpinal Cord-Trunk                                            2.729e+04
## BodyPartTeeth                                                               NA
## BodyPartThumb                                                        3.083e+02
## BodyPartToes                                                        -3.639e+03
## BodyPartTrachea                                                             NA
## BodyPartUpper Arm                                                    3.710e+03
## BodyPartUpper Back Area                                              3.485e+03
## BodyPartUpper Leg                                                           NA
## BodyPartWrist                                                               NA
## AverageWeeklyWage1                                                   5.494e+00
## BillReviewALE                                                        2.534e-01
## Hospital                                                            -5.254e-03
## PhysicianOutpatient                                                 -8.238e-03
## Rx                                                                   5.749e-03
##                                                                     Std. Error
## (Intercept)                                                          1.233e+04
## Transaction_Time                                                     6.036e-01
## Procesing_Time                                                       2.929e+00
## ClaimantAge_at_DOI                                                   3.800e+01
## GenderMale                                                           8.644e+02
## GenderNot Available                                                  6.925e+03
## ClaimantTypeMedical Only                                             1.128e+03
## ClaimantTypeReport Only                                              2.672e+03
## InjuryNatureAsbestosis                                               1.768e+04
## InjuryNatureBurn                                                     4.416e+03
## InjuryNatureCarpal Tunnel Syndrome                                   5.780e+03
## InjuryNatureConcussion                                               9.483e+03
## InjuryNatureContagious Disease                                       9.751e+03
## InjuryNatureContusion                                                2.484e+03
## InjuryNatureCrushing                                                 8.316e+03
## InjuryNatureDermatitis                                               3.936e+03
## InjuryNatureDislocation                                              8.286e+03
## InjuryNatureDust Disease, NOC                                        2.467e+04
## InjuryNatureElectric Shock                                           1.393e+04
## InjuryNatureForeign Body                                             3.613e+03
## InjuryNatureFracture                                                 3.722e+03
## InjuryNatureHearing Loss Or Impairment                               1.686e+04
## InjuryNatureHeat Prostration                                         1.447e+04
## InjuryNatureHernia                                                   1.256e+04
## InjuryNatureInfection                                                9.676e+03
## InjuryNatureInflammation                                             5.244e+03
## InjuryNatureLaceration                                               2.906e+03
## InjuryNatureLoss of Hearing                                          1.690e+04
## InjuryNatureMental Stress                                            1.134e+04
## InjuryNatureMultiple Physical Injuries Only                          4.337e+03
## InjuryNatureMyocardial Infarction                                    2.914e+04
## InjuryNatureNo Physical Injury                                       5.440e+03
## InjuryNatureNon-Standard Code                                        1.219e+04
## InjuryNaturePoisoning?Chemical (Other Than Metals)                   1.127e+04
## InjuryNaturePuncture                                                 3.165e+03
## InjuryNatureRespiratory Disorders                                    6.455e+03
## InjuryNatureRupture                                                  1.807e+04
## InjuryNatureSeverance                                                1.954e+04
## InjuryNatureSprain                                                   3.128e+03
## InjuryNatureStrain                                                   2.597e+03
## InjuryNatureSyncope                                                  1.102e+04
## BodyPartRegionLower Extremities                                      1.278e+04
## BodyPartRegionMultiple Body Parts                                    1.301e+04
## BodyPartRegionNeck                                                   2.279e+04
## BodyPartRegionNon-Standard Code                                      1.760e+04
## BodyPartRegionTrunk                                                  1.252e+04
## BodyPartRegionUpper Extremities                                      1.202e+04
## BodyPartAnkle                                                        5.323e+03
## BodyPartArtificial Appliance                                         1.817e+04
## BodyPartBody Systems and Multiple Body Systems                       8.115e+03
## BodyPartButtocks                                                     9.291e+03
## BodyPartChest                                                        5.075e+03
## BodyPartDisc-Trunk                                                   7.501e+03
## BodyPartEar(S)                                                       1.532e+04
## BodyPartElbow                                                        3.765e+03
## BodyPartEyes                                                         1.212e+04
## BodyPartFacial Bones                                                 1.257e+04
## BodyPartFinger(S)                                                    2.663e+03
## BodyPartFoot                                                         5.371e+03
## BodyPartGreat Toe                                                    1.078e+04
## BodyPartHand                                                         2.646e+03
## BodyPartHeart                                                        2.405e+04
## BodyPartHip                                                          6.398e+03
## BodyPartInsufficient Info to Properly Identify?Unclassified          7.147e+03
## BodyPartInternal Organs                                              1.740e+04
## BodyPartKnee                                                         4.973e+03
## BodyPartLower Arm                                                    3.387e+03
## BodyPartLower Back Area                                              4.253e+03
## BodyPartLower Leg                                                    5.587e+03
## BodyPartLumbar and/or Sacral Vertebrae (Vertebra NOC Trunk)          5.165e+03
## BodyPartLungs                                                        7.950e+03
## BodyPartMouth                                                        1.312e+04
## BodyPartMultiple Body Parts (Including Body Systems and Body Parts)  5.500e+03
## BodyPartMultiple Head Injury                                         1.207e+04
## BodyPartMultiple Lower Extremities                                   6.861e+03
## BodyPartMultiple Neck Injury                                         1.972e+04
## BodyPartMultiple Trunk                                               1.248e+04
## BodyPartMultiple Upper Extremities                                   4.310e+03
## BodyPartNo Physical Injury                                                  NA
## BodyPartNon-Standard Code                                                   NA
## BodyPartNose                                                         1.315e+04
## BodyPartPelvis                                                       8.129e+03
## BodyPartSacrum And Coccyx                                            1.422e+04
## BodyPartShoulder(S)                                                  2.795e+03
## BodyPartSkull                                                        1.601e+04
## BodyPartSoft Tissue-Neck                                             2.028e+04
## BodyPartSpinal Cord-Trunk                                            1.328e+04
## BodyPartTeeth                                                               NA
## BodyPartThumb                                                        3.329e+03
## BodyPartToes                                                         7.159e+03
## BodyPartTrachea                                                             NA
## BodyPartUpper Arm                                                    4.514e+03
## BodyPartUpper Back Area                                              6.216e+03
## BodyPartUpper Leg                                                           NA
## BodyPartWrist                                                               NA
## AverageWeeklyWage1                                                   1.807e+00
## BillReviewALE                                                        3.414e-01
## Hospital                                                             1.117e-02
## PhysicianOutpatient                                                  3.023e-02
## Rx                                                                   2.442e-02
##                                                                     t value
## (Intercept)                                                          -0.397
## Transaction_Time                                                      7.474
## Procesing_Time                                                       11.835
## ClaimantAge_at_DOI                                                    1.145
## GenderMale                                                            1.376
## GenderNot Available                                                   0.177
## ClaimantTypeMedical Only                                            -20.450
## ClaimantTypeReport Only                                              -8.513
## InjuryNatureAsbestosis                                                0.571
## InjuryNatureBurn                                                      0.378
## InjuryNatureCarpal Tunnel Syndrome                                   -0.709
## InjuryNatureConcussion                                                2.758
## InjuryNatureContagious Disease                                        0.926
## InjuryNatureContusion                                                 1.574
## InjuryNatureCrushing                                                  0.842
## InjuryNatureDermatitis                                                1.393
## InjuryNatureDislocation                                              -0.378
## InjuryNatureDust Disease, NOC                                         0.422
## InjuryNatureElectric Shock                                            0.280
## InjuryNatureForeign Body                                              0.828
## InjuryNatureFracture                                                  1.774
## InjuryNatureHearing Loss Or Impairment                               -0.405
## InjuryNatureHeat Prostration                                          0.076
## InjuryNatureHernia                                                   -0.222
## InjuryNatureInfection                                                 0.083
## InjuryNatureInflammation                                              0.588
## InjuryNatureLaceration                                                1.748
## InjuryNatureLoss of Hearing                                          -0.795
## InjuryNatureMental Stress                                            -1.408
## InjuryNatureMultiple Physical Injuries Only                           1.129
## InjuryNatureMyocardial Infarction                                    -0.433
## InjuryNatureNo Physical Injury                                        0.372
## InjuryNatureNon-Standard Code                                         0.183
## InjuryNaturePoisoning?Chemical (Other Than Metals)                    0.455
## InjuryNaturePuncture                                                  1.924
## InjuryNatureRespiratory Disorders                                     0.577
## InjuryNatureRupture                                                  -1.487
## InjuryNatureSeverance                                                -0.139
## InjuryNatureSprain                                                    0.583
## InjuryNatureStrain                                                    1.913
## InjuryNatureSyncope                                                  -0.032
## BodyPartRegionLower Extremities                                       1.003
## BodyPartRegionMultiple Body Parts                                     1.033
## BodyPartRegionNeck                                                    0.759
## BodyPartRegionNon-Standard Code                                      -0.218
## BodyPartRegionTrunk                                                   0.922
## BodyPartRegionUpper Extremities                                       0.974
## BodyPartAnkle                                                        -0.204
## BodyPartArtificial Appliance                                          0.033
## BodyPartBody Systems and Multiple Body Systems                       -0.868
## BodyPartButtocks                                                     -0.387
## BodyPartChest                                                         0.047
## BodyPartDisc-Trunk                                                   -0.145
## BodyPartEar(S)                                                        0.880
## BodyPartElbow                                                         0.251
## BodyPartEyes                                                          1.152
## BodyPartFacial Bones                                                  1.281
## BodyPartFinger(S)                                                    -0.475
## BodyPartFoot                                                         -0.280
## BodyPartGreat Toe                                                    -0.597
## BodyPartHand                                                         -0.042
## BodyPartHeart                                                        -0.204
## BodyPartHip                                                           1.066
## BodyPartInsufficient Info to Properly Identify?Unclassified          -0.088
## BodyPartInternal Organs                                              -0.275
## BodyPartKnee                                                          0.737
## BodyPartLower Arm                                                     0.225
## BodyPartLower Back Area                                               1.277
## BodyPartLower Leg                                                     0.344
## BodyPartLumbar and/or Sacral Vertebrae (Vertebra NOC Trunk)           0.296
## BodyPartLungs                                                        -0.123
## BodyPartMouth                                                         0.748
## BodyPartMultiple Body Parts (Including Body Systems and Body Parts)   0.045
## BodyPartMultiple Head Injury                                          1.134
## BodyPartMultiple Lower Extremities                                    0.852
## BodyPartMultiple Neck Injury                                         -0.136
## BodyPartMultiple Trunk                                                0.406
## BodyPartMultiple Upper Extremities                                    0.710
## BodyPartNo Physical Injury                                               NA
## BodyPartNon-Standard Code                                                NA
## BodyPartNose                                                          0.756
## BodyPartPelvis                                                       -0.392
## BodyPartSacrum And Coccyx                                            -0.646
## BodyPartShoulder(S)                                                   0.977
## BodyPartSkull                                                         0.296
## BodyPartSoft Tissue-Neck                                             -0.204
## BodyPartSpinal Cord-Trunk                                             2.054
## BodyPartTeeth                                                            NA
## BodyPartThumb                                                         0.093
## BodyPartToes                                                         -0.508
## BodyPartTrachea                                                          NA
## BodyPartUpper Arm                                                     0.822
## BodyPartUpper Back Area                                               0.561
## BodyPartUpper Leg                                                        NA
## BodyPartWrist                                                            NA
## AverageWeeklyWage1                                                    3.041
## BillReviewALE                                                         0.742
## Hospital                                                             -0.470
## PhysicianOutpatient                                                  -0.272
## Rx                                                                    0.235
##                                                                     Pr(>|t|)
## (Intercept)                                                          0.69120
## Transaction_Time                                                       1e-13
## Procesing_Time                                                       < 2e-16
## ClaimantAge_at_DOI                                                   0.25241
## GenderMale                                                           0.16878
## GenderNot Available                                                  0.85927
## ClaimantTypeMedical Only                                             < 2e-16
## ClaimantTypeReport Only                                              < 2e-16
## InjuryNatureAsbestosis                                               0.56821
## InjuryNatureBurn                                                     0.70573
## InjuryNatureCarpal Tunnel Syndrome                                   0.47858
## InjuryNatureConcussion                                               0.00584
## InjuryNatureContagious Disease                                       0.35446
## InjuryNatureContusion                                                0.11561
## InjuryNatureCrushing                                                 0.40004
## InjuryNatureDermatitis                                               0.16383
## InjuryNatureDislocation                                              0.70552
## InjuryNatureDust Disease, NOC                                        0.67299
## InjuryNatureElectric Shock                                           0.77980
## InjuryNatureForeign Body                                             0.40790
## InjuryNatureFracture                                                 0.07615
## InjuryNatureHearing Loss Or Impairment                               0.68550
## InjuryNatureHeat Prostration                                         0.93921
## InjuryNatureHernia                                                   0.82410
## InjuryNatureInfection                                                0.93347
## InjuryNatureInflammation                                             0.55664
## InjuryNatureLaceration                                               0.08051
## InjuryNatureLoss of Hearing                                          0.42651
## InjuryNatureMental Stress                                            0.15920
## InjuryNatureMultiple Physical Injuries Only                          0.25880
## InjuryNatureMyocardial Infarction                                    0.66480
## InjuryNatureNo Physical Injury                                       0.70989
## InjuryNatureNon-Standard Code                                        0.85518
## InjuryNaturePoisoning?Chemical (Other Than Metals)                   0.64883
## InjuryNaturePuncture                                                 0.05447
## InjuryNatureRespiratory Disorders                                    0.56400
## InjuryNatureRupture                                                  0.13721
## InjuryNatureSeverance                                                0.88979
## InjuryNatureSprain                                                   0.56006
## InjuryNatureStrain                                                   0.05582
## InjuryNatureSyncope                                                  0.97470
## BodyPartRegionLower Extremities                                      0.31598
## BodyPartRegionMultiple Body Parts                                    0.30172
## BodyPartRegionNeck                                                   0.44784
## BodyPartRegionNon-Standard Code                                      0.82732
## BodyPartRegionTrunk                                                  0.35685
## BodyPartRegionUpper Extremities                                      0.33006
## BodyPartAnkle                                                        0.83855
## BodyPartArtificial Appliance                                         0.97400
## BodyPartBody Systems and Multiple Body Systems                       0.38548
## BodyPartButtocks                                                     0.69891
## BodyPartChest                                                        0.96228
## BodyPartDisc-Trunk                                                   0.88454
## BodyPartEar(S)                                                       0.37908
## BodyPartElbow                                                        0.80164
## BodyPartEyes                                                         0.24936
## BodyPartFacial Bones                                                 0.20028
## BodyPartFinger(S)                                                    0.63467
## BodyPartFoot                                                         0.77982
## BodyPartGreat Toe                                                    0.55037
## BodyPartHand                                                         0.96673
## BodyPartHeart                                                        0.83812
## BodyPartHip                                                          0.28662
## BodyPartInsufficient Info to Properly Identify?Unclassified          0.92952
## BodyPartInternal Organs                                              0.78320
## BodyPartKnee                                                         0.46105
## BodyPartLower Arm                                                    0.82210
## BodyPartLower Back Area                                              0.20169
## BodyPartLower Leg                                                    0.73072
## BodyPartLumbar and/or Sacral Vertebrae (Vertebra NOC Trunk)          0.76716
## BodyPartLungs                                                        0.90210
## BodyPartMouth                                                        0.45422
## BodyPartMultiple Body Parts (Including Body Systems and Body Parts)  0.96399
## BodyPartMultiple Head Injury                                         0.25706
## BodyPartMultiple Lower Extremities                                   0.39427
## BodyPartMultiple Neck Injury                                         0.89165
## BodyPartMultiple Trunk                                               0.68506
## BodyPartMultiple Upper Extremities                                   0.47804
## BodyPartNo Physical Injury                                                NA
## BodyPartNon-Standard Code                                                 NA
## BodyPartNose                                                         0.44994
## BodyPartPelvis                                                       0.69472
## BodyPartSacrum And Coccyx                                            0.51819
## BodyPartShoulder(S)                                                  0.32879
## BodyPartSkull                                                        0.76737
## BodyPartSoft Tissue-Neck                                             0.83810
## BodyPartSpinal Cord-Trunk                                            0.04002
## BodyPartTeeth                                                             NA
## BodyPartThumb                                                        0.92624
## BodyPartToes                                                         0.61126
## BodyPartTrachea                                                           NA
## BodyPartUpper Arm                                                    0.41117
## BodyPartUpper Back Area                                              0.57512
## BodyPartUpper Leg                                                         NA
## BodyPartWrist                                                             NA
## AverageWeeklyWage1                                                   0.00238
## BillReviewALE                                                        0.45805
## Hospital                                                             0.63814
## PhysicianOutpatient                                                  0.78527
## Rx                                                                   0.81392
##                                                                        
## (Intercept)                                                            
## Transaction_Time                                                    ***
## Procesing_Time                                                      ***
## ClaimantAge_at_DOI                                                     
## GenderMale                                                             
## GenderNot Available                                                    
## ClaimantTypeMedical Only                                            ***
## ClaimantTypeReport Only                                             ***
## InjuryNatureAsbestosis                                                 
## InjuryNatureBurn                                                       
## InjuryNatureCarpal Tunnel Syndrome                                     
## InjuryNatureConcussion                                              ** 
## InjuryNatureContagious Disease                                         
## InjuryNatureContusion                                                  
## InjuryNatureCrushing                                                   
## InjuryNatureDermatitis                                                 
## InjuryNatureDislocation                                                
## InjuryNatureDust Disease, NOC                                          
## InjuryNatureElectric Shock                                             
## InjuryNatureForeign Body                                               
## InjuryNatureFracture                                                .  
## InjuryNatureHearing Loss Or Impairment                                 
## InjuryNatureHeat Prostration                                           
## InjuryNatureHernia                                                     
## InjuryNatureInfection                                                  
## InjuryNatureInflammation                                               
## InjuryNatureLaceration                                              .  
## InjuryNatureLoss of Hearing                                            
## InjuryNatureMental Stress                                              
## InjuryNatureMultiple Physical Injuries Only                            
## InjuryNatureMyocardial Infarction                                      
## InjuryNatureNo Physical Injury                                         
## InjuryNatureNon-Standard Code                                          
## InjuryNaturePoisoning?Chemical (Other Than Metals)                     
## InjuryNaturePuncture                                                .  
## InjuryNatureRespiratory Disorders                                      
## InjuryNatureRupture                                                    
## InjuryNatureSeverance                                                  
## InjuryNatureSprain                                                     
## InjuryNatureStrain                                                  .  
## InjuryNatureSyncope                                                    
## BodyPartRegionLower Extremities                                        
## BodyPartRegionMultiple Body Parts                                      
## BodyPartRegionNeck                                                     
## BodyPartRegionNon-Standard Code                                        
## BodyPartRegionTrunk                                                    
## BodyPartRegionUpper Extremities                                        
## BodyPartAnkle                                                          
## BodyPartArtificial Appliance                                           
## BodyPartBody Systems and Multiple Body Systems                         
## BodyPartButtocks                                                       
## BodyPartChest                                                          
## BodyPartDisc-Trunk                                                     
## BodyPartEar(S)                                                         
## BodyPartElbow                                                          
## BodyPartEyes                                                           
## BodyPartFacial Bones                                                   
## BodyPartFinger(S)                                                      
## BodyPartFoot                                                           
## BodyPartGreat Toe                                                      
## BodyPartHand                                                           
## BodyPartHeart                                                          
## BodyPartHip                                                            
## BodyPartInsufficient Info to Properly Identify?Unclassified            
## BodyPartInternal Organs                                                
## BodyPartKnee                                                           
## BodyPartLower Arm                                                      
## BodyPartLower Back Area                                                
## BodyPartLower Leg                                                      
## BodyPartLumbar and/or Sacral Vertebrae (Vertebra NOC Trunk)            
## BodyPartLungs                                                          
## BodyPartMouth                                                          
## BodyPartMultiple Body Parts (Including Body Systems and Body Parts)    
## BodyPartMultiple Head Injury                                           
## BodyPartMultiple Lower Extremities                                     
## BodyPartMultiple Neck Injury                                           
## BodyPartMultiple Trunk                                                 
## BodyPartMultiple Upper Extremities                                     
## BodyPartNo Physical Injury                                             
## BodyPartNon-Standard Code                                              
## BodyPartNose                                                           
## BodyPartPelvis                                                         
## BodyPartSacrum And Coccyx                                              
## BodyPartShoulder(S)                                                    
## BodyPartSkull                                                          
## BodyPartSoft Tissue-Neck                                               
## BodyPartSpinal Cord-Trunk                                           *  
## BodyPartTeeth                                                          
## BodyPartThumb                                                          
## BodyPartToes                                                           
## BodyPartTrachea                                                        
## BodyPartUpper Arm                                                      
## BodyPartUpper Back Area                                                
## BodyPartUpper Leg                                                      
## BodyPartWrist                                                          
## AverageWeeklyWage1                                                  ** 
## BillReviewALE                                                          
## Hospital                                                               
## PhysicianOutpatient                                                    
## Rx                                                                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 23580 on 3115 degrees of freedom
##   (28410 observations deleted due to missingness)
## Multiple R-squared:  0.2139, Adjusted R-squared:  0.1905 
## F-statistic: 9.116 on 93 and 3115 DF,  p-value: < 2.2e-16

Evaluar regresion

# Evaluar, y en caso necesario, ajustar la regresion 
regresion <- lm(TotalIncurredCost ~ Transaction_Time + Procesing_Time  + ClaimantType + InjuryNature, data=base_de_datos)

summary(regresion)
## 
## Call:
## lm(formula = TotalIncurredCost ~ Transaction_Time + Procesing_Time + 
##     ClaimantType + InjuryNature, data = base_de_datos)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -225507   -4091     176    2875 1367364 
## 
## Coefficients:
##                                                                           Estimate
## (Intercept)                                                              2.057e+03
## Transaction_Time                                                         3.676e+00
## Procesing_Time                                                           2.658e+01
## ClaimantTypeMedical Only                                                -2.220e+04
## ClaimantTypeReport Only                                                 -2.095e+04
## InjuryNatureAll Other Specific Injuries, Noc                             1.354e+04
## InjuryNatureAmputation                                                   1.955e+04
## InjuryNatureAngina Pectoris                                             -2.714e+03
## InjuryNatureAsbestosis                                                   1.967e+04
## InjuryNatureAsphyxiation                                                 1.260e+04
## InjuryNatureBlack Lung                                                   1.603e+04
## InjuryNatureBurn                                                         1.958e+04
## InjuryNatureCancer                                                       3.777e+04
## InjuryNatureCarpal Tunnel Syndrome                                       9.772e+03
## InjuryNatureConcussion                                                   2.456e+04
## InjuryNatureContagious Disease                                           1.107e+04
## InjuryNatureContusion                                                    1.630e+04
## InjuryNatureCrushing                                                     1.937e+04
## InjuryNatureDermatitis                                                   1.557e+04
## InjuryNatureDislocation                                                  1.616e+04
## InjuryNatureDust Disease, NOC                                            1.834e+04
## InjuryNatureElectric Shock                                               1.267e+04
## InjuryNatureForeign Body                                                 1.495e+04
## InjuryNatureFracture                                                     1.832e+04
## InjuryNatureFreezing                                                     1.189e+04
## InjuryNatureHearing Loss Or Impairment                                   6.539e+03
## InjuryNatureHeat Prostration                                             1.369e+04
## InjuryNatureHernia                                                       7.470e+03
## InjuryNatureInfection                                                    1.249e+04
## InjuryNatureInflammation                                                 1.713e+04
## InjuryNatureLaceration                                                   1.577e+04
## InjuryNatureLoss of Hearing                                              1.008e+04
## InjuryNatureMental Disorder                                              1.915e+04
## InjuryNatureMental Stress                                                5.976e+03
## InjuryNatureMultiple Injuries Including Both Physical and Psychological  2.673e+04
## InjuryNatureMultiple Physical Injuries Only                              1.875e+04
## InjuryNatureMyocardial Infarction                                        1.846e+04
## InjuryNatureNo Physical Injury                                           1.456e+04
## InjuryNatureNon-Standard Code                                            2.567e+03
## InjuryNatureNot Available                                                1.873e+04
## InjuryNaturePoisoning?Chemical (Other Than Metals)                       1.325e+04
## InjuryNaturePoisoning?General (NOT OD or Cumulative Injury)              1.587e+04
## InjuryNaturePuncture                                                     1.571e+04
## InjuryNatureRadiation                                                    1.735e+04
## InjuryNatureRespiratory Disorders                                        1.494e+04
## InjuryNatureRupture                                                      2.114e+04
## InjuryNatureSeverance                                                    4.393e+04
## InjuryNatureSprain                                                       1.698e+04
## InjuryNatureStrain                                                       1.657e+04
## InjuryNatureSyncope                                                      1.751e+04
## InjuryNatureVascular                                                    -3.000e+03
## InjuryNatureVDT-Related Disease                                         -7.758e+03
## InjuryNatureVision Loss                                                  1.852e+04
##                                                                         Std. Error
## (Intercept)                                                              2.533e+04
## Transaction_Time                                                         1.594e-01
## Procesing_Time                                                           7.832e-01
## ClaimantTypeMedical Only                                                 3.710e+02
## ClaimantTypeReport Only                                                  8.217e+02
## InjuryNatureAll Other Specific Injuries, Noc                             2.534e+04
## InjuryNatureAmputation                                                   2.707e+04
## InjuryNatureAngina Pectoris                                              3.102e+04
## InjuryNatureAsbestosis                                                   2.588e+04
## InjuryNatureAsphyxiation                                                 3.582e+04
## InjuryNatureBlack Lung                                                   3.582e+04
## InjuryNatureBurn                                                         2.537e+04
## InjuryNatureCancer                                                       2.832e+04
## InjuryNatureCarpal Tunnel Syndrome                                       2.538e+04
## InjuryNatureConcussion                                                   2.546e+04
## InjuryNatureContagious Disease                                           2.551e+04
## InjuryNatureContusion                                                    2.533e+04
## InjuryNatureCrushing                                                     2.541e+04
## InjuryNatureDermatitis                                                   2.536e+04
## InjuryNatureDislocation                                                  2.541e+04
## InjuryNatureDust Disease, NOC                                            2.925e+04
## InjuryNatureElectric Shock                                               2.568e+04
## InjuryNatureForeign Body                                                 2.534e+04
## InjuryNatureFracture                                                     2.534e+04
## InjuryNatureFreezing                                                     2.925e+04
## InjuryNatureHearing Loss Or Impairment                                   2.599e+04
## InjuryNatureHeat Prostration                                             2.563e+04
## InjuryNatureHernia                                                       2.553e+04
## InjuryNatureInfection                                                    2.545e+04
## InjuryNatureInflammation                                                 2.537e+04
## InjuryNatureLaceration                                                   2.533e+04
## InjuryNatureLoss of Hearing                                              2.611e+04
## InjuryNatureMental Disorder                                              2.775e+04
## InjuryNatureMental Stress                                                2.561e+04
## InjuryNatureMultiple Injuries Including Both Physical and Psychological  2.616e+04
## InjuryNatureMultiple Physical Injuries Only                              2.535e+04
## InjuryNatureMyocardial Infarction                                        2.628e+04
## InjuryNatureNo Physical Injury                                           2.537e+04
## InjuryNatureNon-Standard Code                                            2.535e+04
## InjuryNatureNot Available                                                3.583e+04
## InjuryNaturePoisoning?Chemical (Other Than Metals)                       2.555e+04
## InjuryNaturePoisoning?General (NOT OD or Cumulative Injury)              2.611e+04
## InjuryNaturePuncture                                                     2.534e+04
## InjuryNatureRadiation                                                    2.622e+04
## InjuryNatureRespiratory Disorders                                        2.538e+04
## InjuryNatureRupture                                                      2.569e+04
## InjuryNatureSeverance                                                    2.636e+04
## InjuryNatureSprain                                                       2.533e+04
## InjuryNatureStrain                                                       2.533e+04
## InjuryNatureSyncope                                                      2.559e+04
## InjuryNatureVascular                                                     3.582e+04
## InjuryNatureVDT-Related Disease                                          3.582e+04
## InjuryNatureVision Loss                                                  2.636e+04
##                                                                         t value
## (Intercept)                                                               0.081
## Transaction_Time                                                         23.052
## Procesing_Time                                                           33.943
## ClaimantTypeMedical Only                                                -59.831
## ClaimantTypeReport Only                                                 -25.495
## InjuryNatureAll Other Specific Injuries, Noc                              0.534
## InjuryNatureAmputation                                                    0.722
## InjuryNatureAngina Pectoris                                              -0.087
## InjuryNatureAsbestosis                                                    0.760
## InjuryNatureAsphyxiation                                                  0.352
## InjuryNatureBlack Lung                                                    0.448
## InjuryNatureBurn                                                          0.772
## InjuryNatureCancer                                                        1.334
## InjuryNatureCarpal Tunnel Syndrome                                        0.385
## InjuryNatureConcussion                                                    0.965
## InjuryNatureContagious Disease                                            0.434
## InjuryNatureContusion                                                     0.643
## InjuryNatureCrushing                                                      0.762
## InjuryNatureDermatitis                                                    0.614
## InjuryNatureDislocation                                                   0.636
## InjuryNatureDust Disease, NOC                                             0.627
## InjuryNatureElectric Shock                                                0.493
## InjuryNatureForeign Body                                                  0.590
## InjuryNatureFracture                                                      0.723
## InjuryNatureFreezing                                                      0.407
## InjuryNatureHearing Loss Or Impairment                                    0.252
## InjuryNatureHeat Prostration                                              0.534
## InjuryNatureHernia                                                        0.293
## InjuryNatureInfection                                                     0.491
## InjuryNatureInflammation                                                  0.675
## InjuryNatureLaceration                                                    0.622
## InjuryNatureLoss of Hearing                                               0.386
## InjuryNatureMental Disorder                                               0.690
## InjuryNatureMental Stress                                                 0.233
## InjuryNatureMultiple Injuries Including Both Physical and Psychological   1.022
## InjuryNatureMultiple Physical Injuries Only                               0.740
## InjuryNatureMyocardial Infarction                                         0.702
## InjuryNatureNo Physical Injury                                            0.574
## InjuryNatureNon-Standard Code                                             0.101
## InjuryNatureNot Available                                                 0.523
## InjuryNaturePoisoning?Chemical (Other Than Metals)                        0.519
## InjuryNaturePoisoning?General (NOT OD or Cumulative Injury)               0.608
## InjuryNaturePuncture                                                      0.620
## InjuryNatureRadiation                                                     0.662
## InjuryNatureRespiratory Disorders                                         0.589
## InjuryNatureRupture                                                       0.823
## InjuryNatureSeverance                                                     1.666
## InjuryNatureSprain                                                        0.670
## InjuryNatureStrain                                                        0.654
## InjuryNatureSyncope                                                       0.684
## InjuryNatureVascular                                                     -0.084
## InjuryNatureVDT-Related Disease                                          -0.217
## InjuryNatureVision Loss                                                   0.703
##                                                                         Pr(>|t|)
## (Intercept)                                                               0.9353
## Transaction_Time                                                          <2e-16
## Procesing_Time                                                            <2e-16
## ClaimantTypeMedical Only                                                  <2e-16
## ClaimantTypeReport Only                                                   <2e-16
## InjuryNatureAll Other Specific Injuries, Noc                              0.5932
## InjuryNatureAmputation                                                    0.4703
## InjuryNatureAngina Pectoris                                               0.9303
## InjuryNatureAsbestosis                                                    0.4471
## InjuryNatureAsphyxiation                                                  0.7250
## InjuryNatureBlack Lung                                                    0.6545
## InjuryNatureBurn                                                          0.4402
## InjuryNatureCancer                                                        0.1822
## InjuryNatureCarpal Tunnel Syndrome                                        0.7003
## InjuryNatureConcussion                                                    0.3348
## InjuryNatureContagious Disease                                            0.6643
## InjuryNatureContusion                                                     0.5199
## InjuryNatureCrushing                                                      0.4459
## InjuryNatureDermatitis                                                    0.5391
## InjuryNatureDislocation                                                   0.5248
## InjuryNatureDust Disease, NOC                                             0.5305
## InjuryNatureElectric Shock                                                0.6218
## InjuryNatureForeign Body                                                  0.5552
## InjuryNatureFracture                                                      0.4696
## InjuryNatureFreezing                                                      0.6844
## InjuryNatureHearing Loss Or Impairment                                    0.8013
## InjuryNatureHeat Prostration                                              0.5932
## InjuryNatureHernia                                                        0.7698
## InjuryNatureInfection                                                     0.6236
## InjuryNatureInflammation                                                  0.4995
## InjuryNatureLaceration                                                    0.5337
## InjuryNatureLoss of Hearing                                               0.6993
## InjuryNatureMental Disorder                                               0.4902
## InjuryNatureMental Stress                                                 0.8155
## InjuryNatureMultiple Injuries Including Both Physical and Psychological   0.3069
## InjuryNatureMultiple Physical Injuries Only                               0.4595
## InjuryNatureMyocardial Infarction                                         0.4825
## InjuryNatureNo Physical Injury                                            0.5660
## InjuryNatureNon-Standard Code                                             0.9193
## InjuryNatureNot Available                                                 0.6010
## InjuryNaturePoisoning?Chemical (Other Than Metals)                        0.6040
## InjuryNaturePoisoning?General (NOT OD or Cumulative Injury)               0.5434
## InjuryNaturePuncture                                                      0.5351
## InjuryNatureRadiation                                                     0.5080
## InjuryNatureRespiratory Disorders                                         0.5559
## InjuryNatureRupture                                                       0.4106
## InjuryNatureSeverance                                                     0.0956
## InjuryNatureSprain                                                        0.5027
## InjuryNatureStrain                                                        0.5129
## InjuryNatureSyncope                                                       0.4938
## InjuryNatureVascular                                                      0.9332
## InjuryNatureVDT-Related Disease                                           0.8285
## InjuryNatureVision Loss                                                   0.4823
##                                                                            
## (Intercept)                                                                
## Transaction_Time                                                        ***
## Procesing_Time                                                          ***
## ClaimantTypeMedical Only                                                ***
## ClaimantTypeReport Only                                                 ***
## InjuryNatureAll Other Specific Injuries, Noc                               
## InjuryNatureAmputation                                                     
## InjuryNatureAngina Pectoris                                                
## InjuryNatureAsbestosis                                                     
## InjuryNatureAsphyxiation                                                   
## InjuryNatureBlack Lung                                                     
## InjuryNatureBurn                                                           
## InjuryNatureCancer                                                         
## InjuryNatureCarpal Tunnel Syndrome                                         
## InjuryNatureConcussion                                                     
## InjuryNatureContagious Disease                                             
## InjuryNatureContusion                                                      
## InjuryNatureCrushing                                                       
## InjuryNatureDermatitis                                                     
## InjuryNatureDislocation                                                    
## InjuryNatureDust Disease, NOC                                              
## InjuryNatureElectric Shock                                                 
## InjuryNatureForeign Body                                                   
## InjuryNatureFracture                                                       
## InjuryNatureFreezing                                                       
## InjuryNatureHearing Loss Or Impairment                                     
## InjuryNatureHeat Prostration                                               
## InjuryNatureHernia                                                         
## InjuryNatureInfection                                                      
## InjuryNatureInflammation                                                   
## InjuryNatureLaceration                                                     
## InjuryNatureLoss of Hearing                                                
## InjuryNatureMental Disorder                                                
## InjuryNatureMental Stress                                                  
## InjuryNatureMultiple Injuries Including Both Physical and Psychological    
## InjuryNatureMultiple Physical Injuries Only                                
## InjuryNatureMyocardial Infarction                                          
## InjuryNatureNo Physical Injury                                             
## InjuryNatureNon-Standard Code                                              
## InjuryNatureNot Available                                                  
## InjuryNaturePoisoning?Chemical (Other Than Metals)                         
## InjuryNaturePoisoning?General (NOT OD or Cumulative Injury)                
## InjuryNaturePuncture                                                       
## InjuryNatureRadiation                                                      
## InjuryNatureRespiratory Disorders                                          
## InjuryNatureRupture                                                        
## InjuryNatureSeverance                                                   .  
## InjuryNatureSprain                                                         
## InjuryNatureStrain                                                         
## InjuryNatureSyncope                                                        
## InjuryNatureVascular                                                       
## InjuryNatureVDT-Related Disease                                            
## InjuryNatureVision Loss                                                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25330 on 30952 degrees of freedom
##   (614 observations deleted due to missingness)
## Multiple R-squared:  0.1757, Adjusted R-squared:  0.1744 
## F-statistic: 126.9 on 52 and 30952 DF,  p-value: < 2.2e-16

``` # Conclusiones El modelo de regresión lineal explica el % del comportamiento de las rentas de bicicletas. Este modelo se puede mejorar agregando otras variables que impacta el negocio.

LS0tCnRpdGxlOiAiUmVncmVzaW9uIExpbmVhbCAtIFNlZ3Vyb3MgIgphdXRob3I6ICJQZWRybyBWaWxsYW51ZXZhIEZlcm7DoW5kZXogLSBBMDExOTc5OTMiCmRhdGU6ICIyMDI0LTA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