Lacey Maths & Stats Consultancy
Lacey Maths & Stats Consultancy
  • Видео 42
  • Просмотров 62 483
Plot of Effect Sizes from Pairwise Comparisons
Short video demonstration on plotting effect size statistics to complement pairwise comparison results from emmeans() in RStudio.
Script used in the video can be downloaded from: github.com/seanwithafada/Plot-of-Effect-Sizes-from-Pairwise-Comparisons.
Просмотров: 466

Видео

Effect size of Pairwise Comparisons using emmeans
Просмотров 2,6 тыс.2 года назад
A short video on generating effect size statistics to complement pairwise comparisons results from emmeans() in RStudio. Script used in the video can be downloaded from: github.com/seanwithafada/Effect-size-of-Pairwise-Comparisons-using-emmeans.
Generating a Randomisation Schedule
Просмотров 2702 года назад
Short video on generating a randomisation schedule in RStudio. Script used in the video can be downloaded from: github.com/seanwithafada/Generating-a-Randomisation-Schedule.
Interaction plots in ggplot2
Просмотров 1,4 тыс.2 года назад
A short video demonstrating how to produce interaction plots in RStudio using the ggplot2 package, for a continuous measurement in terms of 2 factors, 3 factors and 4 factors. Script used in the video can be copied from the following: github.com/seanwithafada/Interaction-plots-in-ggplot2.
Estimated Marginal Means in ggplot2
Просмотров 3,5 тыс.2 года назад
Calculation and plotting of estimated marginal means from a linear mixed model and ANOVA with two factors. Script used in the video can be downloaded from: github.com/seanwithafada/Estimated-Marginal-Means-in-ggplot2.
Spaghetti plots in ggplot2
Просмотров 1,9 тыс.2 года назад
Short video on various tweaks to RStudio script to generate spaghetti plots in ggplot2. Script used in the video can be downloaded from: github.com/seanwithafada/Spaghetti-plots-in-ggplot2.
Highlighting boxplots in ggplot2
Просмотров 4282 года назад
A short video demonstrating script that could be used to highlight a boxplot in a sequence of boxplots for one and two factors using the mutate and ggplot functions in RStudio. Script used in the video can be downloaded from: github.com/seanwithafada/Highlighting-boxplots-in-ggplot2. Also, here are the links to other videos on: - Editing boxplots - ruclips.net/video/xo_EBOiYiEA/видео.html; - La...
Labelling outliers in ggplot2
Просмотров 2,8 тыс.2 года назад
A short video demonstrating script to label outliers in boxplots using ggplot. Script used in the video can be downloaded from: github.com/seanwithafada/Labelling-outliers-in-ggplot2. Here is the link to another video on editing boxplots using ggplot2: ruclips.net/video/xo_EBOiYiEA/видео.html.
Boxplots in ggplot2
Просмотров 3,8 тыс.2 года назад
Demonstration of sample RStudio script on formatting boxplots using ggplot2: - Including Whiskers; - Labelling and Scaling Axes; - Changing Colours; - Including Mean Point; - Dot plot v. Jitter plot; - Annotating Participant ID; - Labelling Outliers. Script used in the video can be downloaded from: github.com/seanwithafada/Boxplots-in-ggplot2.
Histograms in ggplot2
Просмотров 4503 года назад
Demonstration of sample RStudio script on formatting histograms using ggplot2: - Setting Intervals/Bins; - Labeling and Scaling Axes; - Annotating Bars with Frequencies; - Including/Excluding Cut-points; - Probability Density Function Curve; - Split by Factor(s); - Colours of Bars. Script used in the video can be downloaded from: github.com/seanwithafada/Histograms-in-ggplot2.
Incremental Area Under the Curve
Просмотров 1,2 тыс.3 года назад
Demonstrates incremental Area Under the Curve (iAUC) Cut and Min methods using RStudio. Script used in the video can be downloaded from: github.com/seanwithafada/Incremental-Area-Under-the-Curve. Follows from a previous video (ruclips.net/video/28WKEPtaIkQ/видео.html) outlining the steps involved in determining the total Area Under the Curve using Trapezoidal's rule, along with Positive Increme...
Repeated Measures ANOVA & Linear Mixed Models in RStudio
Просмотров 6 тыс.3 года назад
A short video demonstrating script for Repeated Measures ANOVA & Linear Mixed Models in RStudio. Functions used are ezANOVA(), aov_car(), lme() and lmer(). Script used in the video can be downloaded from: github.com/seanwithafada/Repeated-Measures-ANOVA-Linear-Mixed-Models-in-RStudio.
Hypotheses, Level of Significance and p-values
Просмотров 4633 года назад
A brief overview to some statistical terminology to complement statistical testing - null and alternative hypotheses, types of error, level of significance, p-values and effect sizes.
Summarising a Linear Model Selection Process in RStudio
Просмотров 1653 года назад
This video demonstrates an approach to summarising a linear model selection process in RStudio, followed by writing the results to Excel. Script used in the video can be downloaded from: github.com/seanwithafada/Presenting-Linear-Regression-Analysis-Results.
Presenting Multiple Linear Regression Analysis Results in RStudio
Просмотров 2 тыс.3 года назад
This video demonstrates a sample presentation style to multiple linear regression analysis results using RStudio, followed by writing the results to Excel. Script used in the video can be downloaded from: github.com/seanwithafada/Presenting-Linear-Regression-Analysis-Results.
Presenting Simple Linear Regression Analysis Results in RStudio
Просмотров 6423 года назад
Presenting Simple Linear Regression Analysis Results in RStudio
F-ratio calculation in Excel (Randomised Block Design)
Просмотров 1073 года назад
F-ratio calculation in Excel (Randomised Block Design)
F-ratio calculation in Excel (Two-Way ANOVA)
Просмотров 2853 года назад
F-ratio calculation in Excel (Two-Way ANOVA)
F-ratio calculation in Excel (One-Way ANOVA)
Просмотров 1,2 тыс.3 года назад
F-ratio calculation in Excel (One-Way ANOVA)
Power Analysis in G*Power & RStudio (RM ANOVA)
Просмотров 1,1 тыс.3 года назад
Power Analysis in G*Power & RStudio (RM ANOVA)
Power Analysis in G*Power & RStudio (t-test)
Просмотров 9013 года назад
Power Analysis in G*Power & RStudio (t-test)
Using Custom Tables in SPSS
Просмотров 3,8 тыс.3 года назад
Using Custom Tables in SPSS
Chi-squared test on NVivo data
Просмотров 4383 года назад
Chi-squared test on NVivo data
Incremental Area Under the Curve (iAUC)
Просмотров 6 тыс.4 года назад
Incremental Area Under the Curve (iAUC)
Summarising paired samples t-test and Wilcoxon test results in RStudio
Просмотров 2124 года назад
Summarising paired samples t-test and Wilcoxon test results in RStudio
Summarising independent samples t-test and Mann-Whitney U-test results in RStudio
Просмотров 2054 года назад
Summarising independent samples t-test and Mann-Whitney U-test results in RStudio
Summarising one-sample t-test and Wilcoxon test results in RStudio
Просмотров 2504 года назад
Summarising one-sample t-test and Wilcoxon test results in RStudio
Checking homogeneity of variances, sphericity and writing RStudio results to Excel
Просмотров 9894 года назад
Checking homogeneity of variances, sphericity and writing RStudio results to Excel
Checking normality of measurements in RStudio
Просмотров 2054 года назад
Checking normality of measurements in RStudio
SPSS Syntax to format dataset and reorder negatively worded questions before a Factor Analysis
Просмотров 1164 года назад
SPSS Syntax to format dataset and reorder negatively worded questions before a Factor Analysis

