knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 3.6.3
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2 v purrr 0.3.4
## v tibble 3.0.3 v dplyr 1.0.1
## v tidyr 1.1.2 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.0
## Warning: package 'ggplot2' was built under R version 3.6.3
## Warning: package 'tibble' was built under R version 3.6.3
## Warning: package 'tidyr' was built under R version 3.6.3
## Warning: package 'readr' was built under R version 3.6.3
## Warning: package 'purrr' was built under R version 3.6.3
## Warning: package 'dplyr' was built under R version 3.6.3
## Warning: package 'forcats' was built under R version 3.6.3
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(tidyr)
library(dplyr)
library(stringr)
library(ggplot2)
#Ask R for my working directory
getwd()
## [1] "C:/Users/12403/Downloads/archive (5)"
#Set Working Directory to location of files to be used
setwd("C:/Users/12403/Downloads/archive (5)/")
#Import datasets in csv format
df0 <- read.csv("DataAnalyst.csv")
#Created and imported 3 line csv file to multiply millions/billions against for maximum_revenue variable:
mill <- read.csv("mill.csv")
#Use mutate and stringr/regex to take ranges of salaries, firm sizes, and revenue in factor type, and turn into numeric integers that can be used for analysis:
salaries_df0 <- df0 %>% mutate(min_salary = str_extract(Salary.Estimate, pattern = "[:digit:]{2}"),
min_salary = as.numeric(min_salary)*1000,
max_salary = str_extract(Salary.Estimate, pattern="([:digit:]{2})(?=K \\(G)"),
max_salary = as.numeric(max_salary)*1000,
average_salary = (min_salary + max_salary)/2,
min_size = str_extract(Size, pattern = "[:digit:]{1,5}"),
min_size = as.numeric(min_size),
max_size = str_extract(Size, pattern = "([:digit:]{1,7})(?= e)"),
max_size = as.numeric(max_size),
min_revenue = str_extract(Revenue, pattern = "[:digit:]{1,5}"),
min_revenue = as.numeric(min_revenue),
max_revenue = str_extract(Revenue, pattern = "([:digit:]{1,5})(?= [:lower:]{4,10} \\(U)"),
max_revenue = as.numeric(max_revenue),
rev_mult = str_extract(Revenue, pattern = "[:lower:]{4,10}")
)
#Remove -1 values from particular columns and replace with NA:
salaries_df0$Founded[salaries_df0$Founded == (-1)] <- NA
salaries_df0$Industry[salaries_df0$Industry == (-1)] <- NA
salaries_df0$Sector[salaries_df0$Sector == (-1)] <- NA
salaries_df0$Competitors[salaries_df0$Competitors == (-1)] <- NA
salaries_df0$rev_mult[salaries_df0$rev_mult == "nkown"] <- NA
#Create vector of columns to remove NA rows from:
rows_2_remove <- c(12,13,14,17,18,19,20,21,22,23,24)
#Drop NA values from variables we will use for analysis:
salaries_df1 <- drop_na(salaries_df0, rows_2_remove)
## Note: Using an external vector in selections is ambiguous.
## i Use `all_of(rows_2_remove)` instead of `rows_2_remove` to silence this message.
## i See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.
salaries_df1$rev_mult[salaries_df1$rev_mult == "than"] <- "< 1 million"
#Check the levels in Industry and Sector variables:
levels(salaries_df1$Industry)
## [1] "-1"
## [2] "Accounting"
## [3] "Advertising & Marketing"
## [4] "Aerospace & Defense"
## [5] "Architectural & Engineering Services"
## [6] "Audiovisual"
## [7] "Automotive Parts & Accessories Stores"
## [8] "Banks & Credit Unions"
## [9] "Beauty & Personal Accessories Stores"
## [10] "Biotech & Pharmaceuticals"
## [11] "Brokerage Services"
## [12] "Building & Personnel Services"
## [13] "Cable, Internet & Telephone Providers"
## [14] "Casual Restaurants"
## [15] "Catering & Food Service Contractors"
## [16] "Chemical Manufacturing"
## [17] "Colleges & Universities"
## [18] "Commercial Equipment Repair & Maintenance"
## [19] "Computer Hardware & Software"
## [20] "Construction"
## [21] "Consulting"
## [22] "Consumer Electronics & Appliances Stores"
## [23] "Consumer Product Rental"
## [24] "Consumer Products Manufacturing"
## [25] "Convenience Stores & Truck Stops"
## [26] "Department, Clothing, & Shoe Stores"
## [27] "Drug & Health Stores"
## [28] "Education Training Services"
## [29] "Electrical & Electronic Manufacturing"
## [30] "Energy"
## [31] "Enterprise Software & Network Solutions"
## [32] "Express Delivery Services"
## [33] "Federal Agencies"
## [34] "Financial Analytics & Research"
## [35] "Financial Transaction Processing"
## [36] "Food & Beverage Manufacturing"
## [37] "Food & Beverage Stores"
## [38] "Gambling"
## [39] "Gas Stations"
## [40] "General Merchandise & Superstores"
## [41] "General Repair & Maintenance"
## [42] "Grocery Stores & Supermarkets"
## [43] "Health Care Products Manufacturing"
## [44] "Health Care Services & Hospitals"
## [45] "Health Fundraising Organizations"
## [46] "Health, Beauty, & Fitness"
## [47] "Home Centers & Hardware Stores"
## [48] "Hotels, Motels, & Resorts"
## [49] "Industrial Manufacturing"
## [50] "Insurance Agencies & Brokerages"
## [51] "Insurance Carriers"
## [52] "Internet"
## [53] "Investment Banking & Asset Management"
## [54] "IT Services"
## [55] "K-12 Education"
## [56] "Legal"
## [57] "Lending"
## [58] "Logistics & Supply Chain"
## [59] "Membership Organizations"
## [60] "Metals Brokers"
## [61] "Miscellaneous Manufacturing"
## [62] "Motion Picture Production & Distribution"
## [63] "Municipal Governments"
## [64] "News Outlet"
## [65] "Oil & Gas Services"
## [66] "Other Retail Stores"
## [67] "Pet & Pet Supplies Stores"
## [68] "Preschool & Child Care"
## [69] "Publishing"
## [70] "Real Estate"
## [71] "Research & Development"
## [72] "Security Services"
## [73] "Social Assistance"
## [74] "Sporting Goods Stores"
## [75] "Sports & Recreation"
## [76] "Staffing & Outsourcing"
## [77] "State & Regional Agencies"
## [78] "Stock Exchanges"
## [79] "Telecommunications Services"
## [80] "Transportation Equipment Manufacturing"
## [81] "Transportation Management"
## [82] "Truck Rental & Leasing"
## [83] "Trucking"
## [84] "TV Broadcast & Cable Networks"
## [85] "Utilities"
## [86] "Vehicle Dealers"
## [87] "Venture Capital & Private Equity"
## [88] "Video Games"
## [89] "Wholesale"
levels(salaries_df1$Sector)
## [1] "-1" "Accounting & Legal"
## [3] "Aerospace & Defense" "Arts, Entertainment & Recreation"
## [5] "Biotech & Pharmaceuticals" "Business Services"
## [7] "Construction, Repair & Maintenance" "Consumer Services"
## [9] "Education" "Finance"
## [11] "Government" "Health Care"
## [13] "Information Technology" "Insurance"
## [15] "Manufacturing" "Media"
## [17] "Mining & Metals" "Non-Profit"
## [19] "Oil, Gas, Energy & Utilities" "Real Estate"
## [21] "Restaurants, Bars & Food Services" "Retail"
## [23] "Telecommunications" "Transportation & Logistics"
## [25] "Travel & Tourism"
#Previous code to remove NA for Industry and Sector Variables did not work, second attempt with case_when approach:
salaries_df1 <- salaries_df1 %>% mutate(Industry = case_when(Industry != "-1" ~ as.character(Industry), TRUE ~ NA_character_),
Sector = case_when(Sector != "-1" ~ as.character(Sector), TRUE ~ NA_character_)
)
#Change variable type back to Factor:
salaries_df1 <- salaries_df1 %>% mutate(Industry = as.factor(Industry),
Sector = as.factor(Sector)
)
#Merge csv files by multiplier for maximum_revenue calculation
salaries_df2 <- merge(salaries_df1, mill, by.x = "rev_mult", by.y = "rev_mult")
#Multiply max_revenue by 1,000,000 or 1,000,000,000 from created csv file to obtain maximum_revenue figures:
salaries_df2 <- salaries_df2 %>% mutate(maximum_revenue = max_revenue * as.numeric(addy))
#Save new csv file locally:
write.csv(salaries_df2, file = "data_analyst_salaries.csv")
#Recheck the levels in Industry and Sector variables:
levels(salaries_df2$Industry)
## [1] "Accounting"
## [2] "Advertising & Marketing"
## [3] "Aerospace & Defense"
## [4] "Architectural & Engineering Services"
## [5] "Automotive Parts & Accessories Stores"
## [6] "Banks & Credit Unions"
## [7] "Biotech & Pharmaceuticals"
## [8] "Brokerage Services"
## [9] "Building & Personnel Services"
## [10] "Cable, Internet & Telephone Providers"
## [11] "Casual Restaurants"
## [12] "Catering & Food Service Contractors"
## [13] "Colleges & Universities"
## [14] "Commercial Equipment Repair & Maintenance"
## [15] "Computer Hardware & Software"
## [16] "Construction"
## [17] "Consulting"
## [18] "Consumer Products Manufacturing"
## [19] "Convenience Stores & Truck Stops"
## [20] "Department, Clothing, & Shoe Stores"
## [21] "Education Training Services"
## [22] "Electrical & Electronic Manufacturing"
## [23] "Energy"
## [24] "Enterprise Software & Network Solutions"
## [25] "Federal Agencies"
## [26] "Financial Analytics & Research"
## [27] "Financial Transaction Processing"
## [28] "Food & Beverage Manufacturing"
## [29] "Gambling"
## [30] "General Repair & Maintenance"
## [31] "Health Care Products Manufacturing"
## [32] "Health Care Services & Hospitals"
## [33] "Health Fundraising Organizations"
## [34] "Health, Beauty, & Fitness"
## [35] "Industrial Manufacturing"
## [36] "Insurance Agencies & Brokerages"
## [37] "Insurance Carriers"
## [38] "Internet"
## [39] "Investment Banking & Asset Management"
## [40] "IT Services"
## [41] "K-12 Education"
## [42] "Legal"
## [43] "Lending"
## [44] "Logistics & Supply Chain"
## [45] "Membership Organizations"
## [46] "Metals Brokers"
## [47] "Municipal Governments"
## [48] "News Outlet"
## [49] "Oil & Gas Services"
## [50] "Other Retail Stores"
## [51] "Preschool & Child Care"
## [52] "Publishing"
## [53] "Real Estate"
## [54] "Research & Development"
## [55] "Social Assistance"
## [56] "Sporting Goods Stores"
## [57] "Sports & Recreation"
## [58] "Staffing & Outsourcing"
## [59] "State & Regional Agencies"
## [60] "Stock Exchanges"
## [61] "Telecommunications Services"
## [62] "Transportation Management"
## [63] "TV Broadcast & Cable Networks"
## [64] "Vehicle Dealers"
## [65] "Venture Capital & Private Equity"
## [66] "Video Games"
## [67] "Wholesale"
levels(salaries_df2$Sector)
## [1] "Accounting & Legal" "Aerospace & Defense"
## [3] "Arts, Entertainment & Recreation" "Biotech & Pharmaceuticals"
## [5] "Business Services" "Construction, Repair & Maintenance"
## [7] "Consumer Services" "Education"
## [9] "Finance" "Government"
## [11] "Health Care" "Information Technology"
## [13] "Insurance" "Manufacturing"
## [15] "Media" "Mining & Metals"
## [17] "Non-Profit" "Oil, Gas, Energy & Utilities"
## [19] "Real Estate" "Restaurants, Bars & Food Services"
## [21] "Retail" "Telecommunications"
## [23] "Transportation & Logistics"
#Create boxplot to display Average Salary per Sector
p1 <- salaries_df2 %>% ggplot(aes(x = Sector, y = average_salary, colour = Sector)) + geom_boxplot(show.legend = FALSE) + theme(axis.text.x = element_text(angle = 90)) + ylab("Average Salary") + ggtitle("Average Salary by Sector")
p1

#Create plot to display Average Salary by Company Size
p2 <- salaries_df2 %>% ggplot(aes(x = max_size, y = average_salary, colour = Sector)) + geom_point() + theme(axis.text.x = element_text(angle = 90), legend.position = "bottom") + xlab("Firm Size") + ylab("Average Salary") + ggtitle("Average Salary by Company Size")
p2

#Create plot to display Maximum Revenue by Founded Year
p3 <- salaries_df2 %>% ggplot(aes(x = Founded, y = maximum_revenue, colour = Sector)) + geom_point() + theme(axis.text.x = element_text(angle = 90), legend.position = "bottom") + ylab("Max Revenue") + ggtitle("Maximum Revenue by Founded Year")
p3
## Warning: Removed 205 rows containing missing values (geom_point).

#Create plot to display Maximum Revenue by Sector
p4 <- salaries_df2 %>% ggplot(aes(x = Sector, y = maximum_revenue, colour = Sector)) + geom_point() + theme(axis.text.x = element_text(angle = 90), legend.position = "bottom") + ylab("Max Revenue") + ggtitle("Maximum Revenue by Sector")
p4

