class: center, middle, inverse, title-slide .title[ #
My presentation
] .subtitle[ ##
An Example
] .author[ ###
Yuanqi Zhang
] .institute[ ###
West Chester University of Pennsylvania
] .date[ ###
09/20/2022
] --- class: inverse, middle <!-- This sets the background color to black and align the text in the slide --> <!-- Comments must be placed after the line of the page of configuration and also be placed in separate lines. --> <!-- use "---" to close each slide --> <!-- not comments should placed immediately before "---" --> ## <center><b>Topic </b></center> <!-- level 2 title --> ### Our data <!-- level 3 title --> ### Data analysis <!-- level 3 title --> ### Publishing Presentation: Story --- # <center>R Outputs </center> # These are our results and p-values in order to see whether the explanatory variables are statistically significant. The standard error is the difference between our observed results and predicted results. We want to see how much does height and weight affect the length of the catheter that a patient requires. # ```r read.table("https://people.sc.fsu.edu/~jburkardt/datasets/regression/x02.txt", skip = 36) ``` ``` # V1 V2 V3 V4 # 1 1 42.8 40.0 37 # 2 2 63.5 93.5 50 # 3 3 37.5 35.5 34 # 4 4 39.5 30.0 36 # 5 5 45.5 52.0 43 # 6 6 38.5 17.0 28 # 7 7 43.0 38.5 37 # 8 8 22.5 8.5 20 # 9 9 37.0 33.0 34 # 10 10 23.5 9.5 30 # 11 11 33.0 21.0 38 # 12 12 58.0 79.0 47 ``` ```r myRegDat = read.table("https://people.sc.fsu.edu/~jburkardt/datasets/regression/x02.txt", skip = 36) names(myRegDat) = c("ID", "Weight", "height", "length") myRegDat ``` ``` # ID Weight height length # 1 1 42.8 40.0 37 # 2 2 63.5 93.5 50 # 3 3 37.5 35.5 34 # 4 4 39.5 30.0 36 # 5 5 45.5 52.0 43 # 6 6 38.5 17.0 28 # 7 7 43.0 38.5 37 # 8 8 22.5 8.5 20 # 9 9 37.0 33.0 34 # 10 10 23.5 9.5 30 # 11 11 33.0 21.0 38 # 12 12 58.0 79.0 47 ``` ```r fit = lm(length~ height + Weight, data = myRegDat) ``` --- # <center>Specified names</center> ```r names(myRegDat) = c("ID", "Weight", "height", "length") myRegDat ``` ``` ID Weight height length 1 1 42.8 40.0 37 2 2 63.5 93.5 50 3 3 37.5 35.5 34 4 4 39.5 30.0 36 5 5 45.5 52.0 43 6 6 38.5 17.0 28 7 7 43.0 38.5 37 8 8 22.5 8.5 20 9 9 37.0 33.0 34 10 10 23.5 9.5 30 11 11 33.0 21.0 38 12 12 58.0 79.0 47 ``` ```r # ``` --- # <center>R Plots</center> ```r plot(myRegDat, pch = 19, col = 'darkgray', las = 1) abline(fit, lwd = 2) ``` ``` ## Warning in abline(fit, lwd = 2): only using the first two of 3 regression ## coefficients ``` <img src="data:image/png;base64,#exampleHTMLPrentation_files/figure-html/myRegDat-1.png" style="display: block; margin: auto;" /> --- ```r fit = lm(length~ height + Weight, data = myRegDat) coef(summary(fit)) ``` ``` # Estimate Std. Error t value Pr(>|t|) # (Intercept) 20.3757645 8.3859486 2.4297507 0.03799809 # height 0.1910949 0.1582713 1.2073884 0.25805480 # Weight 0.2107473 0.3455364 0.6099133 0.55700277 ``` ```r summary(fit) ``` ``` # # Call: # lm(formula = length ~ height + Weight, data = myRegDat) # # Residuals: # Min 1Q Median 3Q Max # -6.7419 -1.2034 -0.2595 1.8892 6.6566 # # Coefficients: # Estimate Std. Error t value Pr(>|t|) # (Intercept) 20.3758 8.3859 2.430 0.038 * # height 0.1911 0.1583 1.207 0.258 # Weight 0.2107 0.3455 0.610 0.557 # --- # Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # # Residual standard error: 3.778 on 9 degrees of freedom # Multiple R-squared: 0.8254, Adjusted R-squared: 0.7865 # F-statistic: 21.27 on 2 and 9 DF, p-value: 0.0003888 ``` --- class: center, middle # <center>Youtube Video </center> -It is important to find the right catheter length according to the patient's weight and height otherwise they may be uncomfortable or cause pain if its too big. If its too small, it can cause leaks or it may take a while to drain liquid, while patients prepare for bladder surgery. <iframe width="470" height="345" src="https://www.youtube.com/embed/-RysxIAgT7c"></iframe> class: middle # <center>Story</center> --- class: inverse, center, middle # Thanks!