Комментарии

  • @serenadeization
    @serenadeization 3 месяца назад

    Hello - first, thank you for posting this very helpful video. Regarding this line of code: res2$n/4+2, which you used to justify the final total sample size (sample size/numbers of levels -1 + 2). I recently purchased the textbook "Practical Statistical Power Analysis" by the developers of Web Power and it seems (at least according to my reading) that the sample size calculated by the wp.rmanova function is the total sample size. More specifically, I couldn't find any justification in the authors' examples for the line of code that you added afterwards. At the same time, I suspect that it is correct given alignment with G*Power. Can you help me understand how you decided to use that line of code when the developers of Web Power themselves have not (seemingly) addressed this issue?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 3 месяца назад

      Hi. Thank you for the feedback. The additional line is mainly down to determining the size per group, The first part of the additional line of n/(df of # measurements/timepoints) is clear cut, but then when I tried to align with G*Power, I found that I was regularly 2 off, i.e., # groups, for the data used. The adjustment was purely to align with G*Power. I'd imagine this adjustment is due to rounding in the sample size calculations as there is a lot happening behind the scenes. You could argue that the "+ # groups" is not needed, but then there will be a minor difference between R and G*Power in output. I just found the adjustment a minor "trick" that appeared to align both packages. Hope this helps.

  • @user-js6fl2im9c
    @user-js6fl2im9c 5 месяцев назад

    Hi, I'm wondering what would be the method to find partial eta squared for the repeated measures ANOVA using lme function?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 5 месяцев назад

      A few options out there, but I generally use the eta_sq() function in the sjstats package.

  • @binhomosta4593
    @binhomosta4593 5 месяцев назад

    Great. Thanks for sharing knowledge.

  • @HUstudent123
    @HUstudent123 7 месяцев назад

    Question: If the estimated marginal means is not your main analysis but simply used to visually present differences between groups from an earlier regression (mediation analysis), is it possible to present the visualization without the numerical analysis? Random question without much context, but just wondering if you've come across an article that does that.

    • @RI_MTU
      @RI_MTU 5 месяцев назад

      I'd probably just plot the 95% CI of the means, as opposed the estimated marginal means, if all you're interested in is a visual. A video on interaction plots that I have may help here ... ruclips.net/video/IFrL4f86nIM/видео.html.

  • @DB-kv3wu
    @DB-kv3wu 7 месяцев назад

    The tutor was good, but the language n the way you descibing is not atacive.

  • @Fly_Jorge
    @Fly_Jorge 10 месяцев назад

    Why do the emmeans standard error values look the same from the emmeans output but they arent similar when looking at the effect size?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 5 месяцев назад

      The output that complements the effect size are the 95% CI limits, which are different to the standard error values. The CI is the mean +- margin of error. When the margin of error is the standard error divided by sqrt(n).

  • @AI_TV150
    @AI_TV150 Год назад

    If I have more than 100 samples, Should I calculate mean for each time point Or togetherly I will take all samples for Positive Incremental AUC Analysis?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      I would generally work out the AUC for each individual sample.

    • @AI_TV150
      @AI_TV150 Год назад

      @@LaceyMathsStatsConsultancy so If we will do for each single sample then by using all values we will perform statistical test then?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      @user-pm8gz3jr1w Yes ... you set up a for loop to calculate each AUC for each sample, then create a dataframe mapping each sample to corresponding AUC.

    • @AI_TV150
      @AI_TV150 Год назад

      @@LaceyMathsStatsConsultancy thank you sir for your assistance

    • @AI_TV150
      @AI_TV150 11 месяцев назад

      Sir how I will create a Loop for this analysis can You please tell me. Like I will fix something in Loop take one by one sample sets for calculations of AUC?

  • @thanasismouratidis3702
    @thanasismouratidis3702 Год назад

    Excellent presentation! Thanks a lot!

  • @alyssawang144
    @alyssawang144 Год назад

    Thank you soooooo much for sharing this.

  • @designedfore
    @designedfore Год назад

    Thanks for the clear video! I was wondering if the presented models account for autocorrelation (and whether they even should or not)?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      Not really. This is for the user to ensure that if there are multiple explanatory continuous variables in the model, that these variables are not autocorrelated, e.g., using variance inflation factor. Also, it's important that if the purpose is model fitting, that the model residuals are checked for normality and randomness.

    • @designedfore
      @designedfore Год назад

      @@LaceyMathsStatsConsultancy Thanks! Sorry I actually meant temporal autocorrelation. I find it difficult to get my head around that concept or how to properly implement it in repeated measures models!

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      @@designedfore I'd imagine in this case, it would be a matter of checking the autocorrelation of the residuals from the model. So if the model residuals are not approximately normally distributed and random, then there is a potential issue with the model. I can look to do a video on this, if you feel it may be of help?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 5 месяцев назад

      @@designedfore - some interesting info on temporal autocorrelation on www.flutterbys.com.au/stats/tut/tut8.3a.html

  • @jacquelynstephens6628
    @jacquelynstephens6628 Год назад

    This is such a great walkthrough of estimated marginal means and how to plot them. Thank you!!

  • @ehuntley
    @ehuntley Год назад

    This was fantastic, and an excellent extension to cover the gaps not clearly explained or spelled out in the emmeans vignettes. Thank you for putting this together!

  • @jessstace9895
    @jessstace9895 Год назад

    sorry stupid question but how at 5 minutes in, did you bring up that extra tab which was the G power one? Thanks :)

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      Hi Jess, That's a package separate to RStudio which can be downloaded from: www.psychologie.hhu.de/arbeitsgruppen/allgemeine-psychologie-und-arbeitspsychologie/gpower.

  • @melanielebon6758
    @melanielebon6758 Год назад

    Hey thank you very much for the video. Really useful! Can you please break down a little bit line 77. I couldn't find any clear explanation in the documentation. In my case I have 1 group and 4 repeated measures. So i did: (res<-ezANOVA(data = df, dv = value, wid=horse_id, within = treatment, return_aov = T)) (effect<-anova_stats(res$aov)) (eff<-effect$cohens.f[2]) (power <- wp.rmanova(n = NULL, ng = 1, nm = 4, f = eff, nscor = 1, alpha = 0.05, power = 0.8, type = 1)) (power$n) (ceiling(power$n/3+1)) # is that correct?? I am not quite sure how to interpret this in term of number of animals required for the experiment.

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      Yes, you are correct. It is the sample size outputted from the power calculation divided by the number of levels to the within subjects factor less one + number of levels to the between subjects factor. So, if using the notation from the script: It's the ceiling to [n/(nm - 1) + ng]. Is that ok?

    • @melanielebon6758
      @melanielebon6758 Год назад

      @@LaceyMathsStatsConsultancy Awesome! thank you very very much!!

  • @afonsoosorio2099
    @afonsoosorio2099 Год назад

    Awesome 👌, right at the outline and I can sense it is the best and the most informative tutorial in boxplot by all standards 👏

  • @larissacury7714
    @larissacury7714 Год назад

    Thank you!

  • @larissacury7714
    @larissacury7714 Год назад

    Would you go over why why 'eta' or the 'partial eta' is the aproppriate effect size estimate here? Which estimate is eff_size actually calculating for the pairwise comparisons?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      eff_size outputs partial eta-squared. There are some nice points, with references to support, on eta-squared and partial eta-squared, and when to use on: stats.stackexchange.com/questions/15958/how-to-interpret-and-report-eta-squared-partial-eta-squared-in-statistically.

    • @larissacury7714
      @larissacury7714 Год назад

      @@LaceyMathsStatsConsultancy ​ thanks! great post, indeed! I've just opened a post on CV asking about that. My case is very similar to yours (youtube won't let me paste my CV link here). I have a mod1 <- lmer(Y ~ GROUP * YEAR + (1|PARTICIPANTS) and then I'm doing: emm1 <- emmeans(mod1,~YEAR|GROUP) and emmeans(mod1,~GROUP * YEAR) . Each group has 2 levels (Group 1 and Group 2) and Year has 2 levels (year 1 and year 2) too. Then I'm calculating as you've said in the video: eff_size(emm1, sigma = sigma(mod1), edf = df.residual(mod1))

    • @larissacury7714
      @larissacury7714 Год назад

      so are the partial n² suitable in this case?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      @Larissa Cury Partial eta-squared is what I'd use in the scenario you've outlined, clearly outlining it's classification in the Methods section of a report.

    • @larissacury7714
      @larissacury7714 Год назад

      @@LaceyMathsStatsConsultancy thank you! what do you mean by cleary outlining its classification?

  • @larissacury7714
    @larissacury7714 Год назад

    Thanks, do you have any tips on how to report these results?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      The last few lines of script give an example of how to report the effect size statistics with corresponding p-values, em means and CIs. All that would be left is to write the results to Excel and then you are good to go.

  • @larissacury7714
    @larissacury7714 Год назад

    Thank you! What about the warning about the interaction? What can (or should) we do about it?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy Год назад

      That warning is just informing the user that there are interaction effects. Typically, the interaction effects are your primary outcome, with the main effects being your secondary outcome. The warning is not an error but just a form of signposting in case the user is not aware of interaction effect(s) being present. The effect sizes from the main effect are still accurate.

    • @larissacury7714
      @larissacury7714 Год назад

      @@LaceyMathsStatsConsultancy so when I'm performing emmeans(model,~ B|C) %>% pairs(adjust="Tukey"), am I accouting for that? I don't get the warning (being the model: Y ~ B * C + (1|ID))

    • @larissacury7714
      @larissacury7714 Год назад

      @@LaceyMathsStatsConsultancy thank you!

  • @lukasdiedrich2671
    @lukasdiedrich2671 Год назад

    Great! Exactly what i was looking for! Thank you very much!

  • @beaablay4500
    @beaablay4500 Год назад

    It is possible to compute IAUC using excel?

  • @betaways
    @betaways Год назад

    Very helpful. Thanks

  • @alessandrorosati969
    @alessandrorosati969 Год назад

    How is it possible to generate outliers uniformly in the p-parallelotope defined by the coordinate-wise maxima and minima of the ‘regular’ observations in R?

  • @Supertajt
    @Supertajt Год назад

    Great! Thank you:)

  • @enduringfamiliesveteranser1133

    It took us a while to find a video series covering syntax (including string to numeric) from start to finish. This is great. Thank you

  • @enduringfamiliesveteranser1133

    Amazing. Thank you

  • @shreshthaawasthi3135
    @shreshthaawasthi3135 Год назад

    Thank you very much

  • @theconfusionmatrix8479
    @theconfusionmatrix8479 2 года назад

    Are the codes to the videos on a git repo?thanks!

  • @Muuip
    @Muuip 2 года назад

    Great presentation, much appreciated.

  • @ksch1177
    @ksch1177 2 года назад

    great video, thanks a lot! I have a question: When changing the width of the errorbar, the whole whisker changes in position. Does anyone know how to fix that?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 2 года назад

      Thanks for the feedback. Within the argument to stat_boxplot, you can include width=0.25, but this upsets the position of the whiskers, however, including position_dodge(width=0.75) will fix the alignment, e.g., stat_boxplot(geom = "errorbar",width=0.25, position = position_dodge(width = 0.75)) Hope this helps.

  • @AashishT
    @AashishT 2 года назад

    Thanks Lacey !

  • @adelinalarsen3331
    @adelinalarsen3331 2 года назад

    Thank you for the video and scripts!!!

  • @fofim810
    @fofim810 2 года назад

    Thank you for your videos. Very helpful and easy to follow and understand.

  • @ngasefa1162
    @ngasefa1162 2 года назад

    I mean, some of the syntaxes and descriptions are hidden on the right side of the Rstudio

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 2 года назад

      Hope the script from the following link is a help: drive.google.com/drive/folders/1qxJh5U5hzqznJG-vXlW7XvZ4uDk-S0g5?usp=sharing

  • @ngasefa1162
    @ngasefa1162 2 года назад

    Thank you for demonstrating this piece of work on mixed models, but, would have been easier if you can also deliver the syntaxes used (downloadable) for people like me.

  • @capricovino1
    @capricovino1 2 года назад

    Hi thanks for this - is there a shareable r script with the code for the incremental and net area under the curve that you show in the video?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 2 года назад

      No problem. Script can be copied from the following link: drive.google.com/drive/folders/1wvHXV-_ZPFTjTCy5FP2SgGGLBni1i_mD?usp=sharing

  • @brazilfootball
    @brazilfootball 2 года назад

    How do we get G*Power?

    • @LaceyMathsStatsConsultancy
      @LaceyMathsStatsConsultancy 2 года назад

      www.psychologie.hhu.de/arbeitsgruppen/allgemeine-psychologie-und-arbeitspsychologie/gpower

  • @ashapaudel699
    @ashapaudel699 2 года назад

    It is really helpful video and covers so many easy steps to make cool boxplots. Thank you so much for sharing!

  • @2Yemen
    @2Yemen 2 года назад

    Thank you sir. it is useful tutorial

  • @jooyeonjamieim6545
    @jooyeonjamieim6545 2 года назад

    Thank you so much for this video! This was exactly what I was looking for. :) For upcoming videos, it will be extra helpful if you can briefly discuss how we interpret the results as well as how people typically report the results in academic papers (e.g., F(2, 87) = 1.52, p = 0.22)

  • @khaledabegum3211
    @khaledabegum3211 2 года назад

    It was a very good video for me, please do the next video...

  • @LaceyMathsStatsConsultancy
    @LaceyMathsStatsConsultancy 3 года назад

    The design of this thumbnail is all down to the great work of my son, Ciarán.

    • @orlandojunior3016
      @orlandojunior3016 3 года назад

      Hi Dear professor Lacey! I'm moving to Cork in 2022 and I'll apply to Data science course(Higher Diploma) in CIT. Will you be teaching in that course next year? Hugs from Brasil! Hope to meet you soon.

  • @odaamargaa1150
    @odaamargaa1150 3 года назад

    very interesting, share me the syntax

  • @LaceyMathsStatsConsultancy
    @LaceyMathsStatsConsultancy 3 года назад

    All credit for this colourful thumbnail is to my super creative daughter, Aoibhe.

  • @LaceyMathsStatsConsultancy
    @LaceyMathsStatsConsultancy 3 года назад

    A massive shout out and thank you to my niece, Saoirse, for designing the super creative thumbnail for this video.

  • @pyrogaming226
    @pyrogaming226 3 года назад

    Syntax for fix code in fix variable

  • @nyashapatiencemandeya1128
    @nyashapatiencemandeya1128 3 года назад

    Thank you for this good illustration.

  • @nyashapatiencemandeya1128
    @nyashapatiencemandeya1128 3 года назад

    thank you. Very helpful

  • @amanda_dela
    @amanda_dela 3 года назад

    thank you