#' @title Manual for Ch14. Functions
#' @description Ch14. Correlation and Regression Analysis
#' @usage ch14.man(fn = 0)
#' @param fn Function number, Default: 0
#' @return None.
#' @examples
#' ch14.man()
#' ch14.man(1)
#' ch14.man(2)
#' ch14.man(3)
#' @export
ch14.man <- function(fn = 0) {
if (0 %in% fn) {
cat("[1] corr.mplot\t\tMultiple Scatter Plots from Lists of Bivariate Data\n")
cat("[2] corr.reg1\t\tCorrelation Analysis & Simple Linear Regression Analysis\n")
cat("[3] corr.mreg\t\tMultiple Regression Analysis\n")
}
if (1 %in% fn) {
cat("[1] Multiple Scatter Plots from Lists of Bivariate Data\n")
cat("corr.mplot(X, item, xl, yl, mt, step=1:4, alp=0.05, dig=4)\n")
cat("[Mandatory Input]--------------------------\n")
cat("X\t List vector of bivariate data with 2 columns\n")
cat("item\t String vector of list names\n")
cat("[Optional Input]--------------------------\n")
cat("xl\t Label of x-axis (default=\"group1\")\n")
cat("yl\t Label of y-axis (default=\"group2\")\n")
cat("step\t Steps for correlation analysis (default=1:4)\n")
cat("\t 1\t Scatter plot for prior investigation of data\n")
cat("\t 2\t Estimate correlation coefficients\n")
cat("\t 3\t Correlation tests\n")
cat("\t 4\t Confidence intervals for correlation coefficients\n")
cat("\t 5\t T-test plot\n")
cat("alp\t Level of significance (default=0.05)\n")
cat("dig\t Number of digits below the decimal point (default=4)\n")
}
if (2 %in% fn) {
cat("[2] Correlation Analysis & Simple Linear Regression Analysis\n")
cat("corr.reg1(x, y, r0=0, xl, yl, mt, step=1:9, x0, xrng, by, alp=0.05, dig=4)\n")
cat("[Mandatory Input]--------------------------\n")
cat("x\t Vector of independent variable (explanatory variable) data\n")
cat("y\t Vector of dependent variable (response variable) data\n")
cat("[Optional Input]--------------------------\n")
cat("r0\t Correlation coefficient value under the null hypothesis (default=0)\n")
cat("\t (if r0=0, perform t-test, otherwise, perform z-test)\n")
cat("xl\t Label of x-axis (default=x variable name)\n")
cat("yl\t Label of y-axis (default=y variable name)\n")
cat("mt\t Plot title\n")
cat("step\t Steps of simple regression analysis (default=1:9)\n")
cat("\t 1\t x-y scatter plot for prior investigation of data\n")
cat("\t 2\t Estimate correlation coefficient\n")
cat("\t 3\t Correlation tests\n")
cat("\t 4\t Confidence intervals for correlation coefficients\n")
cat("\t 5\t T-test(or z-test) plot\n")
cat("\t 6\t Display the simple regression line\n")
cat("\t 7\t Estimate simple regression coefficients\n")
cat("\t 8\t ANOVA table by calculating sum of squares\n")
cat("\t 9\t Confidence intervals & significance tests for regression coefficients\n")
cat("\t 10\t Confidence intervals and prediction intervals at x0\n")
cat("\t 11\t Plot confidence bands and prediction bands\n")
cat("\t 12\t Diagnosis of the regression model\n")
cat("alp\t Level of significance (default=0.05)\n")
cat("dig\t Number of digits below the decimal point (default=4)\n")
}
if (3 %in% fn) {
cat("[3] Multiple Regression Analysis\n")
cat("corr.mreg(xd, y, form, xd2, form2, step=0:7, newd, pvx, xrng, nx, alp=0.05, dig=4)\n")
cat("[Mandatory Input]--------------------------\n")
cat("xd\t Data frame of independent variables (explanatory variables)\n")
cat("y\t Vector of dependent variable (response variable) data\n")
cat("form\t Formula of regression model (ex: y ~ x1 + x2)\n")
cat("[Optional Input]--------------------------\n")
cat("xd2\t Data frame of independent variables in model2 (step=4, 5)\n")
cat("form2\t Formula of regression model2 (ex: y ~ x1 * x2) (step=4, 5)\n")
cat("step\t Steps of multiple regression analysis (default=0:4)\n")
cat("\t 0\t Scatter matrix plot for prior investigation of data\n")
cat("\t 1\t Estimate multiple regression coefficients\n")
cat("\t 2\t ANOVA table by calculating sum of squares\n")
cat("\t 3\t Confidence intervals & significance tests for regression coefficients\n")
cat("\t 4\t Analysis of model2 (redo step 0~3)\n")
cat("\t 5\t Compare and diagnose regression models\n")
cat("\t 6\t Confidence intervals and prediction intervals at x=newd\n")
cat("\t 7\t Plot confidence bands and prediction bands\n")
cat("newd\t Data frame of independent variables for step 6\n")
cat("pvx\t Designated number of independent variables for step 6(step=7)\n")
cat("xrng\t Range of independent variables for step 7\n")
cat("nx\t Designated number of independent variables for step 7\n")
cat("alp\t Level of significance (default=0.05)\n")
cat("dig\t Number of digits below the decimal point (default=4)\n")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.