Learn R Programming

Difdtl (version 2.0)

genp1: Generate difference of two precision matrices.

Description

Generate difference of two precision matrices with certain number of non-zero elements.

Usage

genp1(p, n, sigma)

Arguments

p
The dim of the matrix.
n
The non-zero element in the matrix.
sigma
The parameter used to describe the magnitude of the non-zero element.

Value

A symmetric pXp matrix.

Examples

Run this code
set.seed(1)
diffmatrix<-genp1(50,100,0.5)

Run the code above in your browser using DataLab