Skip to content

projection and reverse transformation for nonparanormal and Zscore transformations

License

Notifications You must be signed in to change notification settings

cengenproject/projectNPN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

projectNPN

Projection and reverse transformation for nonparanormal and Zscore transformations, reusing parameters to project a new dataset on the same scale as previous one, or reverse the transformation into the original scale.

Installation

You can install the development version of projectNPN from GitHub with:

# install.packages("devtools")
devtools::install_github("AlexWeinreb/projectNPN")

Explanations on Z-score

We have data following a given distribution, e.g. $N(12, 5)$. We can apply a Z-score transformation (subtracting the mean and dividing by the sd) to obtain transformed data that follows $N(0,1)$. Here, the mean and the sd are parameters of the transformation, and we are interested in switching between the “raw scale” $N(12,5)$ and the “transformed scale” $N(0,1)$.

What this package implements is a Z-score, returning the original mean and sd along with the transformed data. This allows two things: first, we can now have a new dataset from the same distribution and transform it into the same scale as the first dataset, without computing statistics on it. Second, we can now reverse the transformation, given the transformed data and the original mean and sd.

More details

While the Z-score is an intuitive example, we also implement the same method for the NPN transform (from the {huge} package).

The functions here expect the data to be provided in matrices, and operate on each column of the matrix as a separate variable.

About

projection and reverse transformation for nonparanormal and Zscore transformations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages