n_lowcarb <- length(weight_change_data$weightchange[weight_change_data$diet=="Low Carb"]) mean_lowcarb <- mean(weight_change_data$weightchange[weight_change_data$diet=="Low Carb"]) sd_lowcarb <- sd(weight_change_data$weightchange[weight_change_data$diet=="Low Carb"]) lowcarb.bottom <- sd_lowcarb/sqrt(n_lowcarb)
curve(1-pt(((mean_lowcarb-mu)/lowcarb.bottom),df=n_lowcarb-1),from = -20, to=0,xname = "mu")
conf.curve.lowcarb <- function(mu)abs(2*(1-pt(((mean_lowcarb-mu)/lowcarb.bottom),df=n_lowcarb-1))-1) curve(conf.curve.lowcarb(mu),from=-20, to =0 ,xname = "mu")
n_lowfat <- length(weight_change_data$weightchange[weight_change_data$diet=="Low Fat"]) mean_lowfat<- mean(weight_change_data$weightchange[weight_change_data$diet=="Low Fat"]) sd_lowfat <- sd(weight_change_data$weightchange[weight_change_data$diet=="Low Fat"]) lowfat.bottom <- sd_lowfat/sqrt(305)
curve(1-pt(((mean_lowfat-mu)/lowfat),df=304),from = -20, to=0,xname = "mu")
conf.curve.lowfat <- function(mu)abs(2*(1-pt(((mean_lowfat-mu)/lowfat.bottom),df=n_lowfat-1))-1) curve(conf.curve.lowfat(mu),from=-20, to =0 ,xname = "mu")
1-pt(weight_change_data$weightchange[weight_change_data$diet=="Low Carb"],304 ) length(weight_change_data$weightchange[weight_change_data$diet=="Low Carb"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.