MwStatistics allows you to easily calculate seven common statistics on time series data using a moving window.
May submit to CRAN. For now, refer to "Installing" to access the function.
General Usage.
MwStatistics(dat = NULL, TimeVarCol = 1, ColA = 2, ColB = 3, win = NULL,
stat = NULL, overlap = 0, genplot = T, genDataFrame = F)
Example
MwStatistics(dat = data.frame(replicate(10,sample(0:10,1000,rep=TRUE))),
TimeVarCol = 1, ColA = 2, ColB = 3, win = 2,
stat = "Correlation", genplot = T, genDataFrame = F, overlap = 0.5)
Availible statistics: - "Correlation" = Correlation
"P-Value" = P-Value
"SDevX" = Standard Deviation of variable A
"SDevY" = Standard Deviation of variable B
"SErrorSlope" = Standard Error of the slope
"SErrorIntercept" = Standard Error of the intercept
"Intercept" = Intercept (Linear regression)
"Slope" = Slope (Linear regression)
Arguments:
dat
TimeVarCol
ColA
ColB
win
stat
overlap
genplot
genDataFrame
Until I submit to CRAN (if I choose to), the most reliable way to use this package is to simply download it from GitHub and install locally. Unfortunately, I have not quite figured out how to install directly into R via GitHub, so if you are willing to help out in the reguard, please let me know! My email is William.Kopans@Colby.edu
You can check that it installed correctly using:
?MWStat::MwStatistics
Fill in the correct information, replacing the sample information provided and run by selecting and clicking command enter.
If you find any improvements, please email me at wkopans123@gmail.com.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
Inspiration from MwCor from Astrochron.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.