Skip to the content Skip to the Navigation

Jack R Auty

  • Lab Home Page
  • Research
    • Epidemiological Research into Alzheimer’s Disease and Common Pain Relieving Drugs
    • The inflammatory nature of microplastics
    • Zinc deficiency and Alzheimer’s disease
  • Publications
  • Outreach
  • Tools
  • Web appsWeb apps created by Jack
    • TDP proteomics explorer
    • Ice breaker
    • Exploration of RNAseq and Epidemiological datasets
    • Feedback selector
    • Novel Object Recognition Task Timer
    • Pomodoro timer
    • Power Calculator
    • Power Calculator Cohen’s D
  • R Code
    • A complete guide to ANOVAs in R
    • ANOVAs One-way and two-way
    • Finding an outlier using Cook’s distance
    • Generalized mixed modelling
    • How to make a simple bar graph in R
    • How to make a Rain Cloud Plot (aka a Rotated Violin plot)
    • Mediation analysis with nuisance variables.
    • Multi-level linear model (repeated measure ANOVA)
    • PCA and 3D PCA
    • Power analyses
    • Stepwise Multiple Regression
    • Student t test

R Code

  1. HOME
  2. R Code
March 28, 2018 / Last updated : November 11, 2019 jackrrivers R Code

ANOVAs One-way and two-way

Here is your basic one-way and two-way ANOVAs. The assumption check is the same for the one-way or two-way ANOVA, you are looking for an even scattering of dots in all three residual plots and your looking for a straight 45 degree line in the q-q plot. A log transformation often helps with biological data. […]

March 28, 2018 / Last updated : March 28, 2018 jackrrivers R Code

Power analyses

#Power analysis t-test ## Computing the required n power.t.test(delta=100, sd=50, power=0.8, sig.level=0.05, strict=FALSE) ## Computing the power power.t.test(delta=100, sd=50, n=4, sig.level=0.05, strict=FALSE) #Power analysis Two-way ANOVA install.packages(“pwr2”) library(pwr2) ss.2way(a=2, b=2, alpha=0.05, beta=0.2, f.A=0.36, f.B=0.64, B=100) #a and b are the number of factors in each group, B is bootstrap number # F.A and F.B are […]

March 28, 2018 / Last updated : March 28, 2018 jackrrivers R Code

Student t test

#Load data example<- read.table(url(“http://jackrrivers.com/wp-content/uploads/2018/03/Example.txt”), header=T) #Welch corrected ttest<-t.test(Dependent~Factor1, data=example) ttest #non corrected noncorrect.ttest<-t.test(Data~Group, data=example, var.equal=T) noncorrect.ttest #Easy way to check the assumptions of equal variance and normality par(mfrow=c(2,2)) plot(aov(Dependent~Factor1, data=example))

Posts pagination

  • «
  • Page 1
  • Page 2

Copyright © Jack R Auty All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

MENU
  • Lab Home Page
  • Research
    • Epidemiological Research into Alzheimer’s Disease and Common Pain Relieving Drugs
    • The inflammatory nature of microplastics
    • Zinc deficiency and Alzheimer’s disease
  • Publications
  • Outreach
  • Tools
  • Web apps
    • TDP proteomics explorer
    • Ice breaker
    • Exploration of RNAseq and Epidemiological datasets
    • Feedback selector
    • Novel Object Recognition Task Timer
    • Pomodoro timer
    • Power Calculator
    • Power Calculator Cohen’s D
  • R Code
    • A complete guide to ANOVAs in R
    • ANOVAs One-way and two-way
    • Finding an outlier using Cook’s distance
    • Generalized mixed modelling
    • How to make a simple bar graph in R
    • How to make a Rain Cloud Plot (aka a Rotated Violin plot)
    • Mediation analysis with nuisance variables.
    • Multi-level linear model (repeated measure ANOVA)
    • PCA and 3D PCA
    • Power analyses
    • Stepwise Multiple Regression
    • Student t test