Learn R Programming

PMmisc (version 0.1.2)

P&M Miscellaneous R Functions

Description

Miscellaneous functions for data analysis, graphics, data manipulation, statistical investigation, including descriptive statistics, creating leading and lagging variables, portfolio return analysis, time series difference and percentage change calculation, stacking data for higher efficient analysis.

Copy Link

Version

Install

install.packages('PMmisc')

Monthly Downloads

12

Version

0.1.2

License

GPL (>= 2)

Maintainer

Xuanhua Yin

Last Published

November 21st, 2018

Functions in PMmisc (0.1.2)

cv.axp

Create logarithm with a random base
cor.lag

Lag/Lead Correlation
cv.annu.pv

Calculate present value of annuity
cv.bondprice

Calculate the plain vanilla bond price
cor.spearman

Spearman rank correlation
cv.lag

Create a lag variable
cv.logs

Create logarithm with a random base
cv.powers

Create nth power variable
cv.pctcng

Calculating rate of return of a vector
cv.drawdown

Largest draw down of returns
ds.kurt

Calculating kurtosis for numeric data.
df.stack

Stack data frame by one classifier
ds.corm

Correlation matrix
cv.lead

Create a lead variable
pl.3txt

Scatter plot with text overlay
ds.skew

Calculating skewness for numeric data
ds.summ

Descriptive statistics of a data frame
ds.mode

Calculating mode for numeric data
pl.hs

Plot histograms and scatter plots for a data frame
pl.hist

Plot histograms for a data frame
pl.multiplot

Multiple plot function for ggplot2 objects
pl.coplot

Scatter plot of x and y divided by z
pl.hsd

Plot histogram with density line for a data frame
reg.aic

AIC for lm.fit
pl.s

Plot scatter plots for a data frame
df.sortcol

Sort a data frame by a column
reg.bic

BIC for lm.fit
pl.2ts

Time series plot for two variables
pl.sm

Plot scatter smooth plots for a data frame
reg.model

Linear model generator
pl.3smoothtxt

Scatter smooth plot with text overlay
reg.linreg

Linear regression processor
pl.ts

Plot time series plots for a data frame
tr.nd

Normal density function
tr.unli

Unit normal loss integral
xd.avt

Download data from Alpha Vantage
pl.histgg

Plot histograms for a data frame with ggplot2
reg.dof

Degree of freedom for lim.fit
pl.tss

Time series plot with multiple variables
reg.dw

Durbin-Watson Test
xd.fred

Download data from Federal Reserve Bank of St. Louis
reg.adj.r.squared

Adjusted R-squared for lm.fit
reg.r.squared

R-squared for lm.fit
tr.log

Sigmoid function
tr.logtb

Logistic function
reg.std.err

Standard error for lim.fit
cv.diff

Calculating the difference of a time series
cv.annu.fv

Calculate future value of annuity