How to get sample summary statistics with panel data using the gtsummary package in R?

Viewed 27

I have an unbalanced panel data set of workers between 2003-2021. It's set by PersonID using the plm package.

When I use gtsummary to create a table with mean summary statistics, I think it averages all values for x variable instead of averaging the group/PersonID mean, e.g. when I compute the mean of earnings with gtsummary I get the mean value of all earnings records without consideration of the panel structure. The gtsummary summary stats appear to be person-observations, not persons. Panel descriptives should show persons otherwise the demographics will overrepresent those with lots of observations and underrepresent those with few. Also, the class of my df is: "pdata.frame" "data.frame", but gtsummary produces the same results whether I use the unpaneled or paneled df.

So for example, when I compute the mean annual earnings by group (aka PersonID) to account for the panel structure, I get $51,125:

  earn <- Panel12 %>%
    group_by(PersonID) %>%
    summarise(n = mean(EmployeeAnnualWages_adj_win)) 
  skim(earn$n) #$51,125

However, when I compute it without the group_by argument (ignoring the panel structure), I get a slightly different value:

skim(Panel12$EmployeeAnnualWages_adj_win) #$51,725.

When I compute the mean annual earnings using gtsummary, the value matches the above (not by group) tabulation :

  Panel12 %>%
    select(First.PersonID, EmployeeAnnualWages_adj_win) %>% #demographics
    gtsummary::tbl_summary(
      statistic = list(all_continuous() ~ "{mean} ({sd})", # CONTINUOUS: mean with SE in parenthesis / CATEGORICAL: proportions
                       all_categorical() ~ "{n} ({p}%)", # "{n} ({p}%)" for n and % 
                       percent = "row"),
      digits = all_continuous() ~ 2,
      sort = list(everything() ~ "frequency"), #results are sorted in descending order of frequency
      label = #labeling variables
        list(First.PersonID ~ "No. Unique Workers",
             EmployeeAnnualWages_adj_win ~ "Annual Average Earnings"),
      missing = "no"
    ) %>%
    bold_labels() %>%
    modify_footnote(
      all_stat_cols() ~ "Mean values (standard deviations in parentheses).") %>%
    modify_caption("**Table 1. Sample Summary Statistics**")

enter image description here

In a nutshell, how can I tabulate panel summary statistics?
I've tried adding the group_by(PersonID) argument right before the gtsummary command, but that just tabulates separate descriptives for each PersonID (there are 7,774 unique PersonIDs). Essentially, I would like to get a single mean value across PersonIDs.

I hope I'm not missing anything obvious and lastly, huge thanks to Daniel Sjoberg and everyone else who had a hand in designing gtsummary, because it's truly a godsend!

The panel data looks like this (first 50 rows):

