Using the following data, produce a visualization with patient_days_admitted on the x-axis and dollar_spent_per_patient on the y-axis. After producing this visualization, explain what this relationship means and how this relationship might guide a decision.
After looking at the bivariate relationship in the previous visualization, add department to the visualization as a grouping variable. Does this change your interpretation of the relationship or add any expanded understanding? If so, how? Does this visualization offer any additional explanatory power over the more simple visualization? Explain.
Data <-read.csv("https://www.nd.edu/~sberry5/data/visualizationData.csv")
# Part 1
summary(Data)
## dollar_spent_per_patient patient_days_admitted department
## Min. : 641.6 Min. : 1.00 Length:127
## 1st Qu.:1112.4 1st Qu.: 8.50 Class :character
## Median :1450.2 Median :15.00 Mode :character
## Mean :1515.6 Mean :15.53
## 3rd Qu.:1820.1 3rd Qu.:23.00
## Max. :2795.6 Max. :30.00
ggplot(data = Data) +
geom_jitter(mapping = aes(x = patient_days_admitted, y = dollar_spent_per_patient))+
ggtitle("Dollars Spent vs.Days Admitted ", subtitle = "x")
#Part 2
model <- lm(dollar_spent_per_patient ~ patient_days_admitted, data = Data)
library(dplyr)
library(ggplot2)
summary(model)
##
## Call:
## lm(formula = dollar_spent_per_patient ~ patient_days_admitted,
## data = Data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -641.4 -326.2 -114.4 237.7 1349.3
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1143.613 80.504 14.206 < 2e-16 ***
## patient_days_admitted 23.956 4.521 5.298 5.1e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 443.9 on 125 degrees of freedom
## Multiple R-squared: 0.1834, Adjusted R-squared: 0.1769
## F-statistic: 28.07 on 1 and 125 DF, p-value: 5.103e-07
ggplot(data = Data) +
geom_point(mapping = aes(x = patient_days_admitted, y = dollar_spent_per_patient, color= department)) +
geom_abline(intercept = coef(model)[1], slope = coef(model)[2], color = "black") +
ggtitle("Dollars Spent vs. Days Admitted")
# After adding department to my visualization it is clear that cancer and cardiac accumulate the majority of the dollars.
# The more amount of days admitted in the hospital the more dollars spent
# By adding color = department to the ggplot it clarifies all the scattered points into an reasonable explanation
Using the following data, formulate a hypothesis for training.sessions.attended.year’s effect on customer.satisfaction.scores.year. Please clearly state the relationship that you would expect to find. Using an appropriate technique from the general linear model, test your hypothesis and report your findings – interpretation of your model’s coefficients is critical. Describe your rationale for any data processing that you might undertake.
After reporting and interpreting your findings, offer some insight as to how you could use these findings.
CustomerRating <-read.csv("https://www.nd.edu/~sberry5/data/glmData.csv")
Customerdata <- glm(round(customer.satisfaction.scores.year) ~training.sessions.attended.year, data = CustomerRating,
family=poisson)
sjPlot::plot_model(Customerdata,"pred", terms=c("training.sessions.attended.year")) +
ggplot2::theme_minimal() +
geom_point()
summary(Customerdata)
##
## Call:
## glm(formula = round(customer.satisfaction.scores.year) ~ training.sessions.attended.year,
## family = poisson, data = CustomerRating)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -4.3016 -0.7754 -0.1181 0.8029 3.2632
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 4.129875 0.009938 415.57 <2e-16 ***
## training.sessions.attended.year 0.032556 0.001340 24.29 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 1406.00 on 528 degrees of freedom
## Residual deviance: 813.44 on 527 degrees of freedom
## AIC: 4072.3
##
## Number of Fisher Scoring iterations: 4
##I discovered for each training session attended, the satisfaction score increases, hence the relationship is positive for x and y axis. The numbers we see show how well our rules match what we observe from the customers. For each additional training session attended per year, the expected customer satisfaction score increases by 0.032556.
Using the following data, determine what variables influence a franchise’s ultimate outcome – failure or success. Using any variables available to you, select the appropriate method and test your model. Discuss your results and describe your rationale for any data processing that you might undertake.
Store_Data <-read.csv("https://www.nd.edu/~sberry5/data/outcomeData.csv")
str(Store_Data)
## 'data.frame': 475 obs. of 6 variables:
## $ storeID : int 1 2 3 4 5 6 7 8 9 10 ...
## $ outcomeClosedOpen : int 0 0 0 0 1 0 0 0 0 1 ...
## $ employeeCount : num 14.24 8.25 6.02 12.93 12.41 ...
## $ dailyNetProfitThousands : num 3.88 4.34 3.62 4.54 8.98 ...
## $ quartersWithHealthViolations: int 2 0 0 2 1 1 0 0 0 0 ...
## $ peoplePerSqMile : num 206 177 152 220 286 ...
Store_Data_1 <- glm(outcomeClosedOpen ~ employeeCount + dailyNetProfitThousands + quartersWithHealthViolations + peoplePerSqMile, family = "binomial", data = Store_Data, control = list(maxit = 1000), method = "glm.fit")
ggplot(aes(dailyNetProfitThousands,outcomeClosedOpen), data=Store_Data)+geom_point()
library(ggplot2)
ggplot(aes(x = dailyNetProfitThousands, y = outcomeClosedOpen), data = Store_Data) +
geom_point() +
xlab("Daily Net Profit (Thousands)") +
ylab("Outcome (Closed/Open)")
# If the daily net profits are under 5.5k or above 7.3 the outcome that they store will be closed or open is very sensitive to that threshold
summary(Store_Data_1)
##
## Call:
## glm(formula = outcomeClosedOpen ~ employeeCount + dailyNetProfitThousands +
## quartersWithHealthViolations + peoplePerSqMile, family = "binomial",
## data = Store_Data, control = list(maxit = 1000), method = "glm.fit")
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.334e-05 -2.110e-08 -2.110e-08 2.110e-08 9.414e-06
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.446e+02 4.441e+05 0 1
## employeeCount 2.388e-01 3.761e+04 0 1
## dailyNetProfitThousands 1.747e+01 6.143e+04 0 1
## quartersWithHealthViolations 4.028e+00 5.223e+04 0 1
## peoplePerSqMile 1.010e-01 1.218e+03 0 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 6.5738e+02 on 474 degrees of freedom
## Residual deviance: 4.1652e-10 on 470 degrees of freedom
## AIC: 10
##
## Number of Fisher Scoring iterations: 28
# Section 4
###Using the modeldata package, select any data and create any model. You need to explain why you chose your data and model, and discuss your ##results. If you find yourself struggling to find one. the pd_speech is a great model for logistic regression and has plenty of data.
pdSpeech <- modeldata::pd_speech
names(pdSpeech)
## [1] "gender" "PPE"
## [3] "DFA" "RPDE"
## [5] "meanPeriodPulses" "stdDevPeriodPulses"
## [7] "locPctJitter" "locAbsJitter"
## [9] "rapJitter" "ppq5Jitter"
## [11] "ddpJitter" "locShimmer"
## [13] "locDbShimmer" "apq3Shimmer"
## [15] "apq5Shimmer" "apq11Shimmer"
## [17] "ddaShimmer" "meanAutoCorrHarmonicity"
## [19] "meanNoiseToHarmHarmonicity" "meanHarmToNoiseHarmonicity"
## [21] "minIntensity" "maxIntensity"
## [23] "meanIntensity" "f1"
## [25] "f2" "f3"
## [27] "f4" "b1"
## [29] "b2" "b3"
## [31] "b4" "GQ_prc5_95"
## [33] "GQ_std_cycle_open" "GQ_std_cycle_closed"
## [35] "GNE_mean" "GNE_std"
## [37] "GNE_SNR_TKEO" "GNE_SNR_SEO"
## [39] "GNE_NSR_TKEO" "GNE_NSR_SEO"
## [41] "VFER_mean" "VFER_std"
## [43] "VFER_entropy" "VFER_SNR_TKEO"
## [45] "VFER_SNR_SEO" "VFER_NSR_TKEO"
## [47] "VFER_NSR_SEO" "IMF_SNR_SEO"
## [49] "IMF_SNR_TKEO" "IMF_SNR_entropy"
## [51] "IMF_NSR_SEO" "IMF_NSR_TKEO"
## [53] "IMF_NSR_entropy" "mean_Log_energy"
## [55] "mean_MFCC_0th_coef" "mean_MFCC_1st_coef"
## [57] "mean_MFCC_2nd_coef" "mean_MFCC_3rd_coef"
## [59] "mean_MFCC_4th_coef" "mean_MFCC_5th_coef"
## [61] "mean_MFCC_6th_coef" "mean_MFCC_7th_coef"
## [63] "mean_MFCC_8th_coef" "mean_MFCC_9th_coef"
## [65] "mean_MFCC_10th_coef" "mean_MFCC_11th_coef"
## [67] "mean_MFCC_12th_coef" "mean_delta_log_energy"
## [69] "mean_0th_delta" "mean_1st_delta"
## [71] "mean_2nd_delta" "mean_3rd_delta"
## [73] "mean_4th_delta" "mean_5th_delta"
## [75] "mean_6th_delta" "mean_7th_delta"
## [77] "mean_8th_delta" "mean_9th_delta"
## [79] "mean_10th_delta" "mean_11th_delta"
## [81] "mean_12th_delta" "mean_delta_delta_log_energy"
## [83] "mean_delta_delta_0th" "mean_1st_delta_delta"
## [85] "mean_2nd_delta_delta" "mean_3rd_delta_delta"
## [87] "mean_4th_delta_delta" "mean_5th_delta_delta"
## [89] "mean_6th_delta_delta" "mean_7th_delta_delta"
## [91] "mean_8th_delta_delta" "mean_9th_delta_delta"
## [93] "mean_10th_delta_delta" "mean_11th_delta_delta"
## [95] "mean_12th_delta_delta" "std_Log_energy"
## [97] "std_MFCC_0th_coef" "std_MFCC_1st_coef"
## [99] "std_MFCC_2nd_coef" "std_MFCC_3rd_coef"
## [101] "std_MFCC_4th_coef" "std_MFCC_5th_coef"
## [103] "std_MFCC_6th_coef" "std_MFCC_7th_coef"
## [105] "std_MFCC_8th_coef" "std_MFCC_9th_coef"
## [107] "std_MFCC_10th_coef" "std_MFCC_11th_coef"
## [109] "std_MFCC_12th_coef" "std_delta_log_energy"
## [111] "std_0th_delta" "std_1st_delta"
## [113] "std_2nd_delta" "std_3rd_delta"
## [115] "std_4th_delta" "std_5th_delta"
## [117] "std_6th_delta" "std_7th_delta"
## [119] "std_8th_delta" "std_9th_delta"
## [121] "std_10th_delta" "std_11th_delta"
## [123] "std_12th_delta" "std_delta_delta_log_energy"
## [125] "std_delta_delta_0th" "std_1st_delta_delta"
## [127] "std_2nd_delta_delta" "std_3rd_delta_delta"
## [129] "std_4th_delta_delta" "std_5th_delta_delta"
## [131] "std_6th_delta_delta" "std_7th_delta_delta"
## [133] "std_8th_delta_delta" "std_9th_delta_delta"
## [135] "std_10th_delta_delta" "std_11th_delta_delta"
## [137] "std_12th_delta_delta" "Ea"
## [139] "Ed_1_coef" "Ed_2_coef"
## [141] "Ed_3_coef" "Ed_4_coef"
## [143] "Ed_5_coef" "Ed_6_coef"
## [145] "Ed_7_coef" "Ed_8_coef"
## [147] "Ed_9_coef" "Ed_10_coef"
## [149] "det_entropy_shannon_1_coef" "det_entropy_shannon_2_coef"
## [151] "det_entropy_shannon_3_coef" "det_entropy_shannon_4_coef"
## [153] "det_entropy_shannon_5_coef" "det_entropy_shannon_6_coef"
## [155] "det_entropy_shannon_7_coef" "det_entropy_shannon_8_coef"
## [157] "det_entropy_shannon_9_coef" "det_entropy_shannon_10_coef"
## [159] "det_entropy_log_1_coef" "det_entropy_log_2_coef"
## [161] "det_entropy_log_3_coef" "det_entropy_log_4_coef"
## [163] "det_entropy_log_5_coef" "det_entropy_log_6_coef"
## [165] "det_entropy_log_7_coef" "det_entropy_log_8_coef"
## [167] "det_entropy_log_9_coef" "det_entropy_log_10_coef"
## [169] "det_TKEO_mean_1_coef" "det_TKEO_mean_2_coef"
## [171] "det_TKEO_mean_3_coef" "det_TKEO_mean_4_coef"
## [173] "det_TKEO_mean_5_coef" "det_TKEO_mean_6_coef"
## [175] "det_TKEO_mean_7_coef" "det_TKEO_mean_8_coef"
## [177] "det_TKEO_mean_9_coef" "det_TKEO_mean_10_coef"
## [179] "det_TKEO_std_1_coef" "det_TKEO_std_2_coef"
## [181] "det_TKEO_std_3_coef" "det_TKEO_std_4_coef"
## [183] "det_TKEO_std_5_coef" "det_TKEO_std_6_coef"
## [185] "det_TKEO_std_7_coef" "det_TKEO_std_8_coef"
## [187] "det_TKEO_std_9_coef" "det_TKEO_std_10_coef"
## [189] "app_entropy_shannon_1_coef" "app_entropy_shannon_2_coef"
## [191] "app_entropy_shannon_3_coef" "app_entropy_shannon_4_coef"
## [193] "app_entropy_shannon_5_coef" "app_entropy_shannon_6_coef"
## [195] "app_entropy_shannon_7_coef" "app_entropy_shannon_8_coef"
## [197] "app_entropy_shannon_9_coef" "app_entropy_shannon_10_coef"
## [199] "app_entropy_log_1_coef" "app_entropy_log_2_coef"
## [201] "app_entropy_log_3_coef" "app_entropy_log_4_coef"
## [203] "app_entropy_log_5_coef" "app_entropy_log_6_coef"
## [205] "app_entropy_log_7_coef" "app_entropy_log_8_coef"
## [207] "app_entropy_log_9_coef" "app_entropy_log_10_coef"
## [209] "app_det_TKEO_mean_1_coef" "app_det_TKEO_mean_2_coef"
## [211] "app_det_TKEO_mean_3_coef" "app_det_TKEO_mean_4_coef"
## [213] "app_det_TKEO_mean_5_coef" "app_det_TKEO_mean_6_coef"
## [215] "app_det_TKEO_mean_7_coef" "app_det_TKEO_mean_8_coef"
## [217] "app_det_TKEO_mean_9_coef" "app_det_TKEO_mean_10_coef"
## [219] "app_TKEO_std_1_coef" "app_TKEO_std_2_coef"
## [221] "app_TKEO_std_3_coef" "app_TKEO_std_4_coef"
## [223] "app_TKEO_std_5_coef" "app_TKEO_std_6_coef"
## [225] "app_TKEO_std_7_coef" "app_TKEO_std_8_coef"
## [227] "app_TKEO_std_9_coef" "app_TKEO_std_10_coef"
## [229] "Ea2" "Ed2_1_coef"
## [231] "Ed2_2_coef" "Ed2_3_coef"
## [233] "Ed2_4_coef" "Ed2_5_coef"
## [235] "Ed2_6_coef" "Ed2_7_coef"
## [237] "Ed2_8_coef" "Ed2_9_coef"
## [239] "Ed2_10_coef" "det_LT_entropy_shannon_1_coef"
## [241] "det_LT_entropy_shannon_2_coef" "det_LT_entropy_shannon_3_coef"
## [243] "det_LT_entropy_shannon_4_coef" "det_LT_entropy_shannon_5_coef"
## [245] "det_LT_entropy_shannon_6_coef" "det_LT_entropy_shannon_7_coef"
## [247] "det_LT_entropy_shannon_8_coef" "det_LT_entropy_shannon_9_coef"
## [249] "det_LT_entropy_shannon_10_coef" "det_LT_entropy_log_1_coef"
## [251] "det_LT_entropy_log_2_coef" "det_LT_entropy_log_3_coef"
## [253] "det_LT_entropy_log_4_coef" "det_LT_entropy_log_5_coef"
## [255] "det_LT_entropy_log_6_coef" "det_LT_entropy_log_7_coef"
## [257] "det_LT_entropy_log_8_coef" "det_LT_entropy_log_9_coef"
## [259] "det_LT_entropy_log_10_coef" "det_LT_TKEO_mean_1_coef"
## [261] "det_LT_TKEO_mean_2_coef" "det_LT_TKEO_mean_3_coef"
## [263] "det_LT_TKEO_mean_4_coef" "det_LT_TKEO_mean_5_coef"
## [265] "det_LT_TKEO_mean_6_coef" "det_LT_TKEO_mean_7_coef"
## [267] "det_LT_TKEO_mean_8_coef" "det_LT_TKEO_mean_9_coef"
## [269] "det_LT_TKEO_mean_10_coef" "det_LT_TKEO_std_1_coef"
## [271] "det_LT_TKEO_std_2_coef" "det_LT_TKEO_std_3_coef"
## [273] "det_LT_TKEO_std_4_coef" "det_LT_TKEO_std_5_coef"
## [275] "det_LT_TKEO_std_6_coef" "det_LT_TKEO_std_7_coef"
## [277] "det_LT_TKEO_std_8_coef" "det_LT_TKEO_std_9_coef"
## [279] "det_LT_TKEO_std_10_coef" "app_LT_entropy_shannon_1_coef"
## [281] "app_LT_entropy_shannon_2_coef" "app_LT_entropy_shannon_3_coef"
## [283] "app_LT_entropy_shannon_4_coef" "app_LT_entropy_shannon_5_coef"
## [285] "app_LT_entropy_shannon_6_coef" "app_LT_entropy_shannon_7_coef"
## [287] "app_LT_entropy_shannon_8_coef" "app_LT_entropy_shannon_9_coef"
## [289] "app_LT_entropy_shannon_10_coef" "app_LT_entropy_log_1_coef"
## [291] "app_LT_entropy_log_2_coef" "app_LT_entropy_log_3_coef"
## [293] "app_LT_entropy_log_4_coef" "app_LT_entropy_log_5_coef"
## [295] "app_LT_entropy_log_6_coef" "app_LT_entropy_log_7_coef"
## [297] "app_LT_entropy_log_8_coef" "app_LT_entropy_log_9_coef"
## [299] "app_LT_entropy_log_10_coef" "app_LT_TKEO_mean_1_coef"
## [301] "app_LT_TKEO_mean_2_coef" "app_LT_TKEO_mean_3_coef"
## [303] "app_LT_TKEO_mean_4_coef" "app_LT_TKEO_mean_5_coef"
## [305] "app_LT_TKEO_mean_6_coef" "app_LT_TKEO_mean_7_coef"
## [307] "app_LT_TKEO_mean_8_coef" "app_LT_TKEO_mean_9_coef"
## [309] "app_LT_TKEO_mean_10_coef" "app_LT_TKEO_std_1_coef"
## [311] "app_LT_TKEO_std_2_coef" "app_LT_TKEO_std_3_coef"
## [313] "app_LT_TKEO_std_4_coef" "app_LT_TKEO_std_5_coef"
## [315] "app_LT_TKEO_std_6_coef" "app_LT_TKEO_std_7_coef"
## [317] "app_LT_TKEO_std_8_coef" "app_LT_TKEO_std_9_coef"
## [319] "app_LT_TKEO_std_10_coef" "tqwt_energy_dec_1"
## [321] "tqwt_energy_dec_2" "tqwt_energy_dec_3"
## [323] "tqwt_energy_dec_4" "tqwt_energy_dec_5"
## [325] "tqwt_energy_dec_6" "tqwt_energy_dec_7"
## [327] "tqwt_energy_dec_8" "tqwt_energy_dec_9"
## [329] "tqwt_energy_dec_10" "tqwt_energy_dec_11"
## [331] "tqwt_energy_dec_12" "tqwt_energy_dec_13"
## [333] "tqwt_energy_dec_14" "tqwt_energy_dec_15"
## [335] "tqwt_energy_dec_16" "tqwt_energy_dec_17"
## [337] "tqwt_energy_dec_18" "tqwt_energy_dec_19"
## [339] "tqwt_energy_dec_20" "tqwt_energy_dec_21"
## [341] "tqwt_energy_dec_22" "tqwt_energy_dec_23"
## [343] "tqwt_energy_dec_24" "tqwt_energy_dec_25"
## [345] "tqwt_energy_dec_26" "tqwt_energy_dec_27"
## [347] "tqwt_energy_dec_28" "tqwt_energy_dec_29"
## [349] "tqwt_energy_dec_30" "tqwt_energy_dec_31"
## [351] "tqwt_energy_dec_32" "tqwt_energy_dec_33"
## [353] "tqwt_energy_dec_34" "tqwt_energy_dec_35"
## [355] "tqwt_energy_dec_36" "tqwt_entropy_shannon_dec_1"
## [357] "tqwt_entropy_shannon_dec_2" "tqwt_entropy_shannon_dec_3"
## [359] "tqwt_entropy_shannon_dec_4" "tqwt_entropy_shannon_dec_5"
## [361] "tqwt_entropy_shannon_dec_6" "tqwt_entropy_shannon_dec_7"
## [363] "tqwt_entropy_shannon_dec_8" "tqwt_entropy_shannon_dec_9"
## [365] "tqwt_entropy_shannon_dec_10" "tqwt_entropy_shannon_dec_11"
## [367] "tqwt_entropy_shannon_dec_12" "tqwt_entropy_shannon_dec_13"
## [369] "tqwt_entropy_shannon_dec_14" "tqwt_entropy_shannon_dec_15"
## [371] "tqwt_entropy_shannon_dec_16" "tqwt_entropy_shannon_dec_17"
## [373] "tqwt_entropy_shannon_dec_18" "tqwt_entropy_shannon_dec_19"
## [375] "tqwt_entropy_shannon_dec_20" "tqwt_entropy_shannon_dec_21"
## [377] "tqwt_entropy_shannon_dec_22" "tqwt_entropy_shannon_dec_23"
## [379] "tqwt_entropy_shannon_dec_24" "tqwt_entropy_shannon_dec_25"
## [381] "tqwt_entropy_shannon_dec_26" "tqwt_entropy_shannon_dec_27"
## [383] "tqwt_entropy_shannon_dec_28" "tqwt_entropy_shannon_dec_29"
## [385] "tqwt_entropy_shannon_dec_30" "tqwt_entropy_shannon_dec_31"
## [387] "tqwt_entropy_shannon_dec_32" "tqwt_entropy_shannon_dec_33"
## [389] "tqwt_entropy_shannon_dec_34" "tqwt_entropy_shannon_dec_35"
## [391] "tqwt_entropy_shannon_dec_36" "tqwt_entropy_log_dec_1"
## [393] "tqwt_entropy_log_dec_2" "tqwt_entropy_log_dec_3"
## [395] "tqwt_entropy_log_dec_4" "tqwt_entropy_log_dec_5"
## [397] "tqwt_entropy_log_dec_6" "tqwt_entropy_log_dec_7"
## [399] "tqwt_entropy_log_dec_8" "tqwt_entropy_log_dec_9"
## [401] "tqwt_entropy_log_dec_10" "tqwt_entropy_log_dec_11"
## [403] "tqwt_entropy_log_dec_12" "tqwt_entropy_log_dec_13"
## [405] "tqwt_entropy_log_dec_14" "tqwt_entropy_log_dec_15"
## [407] "tqwt_entropy_log_dec_16" "tqwt_entropy_log_dec_17"
## [409] "tqwt_entropy_log_dec_18" "tqwt_entropy_log_dec_19"
## [411] "tqwt_entropy_log_dec_20" "tqwt_entropy_log_dec_21"
## [413] "tqwt_entropy_log_dec_22" "tqwt_entropy_log_dec_23"
## [415] "tqwt_entropy_log_dec_24" "tqwt_entropy_log_dec_25"
## [417] "tqwt_entropy_log_dec_26" "tqwt_entropy_log_dec_27"
## [419] "tqwt_entropy_log_dec_28" "tqwt_entropy_log_dec_29"
## [421] "tqwt_entropy_log_dec_30" "tqwt_entropy_log_dec_31"
## [423] "tqwt_entropy_log_dec_32" "tqwt_entropy_log_dec_33"
## [425] "tqwt_entropy_log_dec_34" "tqwt_entropy_log_dec_35"
## [427] "tqwt_entropy_log_dec_36" "tqwt_TKEO_mean_dec_1"
## [429] "tqwt_TKEO_mean_dec_2" "tqwt_TKEO_mean_dec_3"
## [431] "tqwt_TKEO_mean_dec_4" "tqwt_TKEO_mean_dec_5"
## [433] "tqwt_TKEO_mean_dec_6" "tqwt_TKEO_mean_dec_7"
## [435] "tqwt_TKEO_mean_dec_8" "tqwt_TKEO_mean_dec_9"
## [437] "tqwt_TKEO_mean_dec_10" "tqwt_TKEO_mean_dec_11"
## [439] "tqwt_TKEO_mean_dec_12" "tqwt_TKEO_mean_dec_13"
## [441] "tqwt_TKEO_mean_dec_14" "tqwt_TKEO_mean_dec_15"
## [443] "tqwt_TKEO_mean_dec_16" "tqwt_TKEO_mean_dec_17"
## [445] "tqwt_TKEO_mean_dec_18" "tqwt_TKEO_mean_dec_19"
## [447] "tqwt_TKEO_mean_dec_20" "tqwt_TKEO_mean_dec_21"
## [449] "tqwt_TKEO_mean_dec_22" "tqwt_TKEO_mean_dec_23"
## [451] "tqwt_TKEO_mean_dec_24" "tqwt_TKEO_mean_dec_25"
## [453] "tqwt_TKEO_mean_dec_26" "tqwt_TKEO_mean_dec_27"
## [455] "tqwt_TKEO_mean_dec_28" "tqwt_TKEO_mean_dec_29"
## [457] "tqwt_TKEO_mean_dec_30" "tqwt_TKEO_mean_dec_31"
## [459] "tqwt_TKEO_mean_dec_32" "tqwt_TKEO_mean_dec_33"
## [461] "tqwt_TKEO_mean_dec_34" "tqwt_TKEO_mean_dec_35"
## [463] "tqwt_TKEO_mean_dec_36" "tqwt_TKEO_std_dec_1"
## [465] "tqwt_TKEO_std_dec_2" "tqwt_TKEO_std_dec_3"
## [467] "tqwt_TKEO_std_dec_4" "tqwt_TKEO_std_dec_5"
## [469] "tqwt_TKEO_std_dec_6" "tqwt_TKEO_std_dec_7"
## [471] "tqwt_TKEO_std_dec_8" "tqwt_TKEO_std_dec_9"
## [473] "tqwt_TKEO_std_dec_10" "tqwt_TKEO_std_dec_11"
## [475] "tqwt_TKEO_std_dec_12" "tqwt_TKEO_std_dec_13"
## [477] "tqwt_TKEO_std_dec_14" "tqwt_TKEO_std_dec_15"
## [479] "tqwt_TKEO_std_dec_16" "tqwt_TKEO_std_dec_17"
## [481] "tqwt_TKEO_std_dec_18" "tqwt_TKEO_std_dec_19"
## [483] "tqwt_TKEO_std_dec_20" "tqwt_TKEO_std_dec_21"
## [485] "tqwt_TKEO_std_dec_22" "tqwt_TKEO_std_dec_23"
## [487] "tqwt_TKEO_std_dec_24" "tqwt_TKEO_std_dec_25"
## [489] "tqwt_TKEO_std_dec_26" "tqwt_TKEO_std_dec_27"
## [491] "tqwt_TKEO_std_dec_28" "tqwt_TKEO_std_dec_29"
## [493] "tqwt_TKEO_std_dec_30" "tqwt_TKEO_std_dec_31"
## [495] "tqwt_TKEO_std_dec_32" "tqwt_TKEO_std_dec_33"
## [497] "tqwt_TKEO_std_dec_34" "tqwt_TKEO_std_dec_35"
## [499] "tqwt_TKEO_std_dec_36" "tqwt_medianValue_dec_1"
## [501] "tqwt_medianValue_dec_2" "tqwt_medianValue_dec_3"
## [503] "tqwt_medianValue_dec_4" "tqwt_medianValue_dec_5"
## [505] "tqwt_medianValue_dec_6" "tqwt_medianValue_dec_7"
## [507] "tqwt_medianValue_dec_8" "tqwt_medianValue_dec_9"
## [509] "tqwt_medianValue_dec_10" "tqwt_medianValue_dec_11"
## [511] "tqwt_medianValue_dec_12" "tqwt_medianValue_dec_13"
## [513] "tqwt_medianValue_dec_14" "tqwt_medianValue_dec_15"
## [515] "tqwt_medianValue_dec_16" "tqwt_medianValue_dec_17"
## [517] "tqwt_medianValue_dec_18" "tqwt_medianValue_dec_19"
## [519] "tqwt_medianValue_dec_20" "tqwt_medianValue_dec_21"
## [521] "tqwt_medianValue_dec_22" "tqwt_medianValue_dec_23"
## [523] "tqwt_medianValue_dec_24" "tqwt_medianValue_dec_25"
## [525] "tqwt_medianValue_dec_26" "tqwt_medianValue_dec_27"
## [527] "tqwt_medianValue_dec_28" "tqwt_medianValue_dec_29"
## [529] "tqwt_medianValue_dec_30" "tqwt_medianValue_dec_31"
## [531] "tqwt_medianValue_dec_32" "tqwt_medianValue_dec_33"
## [533] "tqwt_medianValue_dec_34" "tqwt_medianValue_dec_35"
## [535] "tqwt_medianValue_dec_36" "tqwt_meanValue_dec_1"
## [537] "tqwt_meanValue_dec_2" "tqwt_meanValue_dec_3"
## [539] "tqwt_meanValue_dec_4" "tqwt_meanValue_dec_5"
## [541] "tqwt_meanValue_dec_6" "tqwt_meanValue_dec_7"
## [543] "tqwt_meanValue_dec_8" "tqwt_meanValue_dec_9"
## [545] "tqwt_meanValue_dec_10" "tqwt_meanValue_dec_11"
## [547] "tqwt_meanValue_dec_12" "tqwt_meanValue_dec_13"
## [549] "tqwt_meanValue_dec_14" "tqwt_meanValue_dec_15"
## [551] "tqwt_meanValue_dec_16" "tqwt_meanValue_dec_17"
## [553] "tqwt_meanValue_dec_18" "tqwt_meanValue_dec_19"
## [555] "tqwt_meanValue_dec_20" "tqwt_meanValue_dec_21"
## [557] "tqwt_meanValue_dec_22" "tqwt_meanValue_dec_23"
## [559] "tqwt_meanValue_dec_24" "tqwt_meanValue_dec_25"
## [561] "tqwt_meanValue_dec_26" "tqwt_meanValue_dec_27"
## [563] "tqwt_meanValue_dec_28" "tqwt_meanValue_dec_29"
## [565] "tqwt_meanValue_dec_30" "tqwt_meanValue_dec_31"
## [567] "tqwt_meanValue_dec_32" "tqwt_meanValue_dec_33"
## [569] "tqwt_meanValue_dec_34" "tqwt_meanValue_dec_35"
## [571] "tqwt_meanValue_dec_36" "tqwt_stdValue_dec_1"
## [573] "tqwt_stdValue_dec_2" "tqwt_stdValue_dec_3"
## [575] "tqwt_stdValue_dec_4" "tqwt_stdValue_dec_5"
## [577] "tqwt_stdValue_dec_6" "tqwt_stdValue_dec_7"
## [579] "tqwt_stdValue_dec_8" "tqwt_stdValue_dec_9"
## [581] "tqwt_stdValue_dec_10" "tqwt_stdValue_dec_11"
## [583] "tqwt_stdValue_dec_12" "tqwt_stdValue_dec_13"
## [585] "tqwt_stdValue_dec_14" "tqwt_stdValue_dec_15"
## [587] "tqwt_stdValue_dec_16" "tqwt_stdValue_dec_17"
## [589] "tqwt_stdValue_dec_18" "tqwt_stdValue_dec_19"
## [591] "tqwt_stdValue_dec_20" "tqwt_stdValue_dec_21"
## [593] "tqwt_stdValue_dec_22" "tqwt_stdValue_dec_23"
## [595] "tqwt_stdValue_dec_24" "tqwt_stdValue_dec_25"
## [597] "tqwt_stdValue_dec_26" "tqwt_stdValue_dec_27"
## [599] "tqwt_stdValue_dec_28" "tqwt_stdValue_dec_29"
## [601] "tqwt_stdValue_dec_30" "tqwt_stdValue_dec_31"
## [603] "tqwt_stdValue_dec_32" "tqwt_stdValue_dec_33"
## [605] "tqwt_stdValue_dec_34" "tqwt_stdValue_dec_35"
## [607] "tqwt_stdValue_dec_36" "tqwt_minValue_dec_1"
## [609] "tqwt_minValue_dec_2" "tqwt_minValue_dec_3"
## [611] "tqwt_minValue_dec_4" "tqwt_minValue_dec_5"
## [613] "tqwt_minValue_dec_6" "tqwt_minValue_dec_7"
## [615] "tqwt_minValue_dec_8" "tqwt_minValue_dec_9"
## [617] "tqwt_minValue_dec_10" "tqwt_minValue_dec_11"
## [619] "tqwt_minValue_dec_12" "tqwt_minValue_dec_13"
## [621] "tqwt_minValue_dec_14" "tqwt_minValue_dec_15"
## [623] "tqwt_minValue_dec_16" "tqwt_minValue_dec_17"
## [625] "tqwt_minValue_dec_18" "tqwt_minValue_dec_19"
## [627] "tqwt_minValue_dec_20" "tqwt_minValue_dec_21"
## [629] "tqwt_minValue_dec_22" "tqwt_minValue_dec_23"
## [631] "tqwt_minValue_dec_24" "tqwt_minValue_dec_25"
## [633] "tqwt_minValue_dec_26" "tqwt_minValue_dec_27"
## [635] "tqwt_minValue_dec_28" "tqwt_minValue_dec_29"
## [637] "tqwt_minValue_dec_30" "tqwt_minValue_dec_31"
## [639] "tqwt_minValue_dec_32" "tqwt_minValue_dec_33"
## [641] "tqwt_minValue_dec_34" "tqwt_minValue_dec_35"
## [643] "tqwt_minValue_dec_36" "tqwt_maxValue_dec_1"
## [645] "tqwt_maxValue_dec_2" "tqwt_maxValue_dec_3"
## [647] "tqwt_maxValue_dec_4" "tqwt_maxValue_dec_5"
## [649] "tqwt_maxValue_dec_6" "tqwt_maxValue_dec_7"
## [651] "tqwt_maxValue_dec_8" "tqwt_maxValue_dec_9"
## [653] "tqwt_maxValue_dec_10" "tqwt_maxValue_dec_11"
## [655] "tqwt_maxValue_dec_12" "tqwt_maxValue_dec_13"
## [657] "tqwt_maxValue_dec_14" "tqwt_maxValue_dec_15"
## [659] "tqwt_maxValue_dec_16" "tqwt_maxValue_dec_17"
## [661] "tqwt_maxValue_dec_18" "tqwt_maxValue_dec_19"
## [663] "tqwt_maxValue_dec_20" "tqwt_maxValue_dec_21"
## [665] "tqwt_maxValue_dec_22" "tqwt_maxValue_dec_23"
## [667] "tqwt_maxValue_dec_24" "tqwt_maxValue_dec_25"
## [669] "tqwt_maxValue_dec_26" "tqwt_maxValue_dec_27"
## [671] "tqwt_maxValue_dec_28" "tqwt_maxValue_dec_29"
## [673] "tqwt_maxValue_dec_30" "tqwt_maxValue_dec_31"
## [675] "tqwt_maxValue_dec_32" "tqwt_maxValue_dec_33"
## [677] "tqwt_maxValue_dec_34" "tqwt_maxValue_dec_35"
## [679] "tqwt_maxValue_dec_36" "tqwt_skewnessValue_dec_1"
## [681] "tqwt_skewnessValue_dec_2" "tqwt_skewnessValue_dec_3"
## [683] "tqwt_skewnessValue_dec_4" "tqwt_skewnessValue_dec_5"
## [685] "tqwt_skewnessValue_dec_6" "tqwt_skewnessValue_dec_7"
## [687] "tqwt_skewnessValue_dec_8" "tqwt_skewnessValue_dec_9"
## [689] "tqwt_skewnessValue_dec_10" "tqwt_skewnessValue_dec_11"
## [691] "tqwt_skewnessValue_dec_12" "tqwt_skewnessValue_dec_13"
## [693] "tqwt_skewnessValue_dec_14" "tqwt_skewnessValue_dec_15"
## [695] "tqwt_skewnessValue_dec_16" "tqwt_skewnessValue_dec_17"
## [697] "tqwt_skewnessValue_dec_18" "tqwt_skewnessValue_dec_19"
## [699] "tqwt_skewnessValue_dec_20" "tqwt_skewnessValue_dec_21"
## [701] "tqwt_skewnessValue_dec_22" "tqwt_skewnessValue_dec_23"
## [703] "tqwt_skewnessValue_dec_24" "tqwt_skewnessValue_dec_25"
## [705] "tqwt_skewnessValue_dec_26" "tqwt_skewnessValue_dec_27"
## [707] "tqwt_skewnessValue_dec_28" "tqwt_skewnessValue_dec_29"
## [709] "tqwt_skewnessValue_dec_30" "tqwt_skewnessValue_dec_31"
## [711] "tqwt_skewnessValue_dec_32" "tqwt_skewnessValue_dec_33"
## [713] "tqwt_skewnessValue_dec_34" "tqwt_skewnessValue_dec_35"
## [715] "tqwt_skewnessValue_dec_36" "tqwt_kurtosisValue_dec_1"
## [717] "tqwt_kurtosisValue_dec_2" "tqwt_kurtosisValue_dec_3"
## [719] "tqwt_kurtosisValue_dec_4" "tqwt_kurtosisValue_dec_5"
## [721] "tqwt_kurtosisValue_dec_6" "tqwt_kurtosisValue_dec_7"
## [723] "tqwt_kurtosisValue_dec_8" "tqwt_kurtosisValue_dec_9"
## [725] "tqwt_kurtosisValue_dec_10" "tqwt_kurtosisValue_dec_11"
## [727] "tqwt_kurtosisValue_dec_12" "tqwt_kurtosisValue_dec_13"
## [729] "tqwt_kurtosisValue_dec_14" "tqwt_kurtosisValue_dec_15"
## [731] "tqwt_kurtosisValue_dec_16" "tqwt_kurtosisValue_dec_17"
## [733] "tqwt_kurtosisValue_dec_18" "tqwt_kurtosisValue_dec_19"
## [735] "tqwt_kurtosisValue_dec_20" "tqwt_kurtosisValue_dec_21"
## [737] "tqwt_kurtosisValue_dec_22" "tqwt_kurtosisValue_dec_23"
## [739] "tqwt_kurtosisValue_dec_24" "tqwt_kurtosisValue_dec_25"
## [741] "tqwt_kurtosisValue_dec_26" "tqwt_kurtosisValue_dec_27"
## [743] "tqwt_kurtosisValue_dec_28" "tqwt_kurtosisValue_dec_29"
## [745] "tqwt_kurtosisValue_dec_30" "tqwt_kurtosisValue_dec_31"
## [747] "tqwt_kurtosisValue_dec_32" "tqwt_kurtosisValue_dec_33"
## [749] "tqwt_kurtosisValue_dec_34" "tqwt_kurtosisValue_dec_35"
## [751] "tqwt_kurtosisValue_dec_36" "class"
pdSpeech$class
## [1] PD PD PD PD PD PD PD PD PD
## [10] PD PD control PD PD control PD PD PD
## [19] PD PD PD PD PD PD control PD control
## [28] control PD control PD PD PD control control PD
## [37] PD PD PD PD PD control control PD PD
## [46] control PD control control control PD PD PD PD
## [55] PD PD PD PD PD PD PD PD PD
## [64] PD PD control PD PD PD control PD PD
## [73] PD control PD control PD PD control PD PD
## [82] PD PD control PD PD PD PD PD control
## [91] PD PD PD PD PD PD control PD PD
## [100] PD PD PD PD control PD PD PD PD
## [109] PD PD PD control PD PD PD PD PD
## [118] PD PD control PD PD PD control PD control
## [127] PD PD PD PD control control control PD PD
## [136] control control PD PD PD PD PD PD PD
## [145] PD PD PD PD PD control PD PD PD
## [154] control PD PD control control PD PD PD PD
## [163] PD control PD PD PD PD PD PD PD
## [172] PD PD control PD PD PD PD control PD
## [181] control PD PD PD PD PD PD control PD
## [190] control PD PD control PD control control control PD
## [199] control PD PD PD PD control PD PD PD
## [208] PD PD PD control PD PD control PD PD
## [217] control PD PD control PD control control PD PD
## [226] PD PD PD PD PD PD PD control PD
## [235] control control PD control PD PD PD PD control
## [244] PD control control control PD PD PD control control
## Levels: PD control
pdSpeech$rapJitter
## [1] 5.866667e-04 1.823333e-03 3.233333e-04 8.666667e-05 1.096667e-03
## [6] 2.033333e-04 2.100000e-04 2.743333e-03 2.966667e-04 1.900000e-04
## [11] 8.166667e-04 2.866667e-04 5.233333e-04 4.666667e-04 2.433333e-04
## [16] 6.966667e-04 6.566667e-04 1.533333e-04 6.600000e-04 1.733333e-04
## [21] 1.966667e-04 2.933333e-04 5.666667e-05 7.200000e-04 7.833333e-04
## [26] 1.966667e-04 3.233333e-04 2.433333e-04 1.333333e-04 9.333333e-05
## [31] 1.580000e-03 1.026667e-03 2.086667e-03 2.733333e-04 2.066667e-04
## [36] 2.366667e-04 2.333333e-04 2.833333e-04 2.666667e-04 5.433333e-04
## [41] 6.000000e-04 2.666667e-05 1.830000e-03 2.500000e-04 2.633333e-04
## [46] 2.300000e-04 2.283333e-03 1.766667e-04 4.333333e-05 5.000000e-05
## [51] 9.333333e-05 2.500000e-04 1.933333e-04 6.700000e-04 5.600000e-04
## [56] 1.966667e-04 5.600000e-04 4.000000e-04 1.733333e-04 2.400000e-04
## [61] 7.800000e-04 3.466667e-04 4.366667e-04 8.933333e-04 4.900000e-04
## [66] 1.300000e-04 2.700000e-04 3.300000e-04 3.000000e-04 1.200000e-04
## [71] 1.600000e-04 1.800000e-04 9.533333e-04 1.430000e-03 1.476667e-03
## [76] 5.366667e-04 8.000000e-05 4.343333e-03 4.433333e-04 1.966667e-04
## [81] 1.053333e-03 4.066667e-04 3.733333e-04 1.333333e-04 2.333333e-04
## [86] 1.200000e-04 6.533333e-04 1.906667e-03 7.066667e-04 1.133333e-04
## [91] 2.570000e-03 2.103333e-03 2.000000e-04 2.333333e-04 5.266667e-04
## [96] 1.386667e-03 5.800000e-04 1.156667e-03 1.733333e-04 1.500000e-04
## [101] 4.533333e-04 1.100000e-03 2.376667e-03 5.533333e-04 9.733333e-04
## [106] 1.250000e-03 1.003333e-03 3.500000e-04 3.833333e-04 1.366667e-04
## [111] 5.833333e-04 5.733333e-04 1.486667e-03 4.374944e-03 1.766667e-04
## [116] 3.400000e-04 1.436667e-03 1.043333e-03 1.766667e-04 9.000000e-05
## [121] 5.600000e-04 1.330000e-03 3.533333e-04 2.033333e-04 1.210000e-03
## [126] 1.533333e-04 5.466667e-04 6.900000e-04 2.500000e-04 4.300000e-04
## [131] 3.466667e-04 1.100000e-04 1.033333e-04 1.966667e-04 4.966667e-04
## [136] 9.666667e-05 1.133333e-04 5.233333e-04 6.533333e-04 5.800000e-04
## [141] 7.133333e-04 8.736667e-03 1.766667e-04 3.066667e-04 2.766667e-04
## [146] 2.233333e-04 1.323333e-03 5.333333e-05 5.500000e-04 4.000000e-05
## [151] 6.866667e-04 2.506667e-03 3.233333e-04 5.166667e-04 7.966667e-04
## [156] 1.023333e-03 7.400000e-04 9.400000e-04 4.166667e-04 4.833333e-04
## [161] 1.500000e-04 2.933333e-04 3.833333e-04 2.766667e-04 5.833333e-04
## [166] 1.033333e-04 2.066667e-04 2.433333e-04 2.776667e-03 9.866667e-04
## [171] 7.400000e-04 2.233333e-04 1.133333e-03 1.233333e-04 2.800000e-04
## [176] 2.000000e-04 1.300000e-04 2.400000e-04 1.486667e-03 1.936667e-03
## [181] 9.333333e-05 1.600000e-04 1.566667e-04 4.833333e-04 2.900000e-04
## [186] 3.766667e-04 3.466667e-04 2.500000e-04 1.866667e-04 1.166667e-04
## [191] 2.666667e-04 2.233333e-04 1.233333e-04 3.166667e-04 6.333333e-05
## [196] 3.000000e-04 6.000000e-05 1.133333e-04 4.400000e-04 2.333333e-04
## [201] 5.066667e-04 2.233333e-04 2.590000e-03 1.866667e-04 9.366667e-04
## [206] 1.700000e-04 1.200000e-04 4.733333e-04 5.433333e-04 1.566667e-04
## [211] 3.133333e-04 3.733333e-04 4.400000e-04 2.866667e-04 5.896667e-03
## [216] 1.333333e-03 1.566667e-04 3.233333e-04 4.466667e-04 9.333333e-05
## [221] 7.033333e-04 8.666667e-05 1.433333e-04 1.106667e-03 1.266667e-04
## [226] 2.400000e-04 3.233333e-04 1.233333e-03 2.800000e-04 2.300000e-04
## [231] 1.533333e-04 3.733333e-04 3.433333e-04 1.100000e-04 4.800000e-04
## [236] 1.033333e-04 1.366667e-04 1.533333e-04 1.033333e-04 1.376667e-03
## [241] 1.433333e-04 1.766667e-04 3.633333e-04 1.666667e-04 1.600000e-04
## [246] 5.200000e-04 2.300000e-04 7.033333e-04 7.033333e-04 1.366667e-04
## [251] 1.200000e-04 1.400000e-04
int_mod <- glm(class ~ rapJitter,
data = pdSpeech,
family=binomial(link= "logit"))
summary(int_mod)
##
## Call:
## glm(formula = class ~ rapJitter, family = binomial(link = "logit"),
## data = pdSpeech)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.9925 -0.8703 -0.6794 1.3572 2.6209
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3634 0.2280 -1.594 0.111001
## rapJitter -1660.3671 504.4193 -3.292 0.000996 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 285.59 on 251 degrees of freedom
## Residual deviance: 265.97 on 250 degrees of freedom
## AIC: 269.97
##
## Number of Fisher Scoring iterations: 6
exp(int_mod$coefficients)-1
## (Intercept) rapJitter
## -0.3046708 -1.0000000
#The model has a modified coefficient of -1, indicating that anyvalue of rapJitter decreases chance of being in the control group by 100%