Learn R Programming

synlik (version 0.1.0)

orderDist: Summarize marginal distribution of (differenced) series.

Description

Summarizes (difference) distribution of replicate series, by regressing ordered differenced series on a reference series (which might correspond to observed data).

Usage

orderDist(x, z, np = 3, diff = 1)

Arguments

x
a matrix. Each column contains a replicate series.
z
vector of lags, for rhs terms.
np
maximum power on rhs of regression.
diff
order of differencing (zero for none).

Value

  • a matrix where each column contains the coefficients for a different replicate.

Examples

Run this code
library(synlik)
set.seed(10)
n <- 100;nr <- 3
x <- matrix(runif(n*nr),n,nr)
z <- runif(n)
beta <- orderDist(x,z,np=3,diff=1)

zd <- z;xd <- x[,3]
zd <- diff(zd,1);xd <- diff(xd,1)
zd <- sort(zd);zd <- zd - mean(zd)
xd <- sort(xd);xd <- xd - mean(xd)
lm(xd~zd+I(zd^2)+I(zd^3)-1)

Run the code above in your browser using DataLab