knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(Lab1Intro)
Here is the link to the webpage containing information on using vignettes to document packages.
This is a link to my GitHub repo.
$$\bar{x}k=\frac{1}{n}\sum^n{j=1}x_{jk}\ \ \ \ k=1,2,...,p$$
$$s_{ik}=\frac{1}{n}\sum^n_{j=1}(x_{ji}-\bar{x}i)(x{jk}-\bar{x}_k)\ \ \ \ i=1,2,...,p,\ \ k=1,2,...,p$$
$$r_{ik}=\frac{s_{ik}}{\sqrt{s_{ii}}\sqrt{s_{kk}}}=\frac{\sum^n_{j=1}(x_{ji}-\bar{x}i)(x{jk}-\bar{x}k)}{\sqrt{\sum^n{j=1}(x_{ji}-\bar{x}i)^2}\sqrt{\sum^n{j=1}(x_{jk}-\bar{x}_k)^2}}$$
$$ \bar{x}=\frac{1}{n}X'1 \S=\frac{1}{n-1}X'(I-\frac{1}{n}11')X $$
$$ D^{1/2}{pxp}= \begin{bmatrix} \sqrt{s{11}} & 0 & ... & 0\ 0 & \sqrt{s_{22}} & ... & 0\ \vdots & \vdots & \ddots & \vdots\ 0 & 0 & ... & \sqrt{s_{pp}} \end{bmatrix} $$
$$ R = D^{-1/2}SD^{-1/2} $$
library(Lab1Intro) x = read.table("T1-2.DAT",header=FALSE)
samp_mean(x[,1]) samp_mean(x[,2]) samp_mean(x[,3])
samp_cov(x)
samp_cor(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.