structure(list(First.PersonID = c(1, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 
    PersonID = c(1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 
    1534, 1534, 1534, 1534, 1534, 3345, 3345, 3345, 3345, 3345, 
    3345, 3345, 3345, 3345, 3345, 3345, 3345, 3743, 3743, 3743, 
    3743, 3743, 3743, 3743, 3743, 3743, 3743, 3743, 3743, 3743, 
    4910, 4910, 4910, 4910, 4910, 4910, 4910, 4910, 4910, 4910, 
    4910, 4910), CalendarYear = c(2003, 2010, 2011, 2012, 2013, 
    2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2003, 2004, 
    2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 
    2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 
    2013, 2014, 2015, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
    2010, 2011, 2012, 2013, 2014), AcademicYear = c(2002, 2009, 
    2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 
    2020, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 
    2011, 2012, 2013, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 
    2009, 2010, 2011, 2012, 2013, 2014, 2002, 2003, 2004, 2005, 
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013), LayoffCalendarYear = c(NA, 
    NA, NA, NA, NA, NA, NA, 2016, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, 2012, 2013, NA, NA, NA, NA, NA, 
    NA, 2008, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, 2011, 2012, 2013, 2014), LayoffCalendarQuarter = c(NA, 
    NA, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, 4, 1, NA, NA, NA, NA, NA, NA, 4, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    1, 1, 1, 1), LayoffTimeID = c(NA, NA, NA, NA, NA, NA, NA, 
    20160331, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, 20121231, 20130331, NA, NA, NA, NA, NA, NA, 20081231, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    20110331, 20120331, 20130331, 20140331), Age = c(40, 41, 
    42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 19, 20, 21, 22, 
    23, 24, 25, 26, 27, 28, 29, 30, 38, 39, 40, 41, 42, 43, 44, 
    45, 46, 47, 48, 49, 50, 24, 25, 26, 27, 28, 29, 30, 31, 32, 
    33, 34, 35), AGEatLayoff = c(47, 47, 47, 47, 47, 47, 47, 
    47, 47, 47, 47, 47, 47, 28, 28, 28, 28, 28, 28, 28, 28, 28, 
    28, 29, 29, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 
    43, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 34, 35), Time_To_Layoff = c(-7, 
    -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, -9, -8, -7, -6, 
    -5, -4, -3, -2, -1, 0, 1, 2, -5, -4, -3, -2, -1, 0, 1, 2, 
    3, 4, 5, 6, 7, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 
    -1, 0), PermSeparation = c(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 
    0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 1), MassLayoffFlag = c(NA, NA, NA, NA, NA, NA, NA, 1, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1, 
    1, NA, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, 1, 1, 1, 1), IndividualLayOff = c(NA, 
    NA, NA, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, 1, 0, NA, NA, NA, NA, NA, NA, 1, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    0, 0, 0, 1), EnrollmentStatus_PSE = c(NA, 1, 1, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, 1, 2, NA, NA, NA, NA, NA, 2), EnrollmentStatus_NSCE = c(NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_), EnrollmentBeginTimeID_NSCE = c(NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_), EnrollmentEndTimeID_NSCE = c(NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
    NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_
    ), DegreeLevel1_PSE = c(NA, "Associate Degree", "Unavailable", 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "Bachelor's Degree", 
    "Bachelor's Degree", "Bachelor's Degree", NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, "Associate Degree", "Associate Degree", 
    NA, NA, NA, NA, NA, "Associate Degree"), Major1_PSE = c(NA, 
    51380100, 99999999, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, 52110100, 52110100, 52110100, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, 24010100, 24010100, NA, NA, NA, NA, NA, 4.4e+07
    ), TimeID_PSE = c(NA, 20081229, 20091229, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, 20031229, 20041229, 20051229, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, 20051229, 20061229, NA, 
    NA, NA, NA, NA, 20121229), Industry_of_Disp = c("Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Professional, Scientific, and Technical Services", "Professional, Scientific, and Technical Services", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Health Care and Social Assistance", 
    "Health Care and Social Assistance", "Retail Trade", "Retail Trade", 
    "Retail Trade", "Retail Trade", "Retail Trade", "Retail Trade", 
    "Retail Trade", "Retail Trade", "Retail Trade", "Retail Trade", 
    "Retail Trade", "Retail Trade"), Gender = c("Female", "Female", 
    "Female", "Female", "Female", "Female", "Female", "Female", 
    "Female", "Female", "Female", "Female", "Female", "Female", 
    "Female", "Female", "Female", "Female", "Female", "Female", 
    "Female", "Female", "Female", "Female", "Female", "Male", 
    "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", 
    "Male", "Male", "Male", "Male", "Female", "Female", "Female", 
    "Female", "Female", "Female", "Female", "Female", "Female", 
    "Female", "Female", "Female"), RaceEthnicity_PSE = c("White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)"), RaceEthnicity_PSC = c("White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    "White (Not Hispanic)", "White (Not Hispanic)", "White (Not Hispanic)", 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, NA, NA, NA, NA, NA), DisablingCondition_PSE = c("Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled", "Not disabled", 
    "Not disabled", "Not disabled", "Not disabled"), DisablingCondition_NSCE = c(0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
    NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), County = c(103, 
    147, 147, 147, 147, 147, 147, 37, 147, 147, 147, 147, 147, 
    161, 179, 53, 53, 175, 175, 175, 53, 175, 175, 175, 37, 109, 
    109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 53, 
    59, 59, 59, 59, 59, 59, 37, 17, 65, 65, 65, 59), IndustryID = c(763, 
    933, 933, 909, 909, 909, 909, 930, 930, 930, 930, 930, 930, 
    607, 733, 1300, 1300, 984, 727, 984, 706, 984, 818, 984, 
    818, 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, 
    909, 852, 933, 933, 933, 933, 933, 933, 1033, 935, 1037, 
    1037, 1037, 602), EmployeeAnnualWages_adj_win = c(7896.28567481884, 
    19231.8252070951, 28187.6411890588, 23209.3114764869, 12756.6233118375, 
    21087.4887769399, 29058.2539158466, 49365.3976993575, 62004.973813953, 
    31603.0562689936, 70469.9915410537, 85031.6247083522, 18709, 
    6905.20021059783, 13523.2887996824, 17348.6324982929, 30557.1286434862, 
    27535.0950111128, 42673.8502259537, 43178.4911522399, 45707.5799242926, 
    19567.9911032516, 74075.0580319728, 10487.254105911, 37418.7884393328, 
    46943.285799366, 50125.6735674269, 51343.7371969955, 52065.4216996734, 
    59219.4034375214, 54957.3732496958, 55416.8801363691, 56982.2654087984, 
    55468.1410064036, 55836.8942767655, 56643.5019072261, 49126.6830876089, 
    1095.28671905025, 27824.0249048913, 35642.7878005205, 10403.3512909696, 
    38551.9919977674, 39836.3693034528, 35887.5751059503, 675.382012, 
    3275.29986082844, 8885.88945253857, 6119.5158914612, 8604.06151524225, 
    14394.4833009456), Avg_Quarterly_Wages = c(1974.07141870471, 
    4807.95630177377, 7046.9102972647, 5802.32786912171, 3189.15582795937, 
    5271.87219423498, 7264.56347896165, 12341.3494248394, 15501.2434534883, 
    7900.7640672484, 17617.4978852634, 21257.9061770881, 4677.25, 
    1726.30005264946, 3380.8221999206, 4337.15812457323, 7639.28216087154, 
    6883.77375277819, 10668.4625564884, 10794.62278806, 11426.8949810732, 
    4891.99777581291, 18518.7645079932, 2621.81352647776, 9354.69710983321, 
    11735.8214498415, 12531.4183918567, 12835.9342992489, 13016.3554249183, 
    14804.8508593803, 13739.3433124239, 13854.2200340923, 14245.5663521996, 
    13867.0352516009, 13959.2235691914, 14160.8754768065, 12281.6707719022, 
    273.821679762562, 6956.00622622283, 8910.69695013013, 2600.8378227424, 
    9637.99799944186, 9959.09232586319, 8971.89377648758, 142.071897710714, 
    818.824965207111, 2221.47236313464, 1529.8789728653, 2151.01537881056, 
    3598.6208252364), Avg_Quarterly_WageRates = c(8.08853399210174, 
    14.5341036128352, 22.1546545667323, 26.1975236335842, 26.0708755093104, 
    29.3257827800558, 31.276013469292, 45.2785357747047, 40.2694463895401, 
    19.8482018563467, 41.3965259033139, 45.5764589637828, 11.8112373737374, 
    10.0470651952458, 11.0984997534122, 24.27392892222, 23.3514747138695, 
    21.4728363040204, 20.5147611475248, 28.2676778157237, 22.0176902949324, 
    28.6854325854739, 36.3798804185651, 34.6415856520052, 28.3483906141643, 
    23.0885244553038, 24.1200196962722, 24.3198910757435, 24.6181528232236, 
    25.6445225821009, 25.2240608746217, 26.3289174680879, 27.1358694383627, 
    26.8492376700108, 27.285188591429, 27.5840964510407, 27.2406362366645, 
    4.84833010748691, 16.6894174224811, 21.084624303041, 16.2666431761436, 
    22.3186998287645, 22.3153760772706, 22.9793444095596, 5.91966240461305, 
    8.62442288715767, 13.0247518201824, 13.8592570953605, 14.5812415167147, 
    14.2956923945638), Avg_Quarterly_WorkHours = c(280.75, 165.25, 
    237.75, 221.5, 122.5, 178, 232.5, 273.25, 385.5, 199, 425.25, 
    465.5, 99, 127.75, 346, 176.5, 326, 319.25, 520, 382.5, 518.5, 
    169.75, 509, 73, 165, 507.75, 519.5, 527.75, 529, 577, 544.5, 
    526.25, 525, 516, 511.5, 513.25, 450.5, 30, 313, 422.75, 
    121.5, 431.75, 447.5, 390, 12, 71, 170.25, 110.75, 147.5, 
    251.75), EmployeeQuarterlyWages_Qtr1_adj_win = c(3185.31628396739, 
    0, 9891.81647163696, 4326.73968333592, 3835.01295332617, 
    3355.0879169043, 8090.03008768219, 14333.7470369592, 15932.6395960226, 
    0, 19299.0645546357, 22347.1559925294, 18709, 0, 1629.45015660153, 
    6349.97138955274, 6779.56884069955, 4725.52935738888, 11499.2808794716, 
    6232.22057957663, 10777.6748834696, 5618.73487074836, 17675.1918978829, 
    2354.28153398003, 28800.4135071007, 10362.9545493659, 12321.2824341612, 
    13460.3851570502, 13447.5564373424, 13872.0946152331, 12546.6154926867, 
    12689.2304728644, 13383.2529594018, 12286.7660692029, 12910.5852144058, 
    12840.372457315, 12852.585169226, 456.178915345562, 0, 8350.93205258282, 
    7096.53708176852, 9532.80242899078, 9833.96250396885, 5991.96245060589, 
    284.143795421427, 0, 1786.57457403941, 1706.61908949911, 
    1324.86495415181, 3067.77059614586), EmployeeQuarterlyWages_Qtr2_adj_win = c(3201.51530344203, 
    0, 10512.2385253324, 7735.25692432722, 2703.23630680316, 
    4231.92085595195, 7215.40134021514, 13281.5217503772, 14768.6161800362, 
    0, 15893.5343253933, 17149.5343359543, 0, 2549.13661005435, 
    5053.30361065773, 6086.31436070331, 6581.94904700872, 8992.35827107105, 
    9837.64423350526, 13507.5646036781, 10510.5316854127, 5475.37521173913, 
    18555.6468361722, 3911.78300334726, 8618.37493223215, 12906.2006068841, 
    11843.635513256, 11668.9050294469, 12376.1076239302, 13953.1186252326, 
    13474.362620018, 14755.2715809065, 15312.8966179248, 15214.1944002318, 
    15208.5017892708, 15452.8805231842, 15000.0245865281, 639.107803704684, 
    10077.2627513587, 9558.67591865543, 3019.56681461249, 9399.71154752553, 
    8938.77787736172, 9103.75471487013, 284.143795421427, 1053.66247419671, 
    2422.65776695432, 1851.78793321169, 2546.20665903275, 3671.02250068648
    ), EmployeeQuarterlyWages_Qtr3_adj_win = c(1509.45408740942, 
    8958.61608367719, 7783.58619208944, 6913.81371112433, 2821.88092956302, 
    7212.69497250562, 7892.23822714389, 13931.824073415, 17861.6242692385, 
    14822.7679065388, 18617.5345398822, 22484.2936434884, 0, 
    3912.79952219203, 5523.77865587366, 3932.65273557528, 10803.2153884318, 
    5616.79346738314, 11499.2808794716, 13253.7294797683, 11876.0683117596, 
    4005.63753114029, 17973.7912268202, 3197.58890163592, 0, 
    12720.6482019928, 13960.7732167277, 14465.0572038238, 14279.7105345847, 
    16794.1863306982, 14230.910820189, 13310.5582388526, 13088.7741782879, 
    12901.1646078139, 12903.5038073954, 12854.3306482279, 15073.2847798689, 
    0, 8134.85305253623, 8075.53202611496, 0, 10379.7444019515, 
    11369.498177346, 11009.6015951679, 0, 1610.31434735723, 2087.75032826049, 
    2068.9510815297, 2377.54518550158, 3730.54640777588), EmployeeQuarterlyWages_Qtr4_adj_win = c(0, 
    10273.2091234179, 0, 4233.50115769938, 3396.49312214511, 
    6287.78503157806, 5860.58426080539, 7818.30483860607, 13442.0937686557, 
    16780.2883624548, 16659.8581211425, 23050.6407363801, 0, 
    443.264078351449, 1316.75637654947, 979.69401246159, 6392.39536734609, 
    8200.4139152697, 9837.64423350526, 10184.9764892169, 12543.3050436507, 
    4468.24348962386, 19870.4280710975, 1023.60066694784, 0, 
    10953.4824411232, 11999.982403282, 11749.3898066746, 11962.0471038161, 
    14600.0038663575, 14705.4843168021, 14661.8198437456, 15197.3416531839, 
    15066.015929155, 14814.3034656935, 15495.918278499, 6200.78855198586, 
    0, 9611.90910099638, 9657.64780316732, 287.247394588597, 
    9239.73361929962, 9694.1307447762, 9782.25634530638, 0, 611.323039274505, 
    2588.90678328435, 492.157787220698, 2355.44471655611, 3925.14379633737
    ), EmployeeQuarterlyHoursWorked_Qtr1_win = c(211, 0, 327, 
    168, 149, 130, 264, 331, 367, 0, 460, 463, 396, 0, 520, 255, 
    288, 240, 560, 214, 512, 181, 491, 57, 508, 464, 531, 566, 
    563, 568, 506, 489, 494, 468, 477, 468, 469, 40, 0, 383, 
    334, 440, 479, 263, 24, 0, 140, 124, 91, 214), EmployeeQuarterlyHoursWorked_Qtr2_win = c(212, 
    0, 345, 295, 103, 138, 229, 289, 353, 0, 412, 404, 0, 186, 
    367, 246, 275, 436, 480, 449, 506, 177, 516, 101, 152, 552, 
    488, 480, 494, 531, 529, 560, 563, 561, 556, 558, 552, 80, 
    446, 457, 139, 421, 393, 414, 24, 94, 188, 134, 175, 258), 
    EmployeeQuarterlyHoursWorked_Qtr3_win = c(700, 314, 279, 
    264, 107, 238, 251, 302, 450, 397, 431, 481, 0, 291, 401, 
    163, 448, 274, 560, 452, 528, 158, 488, 87, 0, 544, 566, 
    583, 573, 633, 568, 496, 481, 480, 472, 466, 552, 0, 359, 
    396, 0, 452, 505, 474, 0, 137, 161, 150, 163, 261), EmployeeQuarterlyHoursWorked_Qtr4_win = c(0, 
    347, 0, 159, 131, 206, 186, 171, 372, 399, 398, 514, 0, 34, 
    96, 42, 293, 327, 480, 415, 528, 163, 541, 47, 0, 471, 493, 
    482, 486, 576, 575, 560, 562, 555, 541, 561, 229, 0, 447, 
    455, 13, 414, 413, 409, 0, 53, 192, 35, 161, 274), WageRate_Qtr1_win = c(15.0962857060066, 
    0, 30.2502032771772, 25.7544028769995, 25.738341968632, 25.8083685915715, 
    30.6440533624325, 43.3043717128677, 43.4131869101433, 0, 
    41.9544881622515, 48.2659956642104, 47.2449494949495, 0, 
    3.13355799346448, 24.9018485864813, 23.5401695857623, 19.689705655787, 
    20.5344301419136, 29.122526072788, 21.0501462567766, 31.0427340925324, 
    35.9983541708409, 41.3031848066672, 56.6937273761825, 22.3339537701851, 
    23.2039217215842, 23.7815992174032, 23.8855354126863, 24.4227017873822, 
    24.7956827918709, 25.9493465702748, 27.0916051809753, 26.253773652143, 
    27.0662163824021, 27.4366932848611, 27.4042327702047, 11.4044728836391, 
    0, 21.804000137292, 21.247117011283, 21.6654600658881, 20.5301931189329, 
    22.7831271886156, 11.8393248092261, 0, 12.7612469574244, 
    13.7630571733799, 14.5589555401298, 14.335376617504), WageRate_Qtr2_win = c(15.1014872803869, 
    0, 30.4702565951664, 26.2212099129736, 26.2450126874093, 
    30.6660931590721, 31.5083027956993, 45.9568226656651, 41.837439603502, 
    0, 38.576539624741, 42.4493424157285, 0, 13.7050355379266, 
    13.7692196475687, 24.7411152874118, 23.9343601709408, 20.6246749336492, 
    20.495092153136, 30.0836628144278, 20.7718017498275, 30.9343232301646, 
    35.9605558840546, 38.7305247856164, 56.6998350804747, 23.380798200877, 
    24.2697449042131, 24.3102188113477, 25.0528494411543, 26.2770595578768, 
    25.4713849149679, 26.3486992516188, 27.1987506535076, 27.1197761144952, 
    27.3534204843, 27.6933342709394, 27.17395758429, 7.98884754630855, 
    22.5947595321944, 20.9161398657668, 21.7235022633992, 22.3271058135998, 
    22.7449818762385, 21.9897456880921, 11.8393248092261, 11.2091752574118, 
    12.8864774837996, 13.8193129344156, 14.54975233733, 14.2287693825057
    ), WageRate_Qtr3_win = c(2.15636298201346, 28.5306244703095, 
    27.8981583945858, 26.1886882997134, 26.3727189678787, 30.305441060948, 
    31.4431801878243, 46.1318677927649, 39.6924983760856, 37.3369468678559, 
    43.1961358233926, 46.7448932297056, 0, 13.4460464680138, 
    13.7750091168919, 24.1267038992348, 24.1143200634638, 20.4992462313253, 
    20.5344301419136, 29.3224103534697, 22.4925536207568, 25.3521362730398, 
    36.8315393992217, 36.7538954211025, 0, 23.3835444889574, 
    24.6656770613564, 24.8114188744834, 24.9209607933415, 26.5311000484964, 
    25.0544204580792, 26.8358029009125, 27.2115887282493, 26.877426266279, 
    27.3379317953292, 27.5844005326779, 27.3066753258495, 0, 
    22.6597578065076, 20.3927576417044, 0, 22.9640362875033, 
    22.5138577769228, 23.2270075847424, 0, 11.7541193237754, 
    12.9673933432329, 13.793007210198, 14.5861667822183, 14.2932812558463
    ), WageRate_Qtr4_win = c(0, 29.6057899810314, 0, 26.6257934446502, 
    25.9274284133215, 30.5232283086314, 31.5085175312118, 45.7210809275209, 
    36.1346606684293, 42.0558605575308, 41.8589400028706, 44.8456045454866, 
    0, 13.0371787750426, 13.7162122557236, 23.3260479157521, 
    21.8170490353109, 25.0777183953202, 20.495092153136, 24.5421120222094, 
    23.7562595523687, 27.4125367461587, 36.7290722201433, 21.7787375946349, 
    0, 23.2558013611958, 24.3407350979351, 24.3763273997398, 
    24.6132656457121, 25.3472289346484, 25.5747553335689, 26.1818211495457, 
    27.0415331907187, 27.1459746471261, 27.3831857036848, 27.6219577156845, 
    27.0776792663138, 0, 21.5031523512223, 21.2255995674007, 
    22.0959534298921, 22.3181971480667, 23.4724715369884, 23.9174971767882, 
    0, 11.5343969674435, 13.4838894962727, 14.0616510634485, 
    14.6300914071808, 14.3253423223992)), row.names = c(NA, -50L
), class = c("tbl_df", "tbl", "data.frame"))
0 Answers
Related