#Begin linear regresions along with Summary and Anova Tables
#Linear Regression: Average Salary explained by Sector
#Close to no explanation for the data, Adjusted R-squared: 0.00464, p-value: 0.2129
lm1 <- lm(average_salary ~ Sector, data = salaries_df2)
summary(lm1)
##
## Call:
## lm(formula = average_salary ~ Sector, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37472 -12600 1400 11900 33900
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 58972.2 2527.9 23.329 < 2e-16
## SectorAerospace & Defense 1638.9 5652.5 0.290 0.77192
## SectorArts, Entertainment & Recreation -10972.2 9114.4 -1.204 0.22892
## SectorBiotech & Pharmaceuticals -8400.8 4777.2 -1.759 0.07895
## SectorBusiness Services -3414.3 2653.3 -1.287 0.19844
## SectorConstruction, Repair & Maintenance -1072.2 5421.7 -0.198 0.84327
## SectorConsumer Services -5329.4 6265.3 -0.851 0.39517
## SectorEducation -2741.5 4907.7 -0.559 0.57655
## SectorFinance -2390.3 3187.7 -0.750 0.45352
## SectorGovernment -13555.6 5055.7 -2.681 0.00745
## SectorHealth Care -4073.9 3207.7 -1.270 0.20434
## SectorInformation Technology -4372.5 2643.1 -1.654 0.09837
## SectorInsurance -8353.2 4164.7 -2.006 0.04514
## SectorManufacturing -722.2 4229.9 -0.171 0.86446
## SectorMedia -2472.2 4907.7 -0.504 0.61455
## SectorMining & Metals 527.8 15376.4 0.034 0.97263
## SectorNon-Profit -2234.1 4164.7 -0.536 0.59176
## SectorOil, Gas, Energy & Utilities -10305.6 5652.5 -1.823 0.06856
## SectorReal Estate 18527.8 11018.7 1.681 0.09296
## SectorRestaurants, Bars & Food Services -4972.2 5928.4 -0.839 0.40182
## SectorRetail -1972.2 6688.1 -0.295 0.76814
## SectorTelecommunications -10400.8 6265.3 -1.660 0.09720
## SectorTransportation & Logistics 5755.1 5225.2 1.101 0.27098
##
## (Intercept) ***
## SectorAerospace & Defense
## SectorArts, Entertainment & Recreation
## SectorBiotech & Pharmaceuticals .
## SectorBusiness Services
## SectorConstruction, Repair & Maintenance
## SectorConsumer Services
## SectorEducation
## SectorFinance
## SectorGovernment **
## SectorHealth Care
## SectorInformation Technology .
## SectorInsurance *
## SectorManufacturing
## SectorMedia
## SectorMining & Metals
## SectorNon-Profit
## SectorOil, Gas, Energy & Utilities .
## SectorReal Estate .
## SectorRestaurants, Bars & Food Services
## SectorRetail
## SectorTelecommunications .
## SectorTransportation & Logistics
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15170 on 1060 degrees of freedom
## Multiple R-squared: 0.02488, Adjusted R-squared: 0.00464
## F-statistic: 1.229 on 22 and 1060 DF, p-value: 0.2129
anova(lm1)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.2293 0.2129
## Residuals 1060 2.4385e+11 230043992
#Linear Regression: Average Salary explained by Sector and Industry Type
#Minimal improvement, still insignificant with Adjusted R-squared: 0.007535, p-value: 0.2369
lm2 <- lm(average_salary ~ Sector + Industry, data = salaries_df2)
summary(lm2)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37394 -12076 1102 11031 36474
##
## Coefficients: (22 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 58893.9 2636.4 22.339
## SectorAerospace & Defense 1717.2 5695.3 0.302
## SectorArts, Entertainment & Recreation -7893.9 11029.0 -0.716
## SectorBiotech & Pharmaceuticals -8322.5 4830.6 -1.723
## SectorBusiness Services -18793.9 7268.1 -2.586
## SectorConstruction, Repair & Maintenance -9143.9 11029.0 -0.829
## SectorConsumer Services -5251.1 6302.3 -0.833
## SectorEducation 5106.1 15372.9 0.332
## SectorFinance 10356.1 8018.4 1.292
## SectorGovernment -25393.9 11029.0 -2.302
## SectorHealth Care -3995.6 3292.2 -1.214
## SectorInformation Technology -3899.8 2800.0 -1.393
## SectorInsurance -8005.1 4437.8 -1.804
## SectorManufacturing -5393.9 8018.4 -0.673
## SectorMedia -6393.9 6302.3 -1.015
## SectorMining & Metals 606.1 15372.9 0.039
## SectorNon-Profit -2218.9 4291.8 -0.517
## SectorOil, Gas, Energy & Utilities -12518.9 8018.4 -1.561
## SectorReal Estate 18606.1 11029.0 1.687
## SectorRestaurants, Bars & Food Services 6856.1 11029.0 0.622
## SectorRetail -18393.9 15372.9 -1.197
## SectorTelecommunications -10493.9 7268.1 -1.444
## SectorTransportation & Logistics -1893.9 11029.0 -0.172
## IndustryAdvertising & Marketing 16237.8 7216.3 2.250
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 22250.0 8295.3 2.682
## IndustryAutomotive Parts & Accessories Stores 24500.0 18548.9 1.321
## IndustryBanks & Credit Unions -12720.6 8416.4 -1.511
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -8750.0 13116.1 -0.667
## IndustryBuilding & Personnel Services -9600.0 16590.7 -0.579
## IndustryCable, Internet & Telephone Providers 600.0 12671.3 0.047
## IndustryCasual Restaurants -17450.0 12671.3 -1.377
## IndustryCatering & Food Service Contractors -6750.0 18548.9 -0.364
## IndustryColleges & Universities -5928.6 16190.8 -0.366
## IndustryCommercial Equipment Repair & Maintenance -6500.0 15145.1 -0.429
## IndustryComputer Hardware & Software -369.2 2064.5 -0.179
## IndustryConstruction 15750.0 12365.9 1.274
## IndustryConsulting 15794.1 6969.5 2.266
## IndustryConsumer Products Manufacturing 7250.0 9274.5 0.782
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -10000.0 21418.4 -0.467
## IndustryEducation Training Services -21166.7 17488.1 -1.210
## IndustryElectrical & Electronic Manufacturing 11500.0 11567.3 0.994
## IndustryEnergy 4125.0 10159.7 0.406
## IndustryEnterprise Software & Network Solutions -1725.9 2546.3 -0.678
## IndustryFederal Agencies 16000.0 12365.9 1.294
## IndustryFinancial Analytics & Research -20250.0 16932.8 -1.196
## IndustryFinancial Transaction Processing -10392.9 9492.7 -1.095
## IndustryFood & Beverage Manufacturing -12000.0 13116.1 -0.915
## IndustryGambling -9000.0 18548.9 -0.485
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 8833.3 11567.3 0.764
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations 1325.0 15519.1 0.085
## IndustryHealth, Beauty, & Fitness NA NA NA
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -1888.9 9444.6 -0.200
## IndustryInsurance Carriers NA NA NA
## IndustryInternet -2967.9 3600.2 -0.824
## IndustryInvestment Banking & Asset Management -16840.9 8232.2 -2.046
## IndustryIT Services NA NA NA
## IndustryK-12 Education 2000.0 18548.9 0.108
## IndustryLegal 939.4 9132.9 0.103
## IndustryLending -10107.1 9492.7 -1.065
## IndustryLogistics & Supply Chain 9444.4 11839.5 0.798
## IndustryMembership Organizations 5275.0 10159.7 0.519
## IndustryMetals Brokers NA NA NA
## IndustryMunicipal Governments 11750.0 13116.1 0.896
## IndustryNews Outlet 34500.0 16190.8 2.131
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 39000.0 21418.4 1.821
## IndustryPreschool & Child Care NA NA NA
## IndustryPublishing -1000.0 10451.1 -0.096
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 11150.0 12671.3 0.880
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores 21000.0 21418.4 0.980
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 15583.3 6853.3 2.274
## IndustryState & Regional Agencies NA NA NA
## IndustryStock Exchanges -4750.0 16932.8 -0.281
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 10250.0 12143.1 0.844
## IndustryVehicle Dealers NA NA NA
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## SectorAerospace & Defense 0.76309
## SectorArts, Entertainment & Recreation 0.47431
## SectorBiotech & Pharmaceuticals 0.08522 .
## SectorBusiness Services 0.00985 **
## SectorConstruction, Repair & Maintenance 0.40725
## SectorConsumer Services 0.40492
## SectorEducation 0.73985
## SectorFinance 0.19681
## SectorGovernment 0.02151 *
## SectorHealth Care 0.22515
## SectorInformation Technology 0.16399
## SectorInsurance 0.07155 .
## SectorManufacturing 0.50129
## SectorMedia 0.31056
## SectorMining & Metals 0.96856
## SectorNon-Profit 0.60526
## SectorOil, Gas, Energy & Utilities 0.11877
## SectorReal Estate 0.09191 .
## SectorRestaurants, Bars & Food Services 0.53432
## SectorRetail 0.23177
## SectorTelecommunications 0.14910
## SectorTransportation & Logistics 0.86369
## IndustryAdvertising & Marketing 0.02465 *
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.00743 **
## IndustryAutomotive Parts & Accessories Stores 0.18685
## IndustryBanks & Credit Unions 0.13100
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.50485
## IndustryBuilding & Personnel Services 0.56296
## IndustryCable, Internet & Telephone Providers 0.96224
## IndustryCasual Restaurants 0.16878
## IndustryCatering & Food Service Contractors 0.71601
## IndustryColleges & Universities 0.71432
## IndustryCommercial Equipment Repair & Maintenance 0.66788
## IndustryComputer Hardware & Software 0.85811
## IndustryConstruction 0.20308
## IndustryConsulting 0.02365 *
## IndustryConsumer Products Manufacturing 0.43456
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.64068
## IndustryEducation Training Services 0.22643
## IndustryElectrical & Electronic Manufacturing 0.32037
## IndustryEnergy 0.68482
## IndustryEnterprise Software & Network Solutions 0.49805
## IndustryFederal Agencies 0.19600
## IndustryFinancial Analytics & Research 0.23201
## IndustryFinancial Transaction Processing 0.27385
## IndustryFood & Beverage Manufacturing 0.36046
## IndustryGambling 0.62764
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.44525
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.93198
## IndustryHealth, Beauty, & Fitness NA
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.84152
## IndustryInsurance Carriers NA
## IndustryInternet 0.40993
## IndustryInvestment Banking & Asset Management 0.04104 *
## IndustryIT Services NA
## IndustryK-12 Education 0.91416
## IndustryLegal 0.91810
## IndustryLending 0.28725
## IndustryLogistics & Supply Chain 0.42523
## IndustryMembership Organizations 0.60373
## IndustryMetals Brokers NA
## IndustryMunicipal Governments 0.37055
## IndustryNews Outlet 0.03334 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.06892 .
## IndustryPreschool & Child Care NA
## IndustryPublishing 0.92379
## IndustryReal Estate NA
## IndustryResearch & Development 0.37910
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores 0.32709
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.02318 *
## IndustryState & Regional Agencies NA
## IndustryStock Exchanges 0.77913
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.39881
## IndustryVehicle Dealers NA
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15150 on 1016 degrees of freedom
## Multiple R-squared: 0.06807, Adjusted R-squared: 0.007535
## F-statistic: 1.124 on 66 and 1016 DF, p-value: 0.2369
anova(lm2)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.2328 0.2101
## Industry 44 1.0802e+10 245496911 1.0703 0.3515
## Residuals 1016 2.3304e+11 229374772
#Linear Regression: Average Salary explaingd by Sector, Industry Type, and Firm Size
#Slight drop in r-squared, slight increase in p-value, removing Firm Size. Adjusted R-squared: 0.006605, p-value: 0.2637
lm3 <- lm(average_salary ~ Sector + Industry + max_size, data = salaries_df2)
summary(lm3)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry + max_size, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37378 -12123 1209 11050 36600
##
## Coefficients: (22 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 5.888e+04 2.639e+03 22.311
## SectorAerospace & Defense 1.612e+03 5.718e+03 0.282
## SectorArts, Entertainment & Recreation -7.900e+03 1.103e+04 -0.716
## SectorBiotech & Pharmaceuticals -8.510e+03 4.906e+03 -1.734
## SectorBusiness Services -1.883e+04 7.274e+03 -2.589
## SectorConstruction, Repair & Maintenance -9.131e+03 1.103e+04 -0.828
## SectorConsumer Services -5.239e+03 6.305e+03 -0.831
## SectorEducation 5.122e+03 1.538e+04 0.333
## SectorFinance 1.013e+04 8.089e+03 1.252
## SectorGovernment -2.542e+04 1.103e+04 -2.303
## SectorHealth Care -4.105e+03 3.331e+03 -1.232
## SectorInformation Technology -3.931e+03 2.805e+03 -1.401
## SectorInsurance -8.194e+03 4.522e+03 -1.812
## SectorManufacturing -5.540e+03 8.049e+03 -0.688
## SectorMedia -6.603e+03 6.376e+03 -1.036
## SectorMining & Metals 4.256e+02 1.540e+04 0.028
## SectorNon-Profit -2.299e+03 4.309e+03 -0.534
## SectorOil, Gas, Energy & Utilities -1.265e+04 8.046e+03 -1.573
## SectorReal Estate 1.861e+04 1.103e+04 1.687
## SectorRestaurants, Bars & Food Services 6.854e+03 1.103e+04 0.621
## SectorRetail -1.857e+04 1.540e+04 -1.206
## SectorTelecommunications -1.064e+04 7.301e+03 -1.457
## SectorTransportation & Logistics -1.890e+03 1.103e+04 -0.171
## IndustryAdvertising & Marketing 1.624e+04 7.220e+03 2.250
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 2.230e+04 8.302e+03 2.686
## IndustryAutomotive Parts & Accessories Stores 2.450e+04 1.856e+04 1.320
## IndustryBanks & Credit Unions -1.261e+04 8.435e+03 -1.495
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -8.700e+03 1.312e+04 -0.663
## IndustryBuilding & Personnel Services -9.741e+03 1.661e+04 -0.586
## IndustryCable, Internet & Telephone Providers 7.411e+02 1.269e+04 0.058
## IndustryCasual Restaurants -1.744e+04 1.268e+04 -1.376
## IndustryCatering & Food Service Contractors -6.770e+03 1.856e+04 -0.365
## IndustryColleges & Universities -6.131e+03 1.622e+04 -0.378
## IndustryCommercial Equipment Repair & Maintenance -6.535e+03 1.515e+04 -0.431
## IndustryComputer Hardware & Software -4.160e+02 2.076e+03 -0.200
## IndustryConstruction 1.571e+04 1.237e+04 1.269
## IndustryConsulting 1.582e+04 6.973e+03 2.268
## IndustryConsumer Products Manufacturing 7.209e+03 9.281e+03 0.777
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -9.810e+03 2.145e+04 -0.457
## IndustryEducation Training Services -2.119e+04 1.750e+04 -1.211
## IndustryElectrical & Electronic Manufacturing 1.165e+04 1.159e+04 1.005
## IndustryEnergy 4.188e+03 1.017e+04 0.412
## IndustryEnterprise Software & Network Solutions -1.728e+03 2.547e+03 -0.678
## IndustryFederal Agencies 1.602e+04 1.237e+04 1.295
## IndustryFinancial Analytics & Research -2.040e+04 1.695e+04 -1.203
## IndustryFinancial Transaction Processing -1.024e+04 9.522e+03 -1.076
## IndustryFood & Beverage Manufacturing -1.203e+04 1.312e+04 -0.917
## IndustryGambling -9.175e+03 1.857e+04 -0.494
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 8.796e+03 1.157e+04 0.760
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations 1.415e+03 1.553e+04 0.091
## IndustryHealth, Beauty, & Fitness NA NA NA
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -1.821e+03 9.454e+03 -0.193
## IndustryInsurance Carriers NA NA NA
## IndustryInternet -3.048e+03 3.620e+03 -0.842
## IndustryInvestment Banking & Asset Management -1.674e+04 8.248e+03 -2.030
## IndustryIT Services NA NA NA
## IndustryK-12 Education 1.893e+03 1.856e+04 0.102
## IndustryLegal 7.582e+02 9.174e+03 0.083
## IndustryLending -1.003e+04 9.503e+03 -1.055
## IndustryLogistics & Supply Chain 9.323e+03 1.186e+04 0.786
## IndustryMembership Organizations 5.321e+03 1.017e+04 0.523
## IndustryMetals Brokers NA NA NA
## IndustryMunicipal Governments 1.177e+04 1.312e+04 0.897
## IndustryNews Outlet 3.453e+04 1.620e+04 2.132
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 3.900e+04 2.143e+04 1.820
## IndustryPreschool & Child Care NA NA NA
## IndustryPublishing -9.128e+02 1.046e+04 -0.087
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 1.119e+04 1.268e+04 0.882
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores 2.116e+04 2.144e+04 0.987
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 1.554e+04 6.859e+03 2.265
## IndustryState & Regional Agencies NA NA NA
## IndustryStock Exchanges -4.700e+03 1.694e+04 -0.277
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 1.037e+04 1.216e+04 0.853
## IndustryVehicle Dealers NA NA NA
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## max_size 3.968e-02 1.794e-01 0.221
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## SectorAerospace & Defense 0.77805
## SectorArts, Entertainment & Recreation 0.47419
## SectorBiotech & Pharmaceuticals 0.08315 .
## SectorBusiness Services 0.00976 **
## SectorConstruction, Repair & Maintenance 0.40814
## SectorConsumer Services 0.40629
## SectorEducation 0.73918
## SectorFinance 0.21094
## SectorGovernment 0.02146 *
## SectorHealth Care 0.21805
## SectorInformation Technology 0.16139
## SectorInsurance 0.07024 .
## SectorManufacturing 0.49146
## SectorMedia 0.30062
## SectorMining & Metals 0.97796
## SectorNon-Profit 0.59374
## SectorOil, Gas, Energy & Utilities 0.11606
## SectorReal Estate 0.09199 .
## SectorRestaurants, Bars & Food Services 0.53462
## SectorRetail 0.22810
## SectorTelecommunications 0.14539
## SectorTransportation & Logistics 0.86404
## IndustryAdvertising & Marketing 0.02467 *
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.00735 **
## IndustryAutomotive Parts & Accessories Stores 0.18706
## IndustryBanks & Credit Unions 0.13518
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.50752
## IndustryBuilding & Personnel Services 0.55771
## IndustryCable, Internet & Telephone Providers 0.95346
## IndustryCasual Restaurants 0.16915
## IndustryCatering & Food Service Contractors 0.71534
## IndustryColleges & Universities 0.70560
## IndustryCommercial Equipment Repair & Maintenance 0.66638
## IndustryComputer Hardware & Software 0.84123
## IndustryConstruction 0.20459
## IndustryConsulting 0.02353 *
## IndustryConsumer Products Manufacturing 0.43745
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.64747
## IndustryEducation Training Services 0.22606
## IndustryElectrical & Electronic Manufacturing 0.31531
## IndustryEnergy 0.68051
## IndustryEnterprise Software & Network Solutions 0.49783
## IndustryFederal Agencies 0.19567
## IndustryFinancial Analytics & Research 0.22919
## IndustryFinancial Transaction Processing 0.28235
## IndustryFood & Beverage Manufacturing 0.35933
## IndustryGambling 0.62146
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.44744
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.92741
## IndustryHealth, Beauty, & Fitness NA
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.84734
## IndustryInsurance Carriers NA
## IndustryInternet 0.40004
## IndustryInvestment Banking & Asset Management 0.04260 *
## IndustryIT Services NA
## IndustryK-12 Education 0.91881
## IndustryLegal 0.93414
## IndustryLending 0.29146
## IndustryLogistics & Supply Chain 0.43189
## IndustryMembership Organizations 0.60081
## IndustryMetals Brokers NA
## IndustryMunicipal Governments 0.36988
## IndustryNews Outlet 0.03329 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.06905 .
## IndustryPreschool & Child Care NA
## IndustryPublishing 0.93050
## IndustryReal Estate NA
## IndustryResearch & Development 0.37781
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores 0.32395
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.02370 *
## IndustryState & Regional Agencies NA
## IndustryStock Exchanges 0.78150
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.39387
## IndustryVehicle Dealers NA
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## max_size 0.82503
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15150 on 1015 degrees of freedom
## Multiple R-squared: 0.06812, Adjusted R-squared: 0.006605
## F-statistic: 1.107 on 67 and 1015 DF, p-value: 0.2637
anova(lm3)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.2317 0.2111
## Industry 44 1.0802e+10 245496911 1.0693 0.3531
## max_size 1 1.1228e+07 11227658 0.0489 0.8250
## Residuals 1015 2.3303e+11 229589695
#Linear Regression: Average Salary explained by Sector, Industry Type, and Job Rating
#Insignificant improvement to r-squared but not to p-value, will keep Job Rating in model. Adjusted R-squared: 0.007385, p-value: 0.2425
lm4 <- lm(average_salary ~ Sector + Industry + Rating, data = salaries_df2)
summary(lm4)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry + Rating, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37480 -12005 1133 11115 36480
##
## Coefficients: (22 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 56706.9 3549.9 15.974
## SectorAerospace & Defense 1801.6 5696.5 0.316
## SectorArts, Entertainment & Recreation -7695.9 11031.9 -0.698
## SectorBiotech & Pharmaceuticals -7998.6 4843.8 -1.651
## SectorBusiness Services -18470.9 7277.2 -2.538
## SectorConstruction, Repair & Maintenance -7638.9 11150.4 -0.685
## SectorConsumer Services -5166.7 6303.4 -0.820
## SectorEducation 5190.4 15374.3 0.338
## SectorFinance 10710.4 8028.2 1.334
## SectorGovernment -24798.1 11048.8 -2.244
## SectorHealth Care -3815.9 3298.2 -1.157
## SectorInformation Technology -3999.3 2802.3 -1.427
## SectorInsurance -7627.1 4457.1 -1.711
## SectorManufacturing -5110.7 8024.9 -0.637
## SectorMedia -6455.7 6303.1 -1.024
## SectorMining & Metals 804.1 15375.6 0.052
## SectorNon-Profit -1935.7 4303.1 -0.450
## SectorOil, Gas, Energy & Utilities -12406.1 8019.9 -1.547
## SectorReal Estate 18605.2 11029.8 1.687
## SectorRestaurants, Bars & Food Services 7451.9 11048.8 0.674
## SectorRetail -18423.2 15374.1 -1.198
## SectorTelecommunications -10318.6 7271.2 -1.419
## SectorTransportation & Logistics -1241.3 11052.6 -0.112
## IndustryAdvertising & Marketing 16029.9 7220.3 2.220
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 23091.0 8346.2 2.767
## IndustryAutomotive Parts & Accessories Stores 25238.8 18567.7 1.359
## IndustryBanks & Credit Unions -12743.2 8417.1 -1.514
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -8849.4 13117.5 -0.675
## IndustryBuilding & Personnel Services -9781.8 16593.1 -0.590
## IndustryCable, Internet & Telephone Providers 224.9 12678.8 0.018
## IndustryCasual Restaurants -17688.7 12674.9 -1.396
## IndustryCatering & Food Service Contractors -7091.0 18554.0 -0.382
## IndustryColleges & Universities -6131.5 16193.5 -0.379
## IndustryCommercial Equipment Repair & Maintenance -7807.0 15212.7 -0.513
## IndustryComputer Hardware & Software -166.9 2076.3 -0.080
## IndustryConstruction 14310.4 12465.5 1.148
## IndustryConsulting 15551.4 6975.0 2.230
## IndustryConsumer Products Manufacturing 7235.8 9275.2 0.780
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -9829.5 21420.9 -0.459
## IndustryEducation Training Services -20920.4 17491.5 -1.196
## IndustryElectrical & Electronic Manufacturing 11433.7 11568.4 0.988
## IndustryEnergy 4244.3 10161.3 0.418
## IndustryEnterprise Software & Network Solutions -1632.1 2548.5 -0.640
## IndustryFederal Agencies 15696.9 12371.3 1.269
## IndustryFinancial Analytics & Research -20235.8 16934.0 -1.195
## IndustryFinancial Transaction Processing -10516.7 9494.4 -1.108
## IndustryFood & Beverage Manufacturing -12000.0 13117.1 -0.915
## IndustryGambling -8886.3 18550.7 -0.479
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 8861.7 11568.2 0.766
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations 1410.2 15520.6 0.091
## IndustryHealth, Beauty, & Fitness NA NA NA
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -2049.9 9447.0 -0.217
## IndustryInsurance Carriers NA NA NA
## IndustryInternet -2960.4 3600.5 -0.822
## IndustryInvestment Banking & Asset Management -17038.5 8235.7 -2.069
## IndustryIT Services NA NA NA
## IndustryK-12 Education 2000.0 18550.3 0.108
## IndustryLegal 1270.0 9140.6 0.139
## IndustryLending -10092.9 9493.4 -1.063
## IndustryLogistics & Supply Chain 8945.6 11852.8 0.755
## IndustryMembership Organizations 5320.5 10160.5 0.524
## IndustryMetals Brokers NA NA NA
## IndustryMunicipal Governments 11764.2 13117.1 0.897
## IndustryNews Outlet 34589.3 16192.3 2.136
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 39113.7 21420.4 1.826
## IndustryPreschool & Child Care NA NA NA
## IndustryPublishing -797.0 10454.2 -0.076
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 11053.4 12672.7 0.872
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores 21170.5 21420.9 0.988
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 15301.4 6860.6 2.230
## IndustryState & Regional Agencies NA NA NA
## IndustryStock Exchanges -4735.8 16934.0 -0.280
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 10197.2 12144.2 0.840
## IndustryVehicle Dealers NA NA NA
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## Rating 568.3 617.6 0.920
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## SectorAerospace & Defense 0.75187
## SectorArts, Entertainment & Recreation 0.48558
## SectorBiotech & Pharmaceuticals 0.09898 .
## SectorBusiness Services 0.01129 *
## SectorConstruction, Repair & Maintenance 0.49345
## SectorConsumer Services 0.41260
## SectorEducation 0.73573
## SectorFinance 0.18247
## SectorGovernment 0.02502 *
## SectorHealth Care 0.24756
## SectorInformation Technology 0.15384
## SectorInsurance 0.08735 .
## SectorManufacturing 0.52437
## SectorMedia 0.30598
## SectorMining & Metals 0.95830
## SectorNon-Profit 0.65293
## SectorOil, Gas, Energy & Utilities 0.12220
## SectorReal Estate 0.09195 .
## SectorRestaurants, Bars & Food Services 0.50018
## SectorRetail 0.23107
## SectorTelecommunications 0.15617
## SectorTransportation & Logistics 0.91060
## IndustryAdvertising & Marketing 0.02663 *
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.00577 **
## IndustryAutomotive Parts & Accessories Stores 0.17436
## IndustryBanks & Credit Unions 0.13035
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.50006
## IndustryBuilding & Personnel Services 0.55565
## IndustryCable, Internet & Telephone Providers 0.98585
## IndustryCasual Restaurants 0.16315
## IndustryCatering & Food Service Contractors 0.70241
## IndustryColleges & Universities 0.70503
## IndustryCommercial Equipment Repair & Maintenance 0.60793
## IndustryComputer Hardware & Software 0.93596
## IndustryConstruction 0.25124
## IndustryConsulting 0.02599 *
## IndustryConsumer Products Manufacturing 0.43550
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.64642
## IndustryEducation Training Services 0.23196
## IndustryElectrical & Electronic Manufacturing 0.32321
## IndustryEnergy 0.67626
## IndustryEnterprise Software & Network Solutions 0.52206
## IndustryFederal Agencies 0.20480
## IndustryFinancial Analytics & Research 0.23238
## IndustryFinancial Transaction Processing 0.26827
## IndustryFood & Beverage Manufacturing 0.36049
## IndustryGambling 0.63202
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.44383
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.92762
## IndustryHealth, Beauty, & Fitness NA
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.82826
## IndustryInsurance Carriers NA
## IndustryInternet 0.41114
## IndustryInvestment Banking & Asset Management 0.03881 *
## IndustryIT Services NA
## IndustryK-12 Education 0.91416
## IndustryLegal 0.88952
## IndustryLending 0.28797
## IndustryLogistics & Supply Chain 0.45059
## IndustryMembership Organizations 0.60064
## IndustryMetals Brokers NA
## IndustryMunicipal Governments 0.37000
## IndustryNews Outlet 0.03291 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.06814 .
## IndustryPreschool & Child Care NA
## IndustryPublishing 0.93924
## IndustryReal Estate NA
## IndustryResearch & Development 0.38329
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores 0.32324
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.02594 *
## IndustryState & Regional Agencies NA
## IndustryStock Exchanges 0.77979
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.40128
## IndustryVehicle Dealers NA
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## Rating 0.35775
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15150 on 1015 degrees of freedom
## Multiple R-squared: 0.06885, Adjusted R-squared: 0.007385
## F-statistic: 1.12 on 67 and 1015 DF, p-value: 0.2425
anova(lm4)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.2327 0.2103
## Industry 44 1.0802e+10 245496911 1.0701 0.3517
## Rating 1 1.9421e+08 194208672 0.8466 0.3577
## Residuals 1015 2.3285e+11 229409418
#Linear Regression: Average Salary explained by Sector, Industry Type, Job Rating, and Location
#Significant increase in Adjusted R-squared: 0.2542, p-value: < 2.2e-16
lm5 <- lm(average_salary ~ Sector + Industry + Rating + Location, data = salaries_df2)
summary(lm5)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry + Rating + Location,
## data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36842 -7423 0 8801 31159
##
## Coefficients: (28 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 38906.71 13748.49 2.830
## SectorAerospace & Defense 6530.74 5977.39 1.093
## SectorArts, Entertainment & Recreation -5963.89 10075.98 -0.592
## SectorBiotech & Pharmaceuticals -2622.29 5346.07 -0.491
## SectorBusiness Services -12913.01 7564.37 -1.707
## SectorConstruction, Repair & Maintenance -25252.32 13469.19 -1.875
## SectorConsumer Services -4804.87 6382.20 -0.753
## SectorEducation 21128.51 18874.03 1.119
## SectorFinance 12837.35 7666.99 1.674
## SectorGovernment -14314.17 10019.36 -1.429
## SectorHealth Care -442.86 3393.76 -0.130
## SectorInformation Technology -2037.24 2938.67 -0.693
## SectorInsurance -1942.17 4765.56 -0.408
## SectorManufacturing 2946.80 10672.59 0.276
## SectorMedia -2732.03 6108.58 -0.447
## SectorMining & Metals -2012.31 18804.29 -0.107
## SectorNon-Profit -2015.27 4399.47 -0.458
## SectorOil, Gas, Energy & Utilities -4280.40 8609.66 -0.497
## SectorReal Estate 17056.59 9752.04 1.749
## SectorRestaurants, Bars & Food Services 3198.79 13268.70 0.241
## SectorRetail -2585.80 18874.73 -0.137
## SectorTelecommunications -1960.34 7005.41 -0.280
## SectorTransportation & Logistics -7061.06 10025.35 -0.704
## IndustryAdvertising & Marketing 10628.92 7455.37 1.426
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 21898.61 9273.02 2.362
## IndustryAutomotive Parts & Accessories Stores 10991.42 22965.14 0.479
## IndustryBanks & Credit Unions -15221.08 8051.16 -1.891
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -11991.52 11841.44 -1.013
## IndustryBuilding & Personnel Services 648.68 19953.71 0.033
## IndustryCable, Internet & Telephone Providers -8557.38 12632.55 -0.677
## IndustryCasual Restaurants -6195.14 14340.44 -0.432
## IndustryCatering & Food Service Contractors 13251.19 22744.64 0.583
## IndustryColleges & Universities -24195.01 19631.72 -1.232
## IndustryCommercial Equipment Repair & Maintenance 22967.49 17138.20 1.340
## IndustryComputer Hardware & Software -749.19 1989.36 -0.377
## IndustryConstruction 41227.92 14662.22 2.812
## IndustryConsulting 11143.26 7227.03 1.542
## IndustryConsumer Products Manufacturing 5572.49 11792.95 0.473
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -28354.95 26364.75 -1.075
## IndustryEducation Training Services -27750.99 20310.09 -1.366
## IndustryElectrical & Electronic Manufacturing 14388.58 13963.13 1.030
## IndustryEnergy 10264.86 11811.74 0.869
## IndustryEnterprise Software & Network Solutions -2319.60 2508.83 -0.925
## IndustryFederal Agencies 6458.57 11879.60 0.544
## IndustryFinancial Analytics & Research -10700.89 15199.84 -0.704
## IndustryFinancial Transaction Processing -11836.96 8981.69 -1.318
## IndustryFood & Beverage Manufacturing -40111.16 17005.40 -2.359
## IndustryGambling 5521.03 21056.66 0.262
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 12196.23 13155.95 0.927
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations -22.74 13574.20 -0.002
## IndustryHealth, Beauty, & Fitness NA NA NA
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -1054.42 9315.27 -0.113
## IndustryInsurance Carriers NA NA NA
## IndustryInternet 1835.14 3439.29 0.534
## IndustryInvestment Banking & Asset Management -15732.10 7810.41 -2.014
## IndustryIT Services NA NA NA
## IndustryK-12 Education -10971.90 20908.20 -0.525
## IndustryLegal 228.23 8119.31 0.028
## IndustryLending -4715.27 8821.60 -0.535
## IndustryLogistics & Supply Chain 7912.96 10697.25 0.740
## IndustryMembership Organizations 1106.31 10002.69 0.111
## IndustryMetals Brokers NA NA NA
## IndustryMunicipal Governments 4308.14 12369.28 0.348
## IndustryNews Outlet 29051.09 14199.60 2.046
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 39214.31 18567.94 2.112
## IndustryPreschool & Child Care NA NA NA
## IndustryPublishing 472.64 12386.99 0.038
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 12552.14 11796.81 1.064
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores 14355.53 22912.42 0.627
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 10900.70 7119.50 1.531
## IndustryState & Regional Agencies NA NA NA
## IndustryStock Exchanges -17431.92 15092.94 -1.155
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 9476.35 12007.36 0.789
## IndustryVehicle Dealers NA NA NA
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## Rating 1071.56 626.16 1.711
## LocationAlameda, CA 18676.42 18709.76 0.998
## LocationAllegheny West, PA 14791.10 16277.08 0.909
## LocationAllen, TX 14450.90 15335.08 0.942
## LocationAmerican Fork, UT -3905.62 18691.41 -0.209
## LocationAnaheim, CA 13745.16 21749.40 0.632
## LocationArcadia, CA -20882.17 16168.90 -1.292
## LocationArlington Heights, IL 34307.04 18875.39 1.818
## LocationArlington, TX 20644.13 16079.36 1.284
## LocationAthens, GA 1772.72 15328.22 0.116
## LocationAurora, CO -155.71 18689.61 -0.008
## LocationAustin, TX 5907.09 13485.95 0.438
## LocationAzusa, CA 32112.57 18738.08 1.714
## LocationBellevue, WA 13021.13 18818.47 0.692
## LocationBensalem, PA 12380.07 18689.85 0.662
## LocationBerkeley Heights, NJ -320.57 19217.74 -0.017
## LocationBerwyn, PA -359.18 18697.65 -0.019
## LocationBlue Bell, PA 20750.99 19221.84 1.080
## LocationBoothwyn, PA -2144.87 18697.26 -0.115
## LocationBoulder, CO 24017.50 15326.61 1.567
## LocationBrea, CA -9857.85 16624.30 -0.593
## LocationBridgeview, IL 53721.50 23062.34 2.329
## LocationBroadview, IL 12252.15 19533.46 0.627
## LocationBronx, NY 19072.40 18973.84 1.005
## LocationBrooklyn, NY 19861.42 14861.89 1.336
## LocationBroomfield, CO 15040.35 16227.49 0.927
## LocationBurbank, CA 5552.12 14527.97 0.382
## LocationBurlingame, CA 22716.87 15719.04 1.445
## LocationBurlingame, KS 11307.78 18755.34 0.603
## LocationCamden, NJ 18855.13 18697.26 1.008
## LocationCarmel, IN 7901.56 16934.29 0.467
## LocationCentennial, CO 11236.04 14540.12 0.773
## LocationCerritos, CA 13264.21 16224.50 0.818
## LocationChandler, AZ 16571.35 14856.13 1.115
## LocationCharlotte, NC 26758.86 13433.07 1.992
## LocationChesapeake, VA NA NA NA
## LocationChicago, IL 26925.64 13380.44 2.012
## LocationColumbus, OH -2367.14 13937.86 -0.170
## LocationConshohocken, PA -466.33 18698.15 -0.025
## LocationCoppell, TX 22594.38 18691.41 1.209
## LocationCulver City, CA -11752.02 18697.35 -0.629
## LocationCupertino, CA 21554.36 13990.22 1.541
## LocationDallas, TX 9007.92 13538.55 0.665
## LocationDaly City, CA 34176.42 18709.76 1.827
## LocationDC Ranch, AZ 21307.78 18755.34 1.136
## LocationDenver, CO 10571.73 13533.80 0.781
## LocationDowners Grove, IL 23091.84 14210.52 1.625
## LocationDoylestown, PA NA NA NA
## LocationDraper, UT -3692.22 18755.34 -0.197
## LocationDublin, OH -1959.39 16231.69 -0.121
## LocationEl Cajon, CA NA NA NA
## LocationEl Segundo, CA 5786.33 14368.52 0.403
## LocationElk Grove Village, IL 33791.61 19952.43 1.694
## LocationEnglewood, CO 9062.49 16242.24 0.558
## LocationEssex Fells, NJ -927.60 18973.84 -0.049
## LocationExton, PA 11791.10 18738.50 0.629
## LocationFeasterville Trevose, PA 22572.06 17086.60 1.321
## LocationFlorham Park, NJ 21851.12 16364.62 1.335
## LocationFort Eustis, VA -9958.80 18740.44 -0.531
## LocationFort Lee, NJ 19440.86 19041.88 1.021
## LocationFort Mill, SC 24498.07 18701.14 1.310
## LocationFort Worth, TX 17596.62 14056.19 1.252
## LocationFoster City, CA 14218.04 14883.46 0.955
## LocationFranklin Lakes, NJ -2298.65 18696.25 -0.123
## LocationFremont, CA 4835.35 16457.10 0.294
## LocationGainesville, FL 134.09 14306.46 0.009
## LocationGlendale, AZ 33333.70 19042.93 1.750
## LocationGlendale, CA 18756.93 15222.67 1.232
## LocationGlenview, IL 17717.49 21315.77 0.831
## LocationGrapevine, TX 8959.42 17004.17 0.527
## LocationGreenwood Village, Arapahoe, CO -1158.51 14529.22 -0.080
## LocationHampton, VA 10444.92 13791.35 0.757
## LocationHanford, CA 23572.40 18973.84 1.242
## LocationHarrison, NY 28807.04 18875.39 1.526
## LocationHaworth, NJ 32108.81 16225.45 1.979
## LocationHercules, CA 2679.43 19217.74 0.139
## LocationHoboken, NJ 14605.04 18702.28 0.781
## LocationHorsham, PA 16450.04 14916.46 1.103
## LocationHouston, TX 6965.94 13422.32 0.519
## LocationHuntersville, NC 28131.46 15039.73 1.870
## LocationIndian Trail, NC 51917.17 22994.28 2.258
## LocationIndianapolis, IN 6530.93 13716.77 0.476
## LocationIrving, TX 20253.51 13684.86 1.480
## LocationIrwindale, CA -7849.37 16532.40 -0.475
## LocationItasca, IL 40198.48 18816.22 2.136
## LocationJacksonville, FL 14178.54 14002.92 1.013
## LocationJeffersonville, IN 4485.36 19463.66 0.230
## LocationJersey City, NJ 16506.00 13732.85 1.202
## LocationKent, WA -8183.07 15406.02 -0.531
## LocationKing of Prussia, PA 15067.92 15319.52 0.984
## LocationKirkland, WA -12793.13 16210.79 -0.789
## LocationLackland AFB, TX 31490.61 19407.86 1.623
## LocationLake Success, NY 17100.71 14434.01 1.185
## LocationLakewood, CO 13252.87 15537.90 0.853
## LocationLehi, UT -8010.00 17024.44 -0.471
## LocationLewisville, TX 11894.90 19538.78 0.609
## LocationLittle Ferry, NJ 18612.57 18738.08 0.993
## LocationLong Beach, CA 13560.11 15938.49 0.851
## LocationLong Island City, NY 28893.87 18974.56 1.523
## LocationLos Angeles, CA -981.84 13533.10 -0.073
## LocationLos Gatos, CA 14183.05 15955.18 0.889
## LocationLouisville, CO 706.56 15786.45 0.045
## LocationMalvern, PA 11026.68 15324.75 0.720
## LocationMarin City, CA 32714.13 18582.71 1.760
## LocationMarlton, NJ 14487.48 16516.51 0.877
## LocationMenlo Park, CA 20505.76 14528.46 1.411
## LocationMesa, AZ -14086.02 18817.72 -0.749
## LocationMillbrae, CA -5820.17 20532.89 -0.283
## LocationMilpitas, CA 34749.73 14861.16 2.338
## LocationMontvale, NJ 30951.44 18689.24 1.656
## LocationMoorestown, NJ 29057.14 18875.12 1.539
## LocationMooresville, NC 17162.70 18808.20 0.913
## LocationMount Laurel, NJ -1012.52 16516.51 -0.061
## LocationMountain View, CA 19353.66 14158.98 1.367
## LocationNew York, NY 17702.30 13296.62 1.331
## LocationNewark, CA 10277.31 16253.44 0.632
## LocationNewark, NJ 20638.93 16457.73 1.254
## LocationNewport News, VA 13878.61 18878.12 0.735
## LocationNorfolk, VA 2877.66 14495.70 0.199
## LocationNorthbrook, IL 28349.71 16210.93 1.749
## LocationNorthlake, IL NA NA NA
## LocationNorthridge, CA -9499.11 19216.83 -0.494
## LocationNovato, CA 8860.55 19433.64 0.456
## LocationOak Brook, IL NA NA NA
## LocationOakland, CA 20844.35 14837.55 1.405
## LocationPalo Alto, CA 15830.06 14128.99 1.120
## LocationPaoli, PA -680.65 18699.80 -0.036
## LocationPasadena, CA 13841.97 15452.37 0.896
## LocationPasadena, TX 21712.38 18704.10 1.161
## LocationPearland, TX 5778.53 14383.56 0.402
## LocationPhiladelphia, PA 9648.85 13468.87 0.716
## LocationPhoenix, AZ 18614.34 13680.44 1.361
## LocationPlano, TX 14239.28 13840.33 1.029
## LocationPleasanton, CA 21476.68 15067.25 1.425
## LocationPlymouth Meeting, PA -2013.68 18758.86 -0.107
## LocationPortsmouth, VA 2857.03 16168.41 0.177
## LocationRedmond, WA -2009.41 14870.40 -0.135
## LocationRedwood City, CA 14752.38 13984.31 1.055
## LocationRenton, WA -13609.27 18705.60 -0.728
## LocationRichardson, TX 18672.21 14035.17 1.330
## LocationRiverton, UT -4387.43 18738.08 -0.234
## LocationRolling Meadows, IL 39333.70 19042.93 2.066
## LocationRound Rock, TX 8135.40 16211.95 0.502
## LocationSalt Lake City, UT -3833.90 14004.16 -0.274
## LocationSan Antonio, TX 23075.21 13545.83 1.703
## LocationSan Diego, CA 4527.83 13572.89 0.334
## LocationSan Francisco, CA 17120.07 13397.79 1.278
## LocationSan Jose, CA 19894.62 13537.37 1.470
## LocationSan Mateo, CA 12090.36 14051.96 0.860
## LocationSan Rafael, CA 18676.42 18709.76 0.998
## LocationSan Ramon, CA 21546.04 16219.72 1.328
## LocationSanta Clara, CA 10911.13 14512.75 0.752
## LocationSanta Monica, CA 7815.99 17079.80 0.458
## LocationScottsdale, AZ 28587.17 14490.51 1.973
## LocationSeattle, WA 312.25 13696.59 0.023
## LocationSouth San Francisco, CA 19331.82 16212.35 1.192
## LocationSouthlake, TX 4152.91 19735.15 0.210
## LocationSpring, TX 6890.73 18705.60 0.368
## LocationStafford, TX -7977.18 18691.99 -0.427
## LocationSugar Land, TX 7451.48 16325.46 0.456
## LocationSummit, NJ 9219.73 18738.35 0.492
## LocationSunnyvale, CA 20398.53 14227.56 1.434
## LocationTarrant, TX 30563.17 20218.49 1.512
## LocationTempe, AZ 9312.71 13930.28 0.669
## LocationTopeka, KS 10987.22 18690.52 0.588
## LocationTorrance, CA 3044.36 22946.91 0.133
## LocationVirginia Beach, VA 15541.20 18740.44 0.829
## LocationVisalia, CA NA NA NA
## LocationWalnut Creek, CA 14682.36 16473.54 0.891
## LocationWayne, PA 5056.99 15082.90 0.335
## LocationWeehawken, NJ 21831.82 16212.35 1.347
## LocationWest Chester, PA 2123.22 20364.95 0.104
## LocationWest Jordan, UT -21885.22 20938.25 -1.045
## LocationWesterville, OH 24283.57 18707.57 1.298
## LocationWestlake, TX 22772.91 18689.38 1.218
## LocationWhippany, NJ 14308.51 18694.62 0.765
## LocationWhittier, CA -20821.47 18568.47 -1.121
## LocationWilmington, DE 18088.63 14539.23 1.244
## LocationWoodbridge, NJ 15392.15 19040.89 0.808
## LocationWoodland Hills, CA -8204.38 15319.09 -0.536
## LocationWoodridge, IL 19306.64 18831.54 1.025
## LocationYorktown, VA 7133.55 19408.00 0.368
## Pr(>|t|)
## (Intercept) 0.00477 **
## SectorAerospace & Defense 0.27489
## SectorArts, Entertainment & Recreation 0.55408
## SectorBiotech & Pharmaceuticals 0.62390
## SectorBusiness Services 0.08818 .
## SectorConstruction, Repair & Maintenance 0.06116 .
## SectorConsumer Services 0.45175
## SectorEducation 0.26327
## SectorFinance 0.09443 .
## SectorGovernment 0.15348
## SectorHealth Care 0.89621
## SectorInformation Technology 0.48834
## SectorInsurance 0.68371
## SectorManufacturing 0.78253
## SectorMedia 0.65481
## SectorMining & Metals 0.91480
## SectorNon-Profit 0.64702
## SectorOil, Gas, Energy & Utilities 0.61920
## SectorReal Estate 0.08065 .
## SectorRestaurants, Bars & Food Services 0.80955
## SectorRetail 0.89107
## SectorTelecommunications 0.77967
## SectorTransportation & Logistics 0.48143
## IndustryAdvertising & Marketing 0.15433
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.01843 *
## IndustryAutomotive Parts & Accessories Stores 0.63234
## IndustryBanks & Credit Unions 0.05903 .
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.31151
## IndustryBuilding & Personnel Services 0.97407
## IndustryCable, Internet & Telephone Providers 0.49833
## IndustryCasual Restaurants 0.66585
## IndustryCatering & Food Service Contractors 0.56031
## IndustryColleges & Universities 0.21813
## IndustryCommercial Equipment Repair & Maintenance 0.18056
## IndustryComputer Hardware & Software 0.70657
## IndustryConstruction 0.00504 **
## IndustryConsulting 0.12348
## IndustryConsumer Products Manufacturing 0.63667
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.28247
## IndustryEducation Training Services 0.17219
## IndustryElectrical & Electronic Manufacturing 0.30309
## IndustryEnergy 0.38507
## IndustryEnterprise Software & Network Solutions 0.35545
## IndustryFederal Agencies 0.58681
## IndustryFinancial Analytics & Research 0.48162
## IndustryFinancial Transaction Processing 0.18790
## IndustryFood & Beverage Manufacturing 0.01857 *
## IndustryGambling 0.79323
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.35417
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.99866
## IndustryHealth, Beauty, & Fitness NA
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.90991
## IndustryInsurance Carriers NA
## IndustryInternet 0.59377
## IndustryInvestment Banking & Asset Management 0.04430 *
## IndustryIT Services NA
## IndustryK-12 Education 0.59988
## IndustryLegal 0.97758
## IndustryLending 0.59313
## IndustryLogistics & Supply Chain 0.45968
## IndustryMembership Organizations 0.91196
## IndustryMetals Brokers NA
## IndustryMunicipal Governments 0.72771
## IndustryNews Outlet 0.04108 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.03499 *
## IndustryPreschool & Child Care NA
## IndustryPublishing 0.96957
## IndustryReal Estate NA
## IndustryResearch & Development 0.28762
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores 0.53113
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.12612
## IndustryState & Regional Agencies NA
## IndustryStock Exchanges 0.24843
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.43021
## IndustryVehicle Dealers NA
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## Rating 0.08739 .
## LocationAlameda, CA 0.31846
## LocationAllegheny West, PA 0.36377
## LocationAllen, TX 0.34629
## LocationAmerican Fork, UT 0.83454
## LocationAnaheim, CA 0.52757
## LocationArcadia, CA 0.19688
## LocationArlington Heights, IL 0.06949 .
## LocationArlington, TX 0.19953
## LocationAthens, GA 0.90796
## LocationAurora, CO 0.99335
## LocationAustin, TX 0.66149
## LocationAzusa, CA 0.08694 .
## LocationBellevue, WA 0.48917
## LocationBensalem, PA 0.50790
## LocationBerkeley Heights, NJ 0.98669
## LocationBerwyn, PA 0.98468
## LocationBlue Bell, PA 0.28065
## LocationBoothwyn, PA 0.90870
## LocationBoulder, CO 0.11748
## LocationBrea, CA 0.55336
## LocationBridgeview, IL 0.02007 *
## LocationBroadview, IL 0.53067
## LocationBronx, NY 0.31509
## LocationBrooklyn, NY 0.18178
## LocationBroomfield, CO 0.35427
## LocationBurbank, CA 0.70243
## LocationBurlingame, CA 0.14878
## LocationBurlingame, KS 0.54673
## LocationCamden, NJ 0.31353
## LocationCarmel, IN 0.64091
## LocationCentennial, CO 0.43988
## LocationCerritos, CA 0.41385
## LocationChandler, AZ 0.26497
## LocationCharlotte, NC 0.04669 *
## LocationChesapeake, VA NA
## LocationChicago, IL 0.04451 *
## LocationColumbus, OH 0.86518
## LocationConshohocken, PA 0.98011
## LocationCoppell, TX 0.22708
## LocationCulver City, CA 0.52982
## LocationCupertino, CA 0.12377
## LocationDallas, TX 0.50601
## LocationDaly City, CA 0.06811 .
## LocationDC Ranch, AZ 0.25624
## LocationDenver, CO 0.43494
## LocationDowners Grove, IL 0.10454
## LocationDoylestown, PA NA
## LocationDraper, UT 0.84398
## LocationDublin, OH 0.90395
## LocationEl Cajon, CA NA
## LocationEl Segundo, CA 0.68726
## LocationElk Grove Village, IL 0.09071 .
## LocationEnglewood, CO 0.57702
## LocationEssex Fells, NJ 0.96102
## LocationExton, PA 0.52936
## LocationFeasterville Trevose, PA 0.18685
## LocationFlorham Park, NJ 0.18215
## LocationFort Eustis, VA 0.59528
## LocationFort Lee, NJ 0.30757
## LocationFort Mill, SC 0.19056
## LocationFort Worth, TX 0.21096
## LocationFoster City, CA 0.33971
## LocationFranklin Lakes, NJ 0.90218
## LocationFremont, CA 0.76897
## LocationGainesville, FL 0.99252
## LocationGlendale, AZ 0.08041 .
## LocationGlendale, CA 0.21823
## LocationGlenview, IL 0.40610
## LocationGrapevine, TX 0.59841
## LocationGreenwood Village, Arapahoe, CO 0.93647
## LocationHampton, VA 0.44905
## LocationHanford, CA 0.21445
## LocationHarrison, NY 0.12734
## LocationHaworth, NJ 0.04815 *
## LocationHercules, CA 0.88915
## LocationHoboken, NJ 0.43507
## LocationHorsham, PA 0.27043
## LocationHouston, TX 0.60391
## LocationHuntersville, NC 0.06177 .
## LocationIndian Trail, NC 0.02421 *
## LocationIndianapolis, IN 0.63411
## LocationIrving, TX 0.13925
## LocationIrwindale, CA 0.63506
## LocationItasca, IL 0.03294 *
## LocationJacksonville, FL 0.31157
## LocationJeffersonville, IN 0.81780
## LocationJersey City, NJ 0.22973
## LocationKent, WA 0.59545
## LocationKing of Prussia, PA 0.32561
## LocationKirkland, WA 0.43023
## LocationLackland AFB, TX 0.10506
## LocationLake Success, NY 0.23645
## LocationLakewood, CO 0.39394
## LocationLehi, UT 0.63812
## LocationLewisville, TX 0.54283
## LocationLittle Ferry, NJ 0.32085
## LocationLong Beach, CA 0.39514
## LocationLong Island City, NY 0.12819
## LocationLos Angeles, CA 0.94218
## LocationLos Gatos, CA 0.37429
## LocationLouisville, CO 0.96431
## LocationMalvern, PA 0.47201
## LocationMarin City, CA 0.07869 .
## LocationMarlton, NJ 0.38066
## LocationMenlo Park, CA 0.15849
## LocationMesa, AZ 0.45434
## LocationMillbrae, CA 0.77690
## LocationMilpitas, CA 0.01961 *
## LocationMontvale, NJ 0.09807 .
## LocationMoorestown, NJ 0.12407
## LocationMooresville, NC 0.36176
## LocationMount Laurel, NJ 0.95113
## LocationMountain View, CA 0.17203
## LocationNew York, NY 0.18344
## LocationNewark, CA 0.52735
## LocationNewark, NJ 0.21017
## LocationNewport News, VA 0.46244
## LocationNorfolk, VA 0.84269
## LocationNorthbrook, IL 0.08069 .
## LocationNorthlake, IL NA
## LocationNorthridge, CA 0.62122
## LocationNovato, CA 0.64855
## LocationOak Brook, IL NA
## LocationOakland, CA 0.16044
## LocationPalo Alto, CA 0.26287
## LocationPaoli, PA 0.97097
## LocationPasadena, CA 0.37063
## LocationPasadena, TX 0.24604
## LocationPearland, TX 0.68797
## LocationPhiladelphia, PA 0.47396
## LocationPhoenix, AZ 0.17399
## LocationPlano, TX 0.30386
## LocationPleasanton, CA 0.15442
## LocationPlymouth Meeting, PA 0.91454
## LocationPortsmouth, VA 0.85978
## LocationRedmond, WA 0.89254
## LocationRedwood City, CA 0.29176
## LocationRenton, WA 0.46709
## LocationRichardson, TX 0.18375
## LocationRiverton, UT 0.81493
## LocationRolling Meadows, IL 0.03918 *
## LocationRound Rock, TX 0.61593
## LocationSalt Lake City, UT 0.78433
## LocationSan Antonio, TX 0.08885 .
## LocationSan Diego, CA 0.73877
## LocationSan Francisco, CA 0.20166
## LocationSan Jose, CA 0.14204
## LocationSan Mateo, CA 0.38981
## LocationSan Rafael, CA 0.31846
## LocationSan Ramon, CA 0.18441
## LocationSanta Clara, CA 0.45236
## LocationSanta Monica, CA 0.64735
## LocationScottsdale, AZ 0.04884 *
## LocationSeattle, WA 0.98182
## LocationSouth San Francisco, CA 0.23344
## LocationSouthlake, TX 0.83338
## LocationSpring, TX 0.71268
## LocationStafford, TX 0.66966
## LocationSugar Land, TX 0.64820
## LocationSummit, NJ 0.62283
## LocationSunnyvale, CA 0.15202
## LocationTarrant, TX 0.13100
## LocationTempe, AZ 0.50398
## LocationTopeka, KS 0.55679
## LocationTorrance, CA 0.89449
## LocationVirginia Beach, VA 0.40718
## LocationVisalia, CA NA
## LocationWalnut Creek, CA 0.37304
## LocationWayne, PA 0.73750
## LocationWeehawken, NJ 0.17847
## LocationWest Chester, PA 0.91699
## LocationWest Jordan, UT 0.29622
## LocationWesterville, OH 0.19462
## LocationWestlake, TX 0.22338
## LocationWhippany, NJ 0.44426
## LocationWhittier, CA 0.26247
## LocationWilmington, DE 0.21380
## LocationWoodbridge, NJ 0.41910
## LocationWoodland Hills, CA 0.59240
## LocationWoodridge, IL 0.30555
## LocationYorktown, VA 0.71330
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13130 on 840 degrees of freedom
## Multiple R-squared: 0.421, Adjusted R-squared: 0.2542
## F-statistic: 2.524 on 242 and 840 DF, p-value: < 2.2e-16
anova(lm5)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.6405 0.03225 *
## Industry 44 1.0802e+10 245496911 1.4242 0.03843 *
## Rating 1 1.9421e+08 194208672 1.1267 0.28880
## Location 175 8.8054e+10 503168168 2.9190 < 2e-16 ***
## Residuals 840 1.4480e+11 172376345
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Linear Regression: Average Salary explained by Sector, Industry Type, Job Rating, Location and Maximum Revenue
#Slight Drop in Adjusted R-squared: 0.2535, p-value: < 2.2e-16 remains the same, will drop maximum revenue.
lm6 <- lm(average_salary ~ Sector + Industry + Rating + Location + maximum_revenue, data = salaries_df2)
summary(lm6)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry + Rating + Location +
## maximum_revenue, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36766 -7435 0 8779 31084
##
## Coefficients: (28 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 3.893e+04 1.375e+04 2.831
## SectorAerospace & Defense 6.645e+03 5.984e+03 1.110
## SectorArts, Entertainment & Recreation -5.900e+03 1.008e+04 -0.585
## SectorBiotech & Pharmaceuticals -2.329e+03 5.378e+03 -0.433
## SectorBusiness Services -1.282e+04 7.570e+03 -1.694
## SectorConstruction, Repair & Maintenance -2.526e+04 1.348e+04 -1.875
## SectorConsumer Services -4.873e+03 6.386e+03 -0.763
## SectorEducation 2.116e+04 1.888e+04 1.121
## SectorFinance 1.305e+04 7.682e+03 1.699
## SectorGovernment -1.420e+04 1.003e+04 -1.416
## SectorHealth Care -4.148e+02 3.396e+03 -0.122
## SectorInformation Technology -2.035e+03 2.940e+03 -0.692
## SectorInsurance -1.309e+03 4.921e+03 -0.266
## SectorManufacturing 3.143e+03 1.068e+04 0.294
## SectorMedia -2.555e+03 6.121e+03 -0.417
## SectorMining & Metals -1.241e+03 1.887e+04 -0.066
## SectorNon-Profit -1.888e+03 4.408e+03 -0.428
## SectorOil, Gas, Energy & Utilities -3.983e+03 8.632e+03 -0.461
## SectorReal Estate 1.704e+04 9.756e+03 1.747
## SectorRestaurants, Bars & Food Services 3.342e+03 1.328e+04 0.252
## SectorRetail -2.253e+03 1.889e+04 -0.119
## SectorTelecommunications -1.523e+03 7.059e+03 -0.216
## SectorTransportation & Logistics -7.169e+03 1.003e+04 -0.715
## IndustryAdvertising & Marketing 1.057e+04 7.460e+03 1.417
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 2.173e+04 9.283e+03 2.341
## IndustryAutomotive Parts & Accessories Stores 1.130e+04 2.298e+04 0.492
## IndustryBanks & Credit Unions -1.528e+04 8.056e+03 -1.897
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -1.221e+04 1.185e+04 -1.030
## IndustryBuilding & Personnel Services 6.622e+02 1.996e+04 0.033
## IndustryCable, Internet & Telephone Providers -8.938e+03 1.266e+04 -0.706
## IndustryCasual Restaurants -6.350e+03 1.435e+04 -0.442
## IndustryCatering & Food Service Contractors 1.315e+04 2.276e+04 0.578
## IndustryColleges & Universities -2.405e+04 1.964e+04 -1.224
## IndustryCommercial Equipment Repair & Maintenance 2.322e+04 1.715e+04 1.354
## IndustryComputer Hardware & Software -6.751e+02 1.995e+03 -0.338
## IndustryConstruction 4.136e+04 1.467e+04 2.819
## IndustryConsulting 1.106e+04 7.232e+03 1.529
## IndustryConsumer Products Manufacturing 5.699e+03 1.180e+04 0.483
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -2.860e+04 2.638e+04 -1.084
## IndustryEducation Training Services -2.787e+04 2.032e+04 -1.371
## IndustryElectrical & Electronic Manufacturing 1.419e+04 1.397e+04 1.016
## IndustryEnergy 9.939e+03 1.183e+04 0.840
## IndustryEnterprise Software & Network Solutions -2.225e+03 2.517e+03 -0.884
## IndustryFederal Agencies 6.331e+03 1.189e+04 0.533
## IndustryFinancial Analytics & Research -1.077e+04 1.521e+04 -0.708
## IndustryFinancial Transaction Processing -1.185e+04 8.986e+03 -1.319
## IndustryFood & Beverage Manufacturing -3.952e+04 1.705e+04 -2.318
## IndustryGambling 5.559e+03 2.107e+04 0.264
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 1.206e+04 1.316e+04 0.916
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations -1.574e+02 1.358e+04 -0.012
## IndustryHealth, Beauty, & Fitness NA NA NA
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -1.662e+03 9.392e+03 -0.177
## IndustryInsurance Carriers NA NA NA
## IndustryInternet 2.162e+03 3.498e+03 0.618
## IndustryInvestment Banking & Asset Management -1.556e+04 7.821e+03 -1.990
## IndustryIT Services NA NA NA
## IndustryK-12 Education -1.105e+04 2.092e+04 -0.528
## IndustryLegal 3.042e+02 8.124e+03 0.037
## IndustryLending -4.753e+03 8.826e+03 -0.539
## IndustryLogistics & Supply Chain 8.217e+03 1.072e+04 0.767
## IndustryMembership Organizations 1.046e+03 1.001e+04 0.104
## IndustryMetals Brokers NA NA NA
## IndustryMunicipal Governments 4.207e+03 1.238e+04 0.340
## IndustryNews Outlet 2.917e+04 1.421e+04 2.053
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 3.892e+04 1.858e+04 2.094
## IndustryPreschool & Child Care NA NA NA
## IndustryPublishing -9.277e+01 1.244e+04 -0.007
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 1.252e+04 1.180e+04 1.061
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores 1.403e+04 2.293e+04 0.612
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 1.091e+04 7.123e+03 1.532
## IndustryState & Regional Agencies NA NA NA
## IndustryStock Exchanges -1.770e+04 1.511e+04 -1.172
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 9.430e+03 1.201e+04 0.785
## IndustryVehicle Dealers NA NA NA
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## Rating 1.055e+03 6.273e+02 1.681
## LocationAlameda, CA 1.869e+04 1.872e+04 0.999
## LocationAllegheny West, PA 1.482e+04 1.628e+04 0.910
## LocationAllen, TX 1.444e+04 1.534e+04 0.941
## LocationAmerican Fork, UT -3.876e+03 1.870e+04 -0.207
## LocationAnaheim, CA 1.417e+04 2.177e+04 0.651
## LocationArcadia, CA -2.086e+04 1.618e+04 -1.289
## LocationArlington Heights, IL 3.435e+04 1.888e+04 1.819
## LocationArlington, TX 2.059e+04 1.609e+04 1.280
## LocationAthens, GA 1.842e+03 1.534e+04 0.120
## LocationAurora, CO -1.034e+02 1.870e+04 -0.006
## LocationAustin, TX 5.886e+03 1.349e+04 0.436
## LocationAzusa, CA 3.214e+04 1.875e+04 1.714
## LocationBellevue, WA 1.296e+04 1.883e+04 0.688
## LocationBensalem, PA 1.241e+04 1.870e+04 0.664
## LocationBerkeley Heights, NJ 1.519e+02 1.925e+04 0.008
## LocationBerwyn, PA -4.283e+02 1.871e+04 -0.023
## LocationBlue Bell, PA 2.054e+04 1.923e+04 1.068
## LocationBoothwyn, PA -2.147e+03 1.871e+04 -0.115
## LocationBoulder, CO 2.398e+04 1.533e+04 1.564
## LocationBrea, CA -9.724e+03 1.663e+04 -0.585
## LocationBridgeview, IL 5.304e+04 2.311e+04 2.295
## LocationBroadview, IL 1.195e+04 1.955e+04 0.611
## LocationBronx, NY 1.905e+04 1.898e+04 1.003
## LocationBrooklyn, NY 1.985e+04 1.487e+04 1.335
## LocationBroomfield, CO 1.504e+04 1.623e+04 0.927
## LocationBurbank, CA 5.534e+03 1.453e+04 0.381
## LocationBurlingame, CA 2.274e+04 1.573e+04 1.446
## LocationBurlingame, KS 1.127e+04 1.876e+04 0.601
## LocationCamden, NJ 1.885e+04 1.871e+04 1.008
## LocationCarmel, IN 8.000e+03 1.694e+04 0.472
## LocationCentennial, CO 1.119e+04 1.455e+04 0.769
## LocationCerritos, CA 1.329e+04 1.623e+04 0.819
## LocationChandler, AZ 1.656e+04 1.486e+04 1.114
## LocationCharlotte, NC 2.685e+04 1.344e+04 1.998
## LocationChesapeake, VA NA NA NA
## LocationChicago, IL 2.701e+04 1.339e+04 2.018
## LocationColumbus, OH -2.368e+03 1.394e+04 -0.170
## LocationConshohocken, PA -5.338e+02 1.871e+04 -0.029
## LocationCoppell, TX 2.263e+04 1.870e+04 1.210
## LocationCulver City, CA -1.175e+04 1.871e+04 -0.628
## LocationCupertino, CA 2.187e+04 1.401e+04 1.561
## LocationDallas, TX 9.076e+03 1.355e+04 0.670
## LocationDaly City, CA 3.419e+04 1.872e+04 1.827
## LocationDC Ranch, AZ 2.127e+04 1.876e+04 1.134
## LocationDenver, CO 1.062e+04 1.354e+04 0.784
## LocationDowners Grove, IL 2.327e+04 1.422e+04 1.637
## LocationDoylestown, PA NA NA NA
## LocationDraper, UT -3.437e+03 1.877e+04 -0.183
## LocationDublin, OH -1.901e+03 1.624e+04 -0.117
## LocationEl Cajon, CA NA NA NA
## LocationEl Segundo, CA 5.821e+03 1.437e+04 0.405
## LocationElk Grove Village, IL 3.372e+04 1.996e+04 1.689
## LocationEnglewood, CO 9.056e+03 1.625e+04 0.557
## LocationEssex Fells, NJ -1.013e+03 1.898e+04 -0.053
## LocationExton, PA 1.182e+04 1.875e+04 0.631
## LocationFeasterville Trevose, PA 2.257e+04 1.709e+04 1.320
## LocationFlorham Park, NJ 2.175e+04 1.637e+04 1.328
## LocationFort Eustis, VA -9.941e+03 1.875e+04 -0.530
## LocationFort Lee, NJ 1.933e+04 1.905e+04 1.014
## LocationFort Mill, SC 2.441e+04 1.871e+04 1.305
## LocationFort Worth, TX 1.784e+04 1.407e+04 1.268
## LocationFoster City, CA 1.420e+04 1.489e+04 0.954
## LocationFranklin Lakes, NJ -2.244e+03 1.870e+04 -0.120
## LocationFremont, CA 4.932e+03 1.647e+04 0.300
## LocationGainesville, FL 7.887e+01 1.431e+04 0.006
## LocationGlendale, AZ 3.328e+04 1.905e+04 1.747
## LocationGlendale, CA 1.877e+04 1.523e+04 1.233
## LocationGlenview, IL 1.828e+04 2.135e+04 0.856
## LocationGrapevine, TX 9.271e+03 1.702e+04 0.545
## LocationGreenwood Village, Arapahoe, CO -9.006e+02 1.454e+04 -0.062
## LocationHampton, VA 1.047e+04 1.380e+04 0.759
## LocationHanford, CA 2.349e+04 1.898e+04 1.237
## LocationHarrison, NY 2.885e+04 1.888e+04 1.528
## LocationHaworth, NJ 3.210e+04 1.623e+04 1.977
## LocationHercules, CA 3.152e+03 1.925e+04 0.164
## LocationHoboken, NJ 1.461e+04 1.871e+04 0.781
## LocationHorsham, PA 1.642e+04 1.492e+04 1.100
## LocationHouston, TX 6.988e+03 1.343e+04 0.520
## LocationHuntersville, NC 2.877e+04 1.510e+04 1.906
## LocationIndian Trail, NC 5.189e+04 2.300e+04 2.255
## LocationIndianapolis, IN 6.585e+03 1.372e+04 0.480
## LocationIrving, TX 2.035e+04 1.369e+04 1.486
## LocationIrwindale, CA -7.884e+03 1.654e+04 -0.477
## LocationItasca, IL 4.019e+04 1.882e+04 2.135
## LocationJacksonville, FL 1.422e+04 1.401e+04 1.015
## LocationJeffersonville, IN 5.042e+03 1.950e+04 0.259
## LocationJersey City, NJ 1.653e+04 1.374e+04 1.203
## LocationKent, WA -8.250e+03 1.541e+04 -0.535
## LocationKing of Prussia, PA 1.506e+04 1.533e+04 0.982
## LocationKirkland, WA -1.277e+04 1.622e+04 -0.787
## LocationLackland AFB, TX 3.142e+04 1.942e+04 1.618
## LocationLake Success, NY 1.712e+04 1.444e+04 1.185
## LocationLakewood, CO 1.319e+04 1.555e+04 0.848
## LocationLehi, UT -7.995e+03 1.703e+04 -0.469
## LocationLewisville, TX 1.235e+04 1.957e+04 0.631
## LocationLittle Ferry, NJ 1.864e+04 1.875e+04 0.994
## LocationLong Beach, CA 1.362e+04 1.595e+04 0.854
## LocationLong Island City, NY 2.880e+04 1.898e+04 1.517
## LocationLos Angeles, CA -9.010e+02 1.354e+04 -0.067
## LocationLos Gatos, CA 1.521e+04 1.608e+04 0.946
## LocationLouisville, CO 6.766e+02 1.579e+04 0.043
## LocationMalvern, PA 1.105e+04 1.533e+04 0.721
## LocationMarin City, CA 3.274e+04 1.859e+04 1.761
## LocationMarlton, NJ 1.444e+04 1.652e+04 0.874
## LocationMenlo Park, CA 2.080e+04 1.455e+04 1.430
## LocationMesa, AZ -1.416e+04 1.883e+04 -0.752
## LocationMillbrae, CA -5.758e+03 2.054e+04 -0.280
## LocationMilpitas, CA 3.474e+04 1.487e+04 2.337
## LocationMontvale, NJ 3.128e+04 1.871e+04 1.672
## LocationMoorestown, NJ 2.909e+04 1.888e+04 1.540
## LocationMooresville, NC 1.715e+04 1.882e+04 0.912
## LocationMount Laurel, NJ -1.062e+03 1.652e+04 -0.064
## LocationMountain View, CA 1.941e+04 1.417e+04 1.370
## LocationNew York, NY 1.774e+04 1.330e+04 1.334
## LocationNewark, CA 1.026e+04 1.626e+04 0.631
## LocationNewark, NJ 2.070e+04 1.647e+04 1.257
## LocationNewport News, VA 1.391e+04 1.889e+04 0.736
## LocationNorfolk, VA 2.740e+03 1.450e+04 0.189
## LocationNorthbrook, IL 2.840e+04 1.622e+04 1.751
## LocationNorthlake, IL NA NA NA
## LocationNorthridge, CA -9.762e+03 1.923e+04 -0.508
## LocationNovato, CA 9.014e+03 1.944e+04 0.464
## LocationOak Brook, IL NA NA NA
## LocationOakland, CA 2.086e+04 1.484e+04 1.405
## LocationPalo Alto, CA 1.579e+04 1.414e+04 1.117
## LocationPaoli, PA -7.447e+02 1.871e+04 -0.040
## LocationPasadena, CA 1.401e+04 1.546e+04 0.906
## LocationPasadena, TX 2.170e+04 1.871e+04 1.159
## LocationPearland, TX 5.857e+03 1.439e+04 0.407
## LocationPhiladelphia, PA 9.701e+03 1.348e+04 0.720
## LocationPhoenix, AZ 1.860e+04 1.369e+04 1.359
## LocationPlano, TX 1.457e+04 1.386e+04 1.051
## LocationPleasanton, CA 2.152e+04 1.507e+04 1.428
## LocationPlymouth Meeting, PA -2.041e+03 1.877e+04 -0.109
## LocationPortsmouth, VA 2.993e+03 1.618e+04 0.185
## LocationRedmond, WA -2.045e+03 1.488e+04 -0.137
## LocationRedwood City, CA 1.470e+04 1.399e+04 1.051
## LocationRenton, WA -1.366e+04 1.871e+04 -0.730
## LocationRichardson, TX 1.868e+04 1.404e+04 1.330
## LocationRiverton, UT -4.365e+03 1.875e+04 -0.233
## LocationRolling Meadows, IL 3.928e+04 1.905e+04 2.062
## LocationRound Rock, TX 8.156e+03 1.622e+04 0.503
## LocationSalt Lake City, UT -3.887e+03 1.401e+04 -0.277
## LocationSan Antonio, TX 2.313e+04 1.355e+04 1.707
## LocationSan Diego, CA 4.702e+03 1.358e+04 0.346
## LocationSan Francisco, CA 1.721e+04 1.340e+04 1.284
## LocationSan Jose, CA 1.997e+04 1.354e+04 1.474
## LocationSan Mateo, CA 1.221e+04 1.406e+04 0.868
## LocationSan Rafael, CA 1.869e+04 1.872e+04 0.999
## LocationSan Ramon, CA 2.158e+04 1.623e+04 1.330
## LocationSanta Clara, CA 1.095e+04 1.452e+04 0.754
## LocationSanta Monica, CA 7.892e+03 1.709e+04 0.462
## LocationScottsdale, AZ 2.857e+04 1.450e+04 1.971
## LocationSeattle, WA 2.874e+02 1.370e+04 0.021
## LocationSouth San Francisco, CA 1.939e+04 1.622e+04 1.195
## LocationSouthlake, TX 4.138e+03 1.974e+04 0.210
## LocationSpring, TX 6.830e+03 1.871e+04 0.365
## LocationStafford, TX -7.934e+03 1.870e+04 -0.424
## LocationSugar Land, TX 7.401e+03 1.633e+04 0.453
## LocationSummit, NJ 9.243e+03 1.875e+04 0.493
## LocationSunnyvale, CA 2.037e+04 1.423e+04 1.431
## LocationTarrant, TX 3.058e+04 2.023e+04 1.512
## LocationTempe, AZ 9.352e+03 1.394e+04 0.671
## LocationTopeka, KS 1.109e+04 1.870e+04 0.593
## LocationTorrance, CA 2.503e+03 2.298e+04 0.109
## LocationVirginia Beach, VA 1.556e+04 1.875e+04 0.830
## LocationVisalia, CA NA NA NA
## LocationWalnut Creek, CA 1.491e+04 1.649e+04 0.905
## LocationWayne, PA 5.182e+03 1.509e+04 0.343
## LocationWeehawken, NJ 2.182e+04 1.622e+04 1.346
## LocationWest Chester, PA 1.857e+03 2.038e+04 0.091
## LocationWest Jordan, UT -2.188e+04 2.095e+04 -1.045
## LocationWesterville, OH 2.424e+04 1.872e+04 1.295
## LocationWestlake, TX 2.281e+04 1.870e+04 1.220
## LocationWhippany, NJ 1.437e+04 1.870e+04 0.768
## LocationWhittier, CA -2.052e+04 1.859e+04 -1.104
## LocationWilmington, DE 1.810e+04 1.455e+04 1.245
## LocationWoodbridge, NJ 1.479e+04 1.908e+04 0.775
## LocationWoodland Hills, CA -8.061e+03 1.533e+04 -0.526
## LocationWoodridge, IL 1.926e+04 1.884e+04 1.022
## LocationYorktown, VA 7.049e+03 1.942e+04 0.363
## maximum_revenue -1.475e-07 2.836e-07 -0.520
## Pr(>|t|)
## (Intercept) 0.00476 **
## SectorAerospace & Defense 0.26713
## SectorArts, Entertainment & Recreation 0.55854
## SectorBiotech & Pharmaceuticals 0.66503
## SectorBusiness Services 0.09072 .
## SectorConstruction, Repair & Maintenance 0.06117 .
## SectorConsumer Services 0.44564
## SectorEducation 0.26268
## SectorFinance 0.08961 .
## SectorGovernment 0.15705
## SectorHealth Care 0.90280
## SectorInformation Technology 0.48901
## SectorInsurance 0.79027
## SectorManufacturing 0.76868
## SectorMedia 0.67642
## SectorMining & Metals 0.94758
## SectorNon-Profit 0.66862
## SectorOil, Gas, Energy & Utilities 0.64462
## SectorReal Estate 0.08104 .
## SectorRestaurants, Bars & Food Services 0.80135
## SectorRetail 0.90512
## SectorTelecommunications 0.82923
## SectorTransportation & Logistics 0.47501
## IndustryAdvertising & Marketing 0.15697
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.01948 *
## IndustryAutomotive Parts & Accessories Stores 0.62300
## IndustryBanks & Credit Unions 0.05816 .
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.30318
## IndustryBuilding & Personnel Services 0.97355
## IndustryCable, Internet & Telephone Providers 0.48036
## IndustryCasual Restaurants 0.65824
## IndustryCatering & Food Service Contractors 0.56341
## IndustryColleges & Universities 0.22123
## IndustryCommercial Equipment Repair & Maintenance 0.17617
## IndustryComputer Hardware & Software 0.73520
## IndustryConstruction 0.00493 **
## IndustryConsulting 0.12655
## IndustryConsumer Products Manufacturing 0.62927
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.27866
## IndustryEducation Training Services 0.17064
## IndustryElectrical & Electronic Manufacturing 0.31002
## IndustryEnergy 0.40119
## IndustryEnterprise Software & Network Solutions 0.37694
## IndustryFederal Agencies 0.59443
## IndustryFinancial Analytics & Research 0.47898
## IndustryFinancial Transaction Processing 0.18752
## IndustryFood & Beverage Manufacturing 0.02069 *
## IndustryGambling 0.79194
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.35975
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.99076
## IndustryHealth, Beauty, & Fitness NA
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.85955
## IndustryInsurance Carriers NA
## IndustryInternet 0.53663
## IndustryInvestment Banking & Asset Management 0.04695 *
## IndustryIT Services NA
## IndustryK-12 Education 0.59761
## IndustryLegal 0.97014
## IndustryLending 0.59036
## IndustryLogistics & Supply Chain 0.44348
## IndustryMembership Organizations 0.91681
## IndustryMetals Brokers NA
## IndustryMunicipal Governments 0.73399
## IndustryNews Outlet 0.04040 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.03656 *
## IndustryPreschool & Child Care NA
## IndustryPublishing 0.99405
## IndustryReal Estate NA
## IndustryResearch & Development 0.28914
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores 0.54072
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.12579
## IndustryState & Regional Agencies NA
## IndustryStock Exchanges 0.24162
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.43267
## IndustryVehicle Dealers NA
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## Rating 0.09309 .
## LocationAlameda, CA 0.31825
## LocationAllegheny West, PA 0.36308
## LocationAllen, TX 0.34683
## LocationAmerican Fork, UT 0.83583
## LocationAnaheim, CA 0.51538
## LocationArcadia, CA 0.19759
## LocationArlington Heights, IL 0.06929 .
## LocationArlington, TX 0.20082
## LocationAthens, GA 0.90442
## LocationAurora, CO 0.99559
## LocationAustin, TX 0.66274
## LocationAzusa, CA 0.08684 .
## LocationBellevue, WA 0.49149
## LocationBensalem, PA 0.50696
## LocationBerkeley Heights, NJ 0.99370
## LocationBerwyn, PA 0.98174
## LocationBlue Bell, PA 0.28582
## LocationBoothwyn, PA 0.90863
## LocationBoulder, CO 0.11819
## LocationBrea, CA 0.55898
## LocationBridgeview, IL 0.02198 *
## LocationBroadview, IL 0.54107
## LocationBronx, NY 0.31596
## LocationBrooklyn, NY 0.18231
## LocationBroomfield, CO 0.35445
## LocationBurbank, CA 0.70346
## LocationBurlingame, CA 0.14856
## LocationBurlingame, KS 0.54830
## LocationCamden, NJ 0.31381
## LocationCarmel, IN 0.63692
## LocationCentennial, CO 0.44217
## LocationCerritos, CA 0.41305
## LocationChandler, AZ 0.26555
## LocationCharlotte, NC 0.04603 *
## LocationChesapeake, VA NA
## LocationChicago, IL 0.04393 *
## LocationColumbus, OH 0.86517
## LocationConshohocken, PA 0.97724
## LocationCoppell, TX 0.22645
## LocationCulver City, CA 0.52997
## LocationCupertino, CA 0.11884
## LocationDallas, TX 0.50300
## LocationDaly City, CA 0.06810 .
## LocationDC Ranch, AZ 0.25733
## LocationDenver, CO 0.43319
## LocationDowners Grove, IL 0.10209
## LocationDoylestown, PA NA
## LocationDraper, UT 0.85475
## LocationDublin, OH 0.90682
## LocationEl Cajon, CA NA
## LocationEl Segundo, CA 0.68562
## LocationElk Grove Village, IL 0.09152 .
## LocationEnglewood, CO 0.57744
## LocationEssex Fells, NJ 0.95747
## LocationExton, PA 0.52850
## LocationFeasterville Trevose, PA 0.18713
## LocationFlorham Park, NJ 0.18444
## LocationFort Eustis, VA 0.59610
## LocationFort Lee, NJ 0.31065
## LocationFort Mill, SC 0.19234
## LocationFort Worth, TX 0.20510
## LocationFoster City, CA 0.34051
## LocationFranklin Lakes, NJ 0.90456
## LocationFremont, CA 0.76459
## LocationGainesville, FL 0.99560
## LocationGlendale, AZ 0.08102 .
## LocationGlendale, CA 0.21807
## LocationGlenview, IL 0.39207
## LocationGrapevine, TX 0.58616
## LocationGreenwood Village, Arapahoe, CO 0.95064
## LocationHampton, VA 0.44802
## LocationHanford, CA 0.21632
## LocationHarrison, NY 0.12699
## LocationHaworth, NJ 0.04834 *
## LocationHercules, CA 0.86996
## LocationHoboken, NJ 0.43497
## LocationHorsham, PA 0.27147
## LocationHouston, TX 0.60292
## LocationHuntersville, NC 0.05701 .
## LocationIndian Trail, NC 0.02436 *
## LocationIndianapolis, IN 0.63144
## LocationIrving, TX 0.13756
## LocationIrwindale, CA 0.63373
## LocationItasca, IL 0.03306 *
## LocationJacksonville, FL 0.31023
## LocationJeffersonville, IN 0.79604
## LocationJersey City, NJ 0.22913
## LocationKent, WA 0.59263
## LocationKing of Prussia, PA 0.32619
## LocationKirkland, WA 0.43127
## LocationLackland AFB, TX 0.10600
## LocationLake Success, NY 0.23622
## LocationLakewood, CO 0.39655
## LocationLehi, UT 0.63888
## LocationLewisville, TX 0.52817
## LocationLittle Ferry, NJ 0.32042
## LocationLong Beach, CA 0.39330
## LocationLong Island City, NY 0.12967
## LocationLos Angeles, CA 0.94696
## LocationLos Gatos, CA 0.34460
## LocationLouisville, CO 0.96584
## LocationMalvern, PA 0.47131
## LocationMarin City, CA 0.07863 .
## LocationMarlton, NJ 0.38251
## LocationMenlo Park, CA 0.15311
## LocationMesa, AZ 0.45233
## LocationMillbrae, CA 0.77931
## LocationMilpitas, CA 0.01968 *
## LocationMontvale, NJ 0.09487 .
## LocationMoorestown, NJ 0.12386
## LocationMooresville, NC 0.36219
## LocationMount Laurel, NJ 0.94875
## LocationMountain View, CA 0.17091
## LocationNew York, NY 0.18264
## LocationNewark, CA 0.52828
## LocationNewark, NJ 0.20901
## LocationNewport News, VA 0.46178
## LocationNorfolk, VA 0.85024
## LocationNorthbrook, IL 0.08025 .
## LocationNorthlake, IL NA
## LocationNorthridge, CA 0.61188
## LocationNovato, CA 0.64308
## LocationOak Brook, IL NA
## LocationOakland, CA 0.16035
## LocationPalo Alto, CA 0.26438
## LocationPaoli, PA 0.96826
## LocationPasadena, CA 0.36515
## LocationPasadena, TX 0.24659
## LocationPearland, TX 0.68410
## LocationPhiladelphia, PA 0.47175
## LocationPhoenix, AZ 0.17458
## LocationPlano, TX 0.29356
## LocationPleasanton, CA 0.15380
## LocationPlymouth Meeting, PA 0.91342
## LocationPortsmouth, VA 0.85325
## LocationRedmond, WA 0.89070
## LocationRedwood City, CA 0.29359
## LocationRenton, WA 0.46554
## LocationRichardson, TX 0.18372
## LocationRiverton, UT 0.81595
## LocationRolling Meadows, IL 0.03953 *
## LocationRound Rock, TX 0.61518
## LocationSalt Lake City, UT 0.78149
## LocationSan Antonio, TX 0.08825 .
## LocationSan Diego, CA 0.72932
## LocationSan Francisco, CA 0.19966
## LocationSan Jose, CA 0.14081
## LocationSan Mateo, CA 0.38540
## LocationSan Rafael, CA 0.31825
## LocationSan Ramon, CA 0.18397
## LocationSanta Clara, CA 0.45085
## LocationSanta Monica, CA 0.64431
## LocationScottsdale, AZ 0.04910 *
## LocationSeattle, WA 0.98327
## LocationSouth San Francisco, CA 0.23224
## LocationSouthlake, TX 0.83405
## LocationSpring, TX 0.71524
## LocationStafford, TX 0.67148
## LocationSugar Land, TX 0.65058
## LocationSummit, NJ 0.62211
## LocationSunnyvale, CA 0.15283
## LocationTarrant, TX 0.13098
## LocationTempe, AZ 0.50238
## LocationTopeka, KS 0.55336
## LocationTorrance, CA 0.91328
## LocationVirginia Beach, VA 0.40691
## LocationVisalia, CA NA
## LocationWalnut Creek, CA 0.36595
## LocationWayne, PA 0.73142
## LocationWeehawken, NJ 0.17880
## LocationWest Chester, PA 0.92741
## LocationWest Jordan, UT 0.29653
## LocationWesterville, OH 0.19564
## LocationWestlake, TX 0.22281
## LocationWhippany, NJ 0.44253
## LocationWhittier, CA 0.26984
## LocationWilmington, DE 0.21364
## LocationWoodbridge, NJ 0.43849
## LocationWoodland Hills, CA 0.59910
## LocationWoodridge, IL 0.30686
## LocationYorktown, VA 0.71666
## maximum_revenue 0.60314
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13130 on 839 degrees of freedom
## Multiple R-squared: 0.4212, Adjusted R-squared: 0.2535
## F-statistic: 2.512 on 243 and 839 DF, p-value: < 2.2e-16
anova(lm6)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 22 6.2212e+09 282783221 1.6391 0.03249 *
## Industry 44 1.0802e+10 245496911 1.4230 0.03880 *
## Rating 1 1.9421e+08 194208672 1.1257 0.28900
## Location 175 8.8054e+10 503168168 2.9165 < 2e-16 ***
## maximum_revenue 1 4.6668e+07 46667908 0.2705 0.60314
## Residuals 839 1.4475e+11 172526176
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Linear Regression: Average Salary explained by Sector, Industry Type, Job Rating, Location, and Founded Year
#Slight increase in Adjusted R-squared: 0.2603, and slight drop in p-value: < 2.2e-16. Keeping Founded Year in model.
lm7 <- lm(average_salary ~ Sector + Industry + Rating + Location + Founded, data = salaries_df2)
summary(lm7)
##
## Call:
## lm(formula = average_salary ~ Sector + Industry + Rating + Location +
## Founded, data = salaries_df2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38149 -7062 0 8565 32515
##
## Coefficients: (24 not defined because of singularities)
## Estimate Std. Error t value
## (Intercept) 8034.35 53517.71 0.150
## SectorAerospace & Defense 11365.28 8498.90 1.337
## SectorArts, Entertainment & Recreation -3572.15 11224.58 -0.318
## SectorBiotech & Pharmaceuticals 1175.57 7684.03 0.153
## SectorBusiness Services -7901.98 9321.43 -0.848
## SectorConstruction, Repair & Maintenance 27413.27 20016.68 1.370
## SectorEducation 14541.53 11223.26 1.296
## SectorFinance 18768.75 9830.26 1.909
## SectorGovernment -3307.70 11336.47 -0.292
## SectorHealth Care 4870.13 6537.13 0.745
## SectorInformation Technology 3250.64 6232.23 0.522
## SectorInsurance 1940.93 7468.32 0.260
## SectorManufacturing 7653.94 11999.78 0.638
## SectorMedia 1971.40 8197.73 0.240
## SectorNon-Profit 2820.22 7260.03 0.388
## SectorOil, Gas, Energy & Utilities 14019.52 12624.48 1.111
## SectorReal Estate 22827.93 11202.48 2.038
## SectorRestaurants, Bars & Food Services 7142.81 14380.00 0.497
## SectorRetail 17123.82 14588.72 1.174
## SectorTelecommunications 4072.04 8924.48 0.456
## SectorTransportation & Logistics -2112.91 14559.95 -0.145
## IndustryAdvertising & Marketing 11222.61 7750.19 1.448
## IndustryAerospace & Defense NA NA NA
## IndustryArchitectural & Engineering Services 17085.81 9646.51 1.771
## IndustryAutomotive Parts & Accessories Stores -5976.99 18917.19 -0.316
## IndustryBanks & Credit Unions -16667.24 8525.80 -1.955
## IndustryBiotech & Pharmaceuticals NA NA NA
## IndustryBrokerage Services -13285.68 12212.84 -1.088
## IndustryBuilding & Personnel Services 1030.30 19941.47 0.052
## IndustryCable, Internet & Telephone Providers -12340.76 14933.15 -0.826
## IndustryColleges & Universities -11570.38 11497.90 -1.006
## IndustryCommercial Equipment Repair & Maintenance -21107.52 22221.29 -0.950
## IndustryComputer Hardware & Software -2452.12 2387.84 -1.027
## IndustryConstruction -5369.56 20642.63 -0.260
## IndustryConsulting 11897.39 7386.16 1.611
## IndustryConsumer Products Manufacturing 220.51 13929.09 0.016
## IndustryConvenience Stores & Truck Stops NA NA NA
## IndustryDepartment, Clothing, & Shoe Stores -43978.92 22849.73 -1.925
## IndustryEducation Training Services -16716.96 12400.27 -1.348
## IndustryElectrical & Electronic Manufacturing 14850.74 13982.82 1.062
## IndustryEnergy -3397.77 13978.26 -0.243
## IndustryEnterprise Software & Network Solutions -4212.11 2676.71 -1.574
## IndustryFederal Agencies -635.19 11895.93 -0.053
## IndustryFinancial Analytics & Research -12009.84 15414.88 -0.779
## IndustryFinancial Transaction Processing -12481.10 9466.01 -1.319
## IndustryFood & Beverage Manufacturing -41184.53 17054.33 -2.415
## IndustryGambling 8456.99 21082.71 0.401
## IndustryGeneral Repair & Maintenance NA NA NA
## IndustryHealth Care Products Manufacturing 12588.09 13173.38 0.956
## IndustryHealth Care Services & Hospitals NA NA NA
## IndustryHealth Fundraising Organizations -95.94 13641.14 -0.007
## IndustryIndustrial Manufacturing NA NA NA
## IndustryInsurance Agencies & Brokerages -1037.69 9516.53 -0.109
## IndustryInsurance Carriers NA NA NA
## IndustryInternet -51.46 3747.22 -0.014
## IndustryInvestment Banking & Asset Management -16156.38 8368.60 -1.931
## IndustryIT Services NA NA NA
## IndustryK-12 Education NA NA NA
## IndustryLegal 13069.10 11152.40 1.172
## IndustryLending -3575.03 9511.86 -0.376
## IndustryLogistics & Supply Chain 8178.84 14088.29 0.581
## IndustryMembership Organizations -39.73 10034.44 -0.004
## IndustryMunicipal Governments NA NA NA
## IndustryNews Outlet 30769.78 14375.69 2.140
## IndustryOil & Gas Services NA NA NA
## IndustryOther Retail Stores 25625.12 22890.69 1.119
## IndustryPublishing -8243.70 17913.07 -0.460
## IndustryReal Estate NA NA NA
## IndustryResearch & Development 4233.85 14946.98 0.283
## IndustrySocial Assistance NA NA NA
## IndustrySporting Goods Stores NA NA NA
## IndustrySports & Recreation NA NA NA
## IndustryStaffing & Outsourcing 11162.75 7179.54 1.555
## IndustryStock Exchanges -14552.29 16805.70 -0.866
## IndustryTelecommunications Services NA NA NA
## IndustryTransportation Management NA NA NA
## IndustryTV Broadcast & Cable Networks 729.59 19369.30 0.038
## IndustryVenture Capital & Private Equity NA NA NA
## IndustryVideo Games NA NA NA
## IndustryWholesale NA NA NA
## Rating -27.60 878.62 -0.031
## LocationAlameda, CA 19909.86 18700.34 1.065
## LocationAllen, TX 12844.64 16233.44 0.791
## LocationAmerican Fork, UT -4027.62 18672.74 -0.216
## LocationArcadia, CA -19657.80 18566.60 -1.059
## LocationArlington, TX 21301.70 16128.07 1.321
## LocationAthens, GA 3313.35 15333.87 0.216
## LocationAurora, CO 418.15 18665.26 0.022
## LocationAustin, TX 8647.05 13566.38 0.637
## LocationAzusa, CA 31953.79 18755.45 1.704
## LocationBellevue, WA 14711.16 18813.01 0.782
## LocationBensalem, PA 12492.61 18669.55 0.669
## LocationBerkeley Heights, NJ 1282.82 19204.10 0.067
## LocationBerwyn, PA -188.54 18674.64 -0.010
## LocationBlue Bell, PA 20887.44 19199.19 1.088
## LocationBoothwyn, PA -1679.17 18689.19 -0.090
## LocationBoulder, CO 23404.66 16242.81 1.441
## LocationBrea, CA -7979.69 16705.06 -0.478
## LocationBroadview, IL 18181.40 20874.37 0.871
## LocationBronx, NY 19814.71 19015.67 1.042
## LocationBrooklyn, NY 25781.04 15357.60 1.679
## LocationBroomfield, CO 29472.38 18672.74 1.578
## LocationBurbank, CA 6085.53 14529.07 0.419
## LocationBurlingame, CA 24007.64 15722.91 1.527
## LocationBurlingame, KS 13129.37 18774.09 0.699
## LocationCamden, NJ 19320.83 18689.19 1.034
## LocationCarmel, IN 8850.12 16959.27 0.522
## LocationCentennial, CO 11853.94 14544.01 0.815
## LocationCerritos, CA 12531.02 18761.82 0.668
## LocationChandler, AZ 16713.77 14895.85 1.122
## LocationCharlotte, NC 27358.25 13467.80 2.031
## LocationChesapeake, VA NA NA NA
## LocationChicago, IL 27596.88 13411.84 2.058
## LocationColumbus, OH -472.35 14097.68 -0.034
## LocationConshohocken, PA -38.67 18676.22 -0.002
## LocationCoppell, TX 22516.51 18674.06 1.206
## LocationCulver City, CA -11617.74 18673.49 -0.622
## LocationCupertino, CA 20822.45 14087.00 1.478
## LocationDallas, TX 7298.99 13592.62 0.537
## LocationDaly City, CA 35409.86 18700.34 1.894
## LocationDC Ranch, AZ 23408.88 18770.44 1.247
## LocationDenver, CO 13564.80 13600.19 0.997
## LocationDowners Grove, IL 23585.07 14215.55 1.659
## LocationDraper, UT -1591.12 18770.44 -0.085
## LocationDublin, OH -612.64 16227.38 -0.038
## LocationEl Cajon, CA NA NA NA
## LocationEl Segundo, CA 4144.92 15420.91 0.269
## LocationElk Grove Village, IL 34764.18 19970.80 1.741
## LocationEnglewood, CO 8576.58 16267.85 0.527
## LocationEssex Fells, NJ 609.10 19075.84 0.032
## LocationExton, PA 11770.83 18750.50 0.628
## LocationFeasterville Trevose, PA 18890.54 18677.21 1.011
## LocationFlorham Park, NJ 22876.60 16350.85 1.399
## LocationFort Eustis, VA -10895.60 18748.10 -0.581
## LocationFort Lee, NJ 19915.55 19057.62 1.045
## LocationFort Mill, SC 24510.22 18709.93 1.310
## LocationFort Worth, TX 17446.46 14238.95 1.225
## LocationFoster City, CA 16007.15 14897.83 1.074
## LocationFranklin Lakes, NJ -1021.16 18677.61 -0.055
## LocationFremont, CA 7425.49 18674.23 0.398
## LocationGainesville, FL 1333.42 14299.41 0.093
## LocationGlendale, AZ 34800.97 19033.46 1.828
## LocationGlendale, CA 22593.19 16197.64 1.395
## LocationGlenview, IL 19257.90 21336.34 0.903
## LocationGrapevine, TX 9927.04 16989.91 0.584
## LocationGreenwood Village, Arapahoe, CO -1070.60 14539.98 -0.074
## LocationHampton, VA 11020.17 13799.42 0.799
## LocationHanford, CA 24285.29 19015.42 1.277
## LocationHaworth, NJ 32190.93 16223.72 1.984
## LocationHercules, CA 4665.30 19239.68 0.242
## LocationHoboken, NJ 15413.53 18684.77 0.825
## LocationHorsham, PA 18437.25 14925.28 1.235
## LocationHouston, TX 7313.43 13461.45 0.543
## LocationHuntersville, NC 27761.23 17083.56 1.625
## LocationIndian Trail, NC NA NA NA
## LocationIndianapolis, IN 6781.89 13794.97 0.492
## LocationIrving, TX 20360.42 13943.45 1.460
## LocationItasca, IL 39056.84 18914.69 2.065
## LocationJacksonville, FL 15015.96 14010.66 1.072
## LocationJeffersonville, IN 3880.20 19438.97 0.200
## LocationJersey City, NJ 16533.23 13775.92 1.200
## LocationKent, WA -7602.01 15425.64 -0.493
## LocationKing of Prussia, PA 26105.12 16240.83 1.607
## LocationKirkland, WA -12530.38 16199.17 -0.774
## LocationLackland AFB, TX 32297.98 19548.04 1.652
## LocationLake Success, NY 18158.39 15112.16 1.202
## LocationLakewood, CO 3468.96 17096.17 0.203
## LocationLehi, UT -7779.02 17013.24 -0.457
## LocationLewisville, TX 18821.16 20889.19 0.901
## LocationLong Beach, CA 15170.81 15988.69 0.949
## LocationLos Angeles, CA 552.79 13573.49 0.041
## LocationLos Gatos, CA 19746.27 16578.63 1.191
## LocationLouisville, CO 1447.07 15781.81 0.092
## LocationMalvern, PA 8380.90 16199.03 0.517
## LocationMarin City, CA 33694.77 18541.07 1.817
## LocationMarlton, NJ 15194.33 16551.78 0.918
## LocationMenlo Park, CA 20883.20 14525.83 1.438
## LocationMillbrae, CA -5622.16 20499.09 -0.274
## LocationMilpitas, CA 38901.32 16373.60 2.376
## LocationMontvale, NJ 31959.69 18700.56 1.709
## LocationMooresville, NC 16247.00 18905.50 0.859
## LocationMount Laurel, NJ -305.67 16551.78 -0.018
## LocationMountain View, CA 19972.65 14148.51 1.412
## LocationNew York, NY 18437.31 13304.55 1.386
## LocationNewark, CA 12017.30 16252.37 0.739
## LocationNewark, NJ 18937.44 18677.39 1.014
## LocationNorfolk, VA -386.05 14757.58 -0.026
## LocationNorthbrook, IL 28619.40 16197.79 1.767
## LocationNorthlake, IL NA NA NA
## LocationNorthridge, CA -8122.48 19207.79 -0.423
## LocationNovato, CA 9777.36 19404.16 0.504
## LocationOakland, CA 26877.39 16302.88 1.649
## LocationPalo Alto, CA 15359.93 14150.35 1.085
## LocationPaoli, PA -283.23 18681.00 -0.015
## LocationPasadena, CA 14439.99 18956.31 0.762
## LocationPasadena, TX 20886.84 18684.47 1.118
## LocationPearland, TX 6623.16 14367.75 0.461
## LocationPhiladelphia, PA 9298.67 13530.57 0.687
## LocationPhoenix, AZ 21315.55 13746.98 1.551
## LocationPlano, TX 16245.83 14202.54 1.144
## LocationPortsmouth, VA 9495.09 16516.84 0.575
## LocationRedmond, WA -1224.15 14874.74 -0.082
## LocationRedwood City, CA 19072.44 14308.10 1.333
## LocationRenton, WA -12610.37 18691.56 -0.675
## LocationRichardson, TX 13427.29 14836.79 0.905
## LocationRolling Meadows, IL 40992.22 19044.64 2.152
## LocationRound Rock, TX 19820.83 18689.19 1.061
## LocationSalt Lake City, UT -707.27 14215.34 -0.050
## LocationSan Antonio, TX 23592.96 13616.95 1.733
## LocationSan Diego, CA 5564.50 13594.23 0.409
## LocationSan Francisco, CA 17324.73 13416.40 1.291
## LocationSan Jose, CA 21529.23 13623.19 1.580
## LocationSan Mateo, CA 11975.30 14477.84 0.827
## LocationSan Rafael, CA 19909.86 18700.34 1.065
## LocationSan Ramon, CA 22581.26 16213.78 1.393
## LocationSanta Clara, CA 16002.25 14857.25 1.077
## LocationSanta Monica, CA 13344.58 18715.83 0.713
## LocationScottsdale, AZ 30220.58 15224.53 1.985
## LocationSeattle, WA 6.75 13756.21 0.000
## LocationSouth San Francisco, CA 19810.10 16200.14 1.223
## LocationStafford, TX -7264.82 18667.27 -0.389
## LocationSugar Land, TX 8672.91 16327.30 0.531
## LocationSunnyvale, CA 23924.02 14405.19 1.661
## LocationTempe, AZ 7370.69 13999.13 0.527
## LocationTopeka, KS 10931.01 18669.68 0.585
## LocationTorrance, CA 5564.23 22954.58 0.242
## LocationWalnut Creek, CA 15562.80 20880.35 0.745
## LocationWayne, PA 3531.22 15300.98 0.231
## LocationWeehawken, NJ 26338.30 18691.17 1.409
## LocationWest Chester, PA -10246.67 21592.31 -0.475
## LocationWesterville, OH 25495.37 18697.35 1.364
## LocationWestlake, TX 22907.11 18666.21 1.227
## LocationWhippany, NJ 15299.55 18671.33 0.819
## LocationWhittier, CA -20123.94 18520.14 -1.087
## LocationWilmington, DE 18655.46 14541.13 1.283
## LocationWoodbridge, NJ 16961.38 19087.48 0.889
## LocationWoodland Hills, CA -7907.44 15328.62 -0.516
## LocationWoodridge, IL 22475.81 18837.02 1.193
## LocationYorktown, VA 7384.39 19543.61 0.378
## Founded 14.71 25.96 0.567
## Pr(>|t|)
## (Intercept) 0.8807
## SectorAerospace & Defense 0.1816
## SectorArts, Entertainment & Recreation 0.7504
## SectorBiotech & Pharmaceuticals 0.8785
## SectorBusiness Services 0.3969
## SectorConstruction, Repair & Maintenance 0.1713
## SectorEducation 0.1955
## SectorFinance 0.0567 .
## SectorGovernment 0.7705
## SectorHealth Care 0.4565
## SectorInformation Technology 0.6021
## SectorInsurance 0.7950
## SectorManufacturing 0.5238
## SectorMedia 0.8100
## SectorNon-Profit 0.6978
## SectorOil, Gas, Energy & Utilities 0.2672
## SectorReal Estate 0.0420 *
## SectorRestaurants, Bars & Food Services 0.6196
## SectorRetail 0.2409
## SectorTelecommunications 0.6483
## SectorTransportation & Logistics 0.8847
## IndustryAdvertising & Marketing 0.1481
## IndustryAerospace & Defense NA
## IndustryArchitectural & Engineering Services 0.0770 .
## IndustryAutomotive Parts & Accessories Stores 0.7521
## IndustryBanks & Credit Unions 0.0510 .
## IndustryBiotech & Pharmaceuticals NA
## IndustryBrokerage Services 0.2771
## IndustryBuilding & Personnel Services 0.9588
## IndustryCable, Internet & Telephone Providers 0.4089
## IndustryColleges & Universities 0.3146
## IndustryCommercial Equipment Repair & Maintenance 0.3425
## IndustryComputer Hardware & Software 0.3048
## IndustryConstruction 0.7949
## IndustryConsulting 0.1077
## IndustryConsumer Products Manufacturing 0.9874
## IndustryConvenience Stores & Truck Stops NA
## IndustryDepartment, Clothing, & Shoe Stores 0.0547 .
## IndustryEducation Training Services 0.1781
## IndustryElectrical & Electronic Manufacturing 0.2886
## IndustryEnergy 0.8080
## IndustryEnterprise Software & Network Solutions 0.1161
## IndustryFederal Agencies 0.9574
## IndustryFinancial Analytics & Research 0.4362
## IndustryFinancial Transaction Processing 0.1878
## IndustryFood & Beverage Manufacturing 0.0160 *
## IndustryGambling 0.6885
## IndustryGeneral Repair & Maintenance NA
## IndustryHealth Care Products Manufacturing 0.3396
## IndustryHealth Care Services & Hospitals NA
## IndustryHealth Fundraising Organizations 0.9944
## IndustryIndustrial Manufacturing NA
## IndustryInsurance Agencies & Brokerages 0.9132
## IndustryInsurance Carriers NA
## IndustryInternet 0.9890
## IndustryInvestment Banking & Asset Management 0.0540 .
## IndustryIT Services NA
## IndustryK-12 Education NA
## IndustryLegal 0.2417
## IndustryLending 0.7071
## IndustryLogistics & Supply Chain 0.5617
## IndustryMembership Organizations 0.9968
## IndustryMunicipal Governments NA
## IndustryNews Outlet 0.0327 *
## IndustryOil & Gas Services NA
## IndustryOther Retail Stores 0.2634
## IndustryPublishing 0.6455
## IndustryReal Estate NA
## IndustryResearch & Development 0.7771
## IndustrySocial Assistance NA
## IndustrySporting Goods Stores NA
## IndustrySports & Recreation NA
## IndustryStaffing & Outsourcing 0.1205
## IndustryStock Exchanges 0.3869
## IndustryTelecommunications Services NA
## IndustryTransportation Management NA
## IndustryTV Broadcast & Cable Networks 0.9700
## IndustryVenture Capital & Private Equity NA
## IndustryVideo Games NA
## IndustryWholesale NA
## Rating 0.9749
## LocationAlameda, CA 0.2874
## LocationAllen, TX 0.4291
## LocationAmerican Fork, UT 0.8293
## LocationArcadia, CA 0.2901
## LocationArlington, TX 0.1870
## LocationAthens, GA 0.8290
## LocationAurora, CO 0.9821
## LocationAustin, TX 0.5241
## LocationAzusa, CA 0.0889 .
## LocationBellevue, WA 0.4345
## LocationBensalem, PA 0.5036
## LocationBerkeley Heights, NJ 0.9468
## LocationBerwyn, PA 0.9919
## LocationBlue Bell, PA 0.2770
## LocationBoothwyn, PA 0.9284
## LocationBoulder, CO 0.1501
## LocationBrea, CA 0.6330
## LocationBroadview, IL 0.3841
## LocationBronx, NY 0.2978
## LocationBrooklyn, NY 0.0937 .
## LocationBroomfield, CO 0.1150
## LocationBurbank, CA 0.6755
## LocationBurlingame, CA 0.1273
## LocationBurlingame, KS 0.4846
## LocationCamden, NJ 0.3016
## LocationCarmel, IN 0.6020
## LocationCentennial, CO 0.4153
## LocationCerritos, CA 0.5044
## LocationChandler, AZ 0.2623
## LocationCharlotte, NC 0.0426 *
## LocationChesapeake, VA NA
## LocationChicago, IL 0.0400 *
## LocationColumbus, OH 0.9733
## LocationConshohocken, PA 0.9983
## LocationCoppell, TX 0.2283
## LocationCulver City, CA 0.5341
## LocationCupertino, CA 0.1398
## LocationDallas, TX 0.5915
## LocationDaly City, CA 0.0587 .
## LocationDC Ranch, AZ 0.2128
## LocationDenver, CO 0.3189
## LocationDowners Grove, IL 0.0976 .
## LocationDraper, UT 0.9325
## LocationDublin, OH 0.9699
## LocationEl Cajon, CA NA
## LocationEl Segundo, CA 0.7882
## LocationElk Grove Village, IL 0.0822 .
## LocationEnglewood, CO 0.5982
## LocationEssex Fells, NJ 0.9745
## LocationExton, PA 0.5304
## LocationFeasterville Trevose, PA 0.3122
## LocationFlorham Park, NJ 0.1622
## LocationFort Eustis, VA 0.5613
## LocationFort Lee, NJ 0.2964
## LocationFort Mill, SC 0.1906
## LocationFort Worth, TX 0.2209
## LocationFoster City, CA 0.2830
## LocationFranklin Lakes, NJ 0.9564
## LocationFremont, CA 0.6910
## LocationGainesville, FL 0.9257
## LocationGlendale, AZ 0.0679 .
## LocationGlendale, CA 0.1635
## LocationGlenview, IL 0.3671
## LocationGrapevine, TX 0.5592
## LocationGreenwood Village, Arapahoe, CO 0.9413
## LocationHampton, VA 0.4248
## LocationHanford, CA 0.2020
## LocationHaworth, NJ 0.0476 *
## LocationHercules, CA 0.8085
## LocationHoboken, NJ 0.4097
## LocationHorsham, PA 0.2172
## LocationHouston, TX 0.5871
## LocationHuntersville, NC 0.1046
## LocationIndian Trail, NC NA
## LocationIndianapolis, IN 0.6232
## LocationIrving, TX 0.1447
## LocationItasca, IL 0.0393 *
## LocationJacksonville, FL 0.2842
## LocationJeffersonville, IN 0.8418
## LocationJersey City, NJ 0.2305
## LocationKent, WA 0.6223
## LocationKing of Prussia, PA 0.1084
## LocationKirkland, WA 0.4395
## LocationLackland AFB, TX 0.0990 .
## LocationLake Success, NY 0.2300
## LocationLakewood, CO 0.8393
## LocationLehi, UT 0.6477
## LocationLewisville, TX 0.3679
## LocationLong Beach, CA 0.3430
## LocationLos Angeles, CA 0.9675
## LocationLos Gatos, CA 0.2341
## LocationLouisville, CO 0.9270
## LocationMalvern, PA 0.6051
## LocationMarin City, CA 0.0696 .
## LocationMarlton, NJ 0.3590
## LocationMenlo Park, CA 0.1510
## LocationMillbrae, CA 0.7840
## LocationMilpitas, CA 0.0178 *
## LocationMontvale, NJ 0.0879 .
## LocationMooresville, NC 0.3904
## LocationMount Laurel, NJ 0.9853
## LocationMountain View, CA 0.1585
## LocationNew York, NY 0.1663
## LocationNewark, CA 0.4599
## LocationNewark, NJ 0.3110
## LocationNorfolk, VA 0.9791
## LocationNorthbrook, IL 0.0777 .
## LocationNorthlake, IL NA
## LocationNorthridge, CA 0.6725
## LocationNovato, CA 0.6145
## LocationOakland, CA 0.0997 .
## LocationPalo Alto, CA 0.2781
## LocationPaoli, PA 0.9879
## LocationPasadena, CA 0.4465
## LocationPasadena, TX 0.2640
## LocationPearland, TX 0.6450
## LocationPhiladelphia, PA 0.4922
## LocationPhoenix, AZ 0.1215
## LocationPlano, TX 0.2531
## LocationPortsmouth, VA 0.5656
## LocationRedmond, WA 0.9344
## LocationRedwood City, CA 0.1830
## LocationRenton, WA 0.5001
## LocationRichardson, TX 0.3658
## LocationRolling Meadows, IL 0.0317 *
## LocationRound Rock, TX 0.2893
## LocationSalt Lake City, UT 0.9603
## LocationSan Antonio, TX 0.0836 .
## LocationSan Diego, CA 0.6824
## LocationSan Francisco, CA 0.1970
## LocationSan Jose, CA 0.1145
## LocationSan Mateo, CA 0.4085
## LocationSan Rafael, CA 0.2874
## LocationSan Ramon, CA 0.1642
## LocationSanta Clara, CA 0.2818
## LocationSanta Monica, CA 0.4761
## LocationScottsdale, AZ 0.0476 *
## LocationSeattle, WA 0.9996
## LocationSouth San Francisco, CA 0.2218
## LocationStafford, TX 0.6973
## LocationSugar Land, TX 0.5955
## LocationSunnyvale, CA 0.0972 .
## LocationTempe, AZ 0.5987
## LocationTopeka, KS 0.5584
## LocationTorrance, CA 0.8085
## LocationWalnut Creek, CA 0.4563
## LocationWayne, PA 0.8176
## LocationWeehawken, NJ 0.1593
## LocationWest Chester, PA 0.6353
## LocationWesterville, OH 0.1732
## LocationWestlake, TX 0.2202
## LocationWhippany, NJ 0.4128
## LocationWhittier, CA 0.2776
## LocationWilmington, DE 0.2000
## LocationWoodbridge, NJ 0.3745
## LocationWoodland Hills, CA 0.6061
## LocationWoodridge, IL 0.2332
## LocationYorktown, VA 0.7057
## Founded 0.5711
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13090 on 662 degrees of freedom
## (205 observations deleted due to missingness)
## Multiple R-squared: 0.4416, Adjusted R-squared: 0.2603
## F-statistic: 2.435 on 215 and 662 DF, p-value: < 2.2e-16
anova(lm7)
## Analysis of Variance Table
##
## Response: average_salary
## Df Sum Sq Mean Sq F value Pr(>F)
## Sector 20 5.9101e+09 295505307 1.7258 0.025456 *
## Industry 39 1.1854e+10 303955377 1.7751 0.002979 **
## Rating 1 4.9555e+07 49554744 0.2894 0.590784
## Location 154 7.1783e+10 466121274 2.7222 < 2.2e-16 ***
## Founded 1 5.4994e+07 54994310 0.3212 0.571097
## Residuals 662 1.1335e+11 171230884
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Given the data is mostly based around categorical variables and ranges of numbers, it is difficult to see very strong correlations.
#From the progression of the linear regression model exploration above, I found that there are 5 variables that have relative statistical significance: Sector, Industry, Rating, Location, and Founded Year.