Learn R Programming

GLDreg (version 1.1.2)

fun.mean.convert: Convert a RS or FKML GLD into RS or FKML GLD to the desired theoretical mean by changing only the first parameter

Description

A simple transformation of altering the location of RS/FKML GLD so that the theoretical mean is altered to the level specified. Only the first parameter of RS/FKML GLD is altered.

Usage

fun.mean.convert(x, param, val = 0)

Value

A vector of four values representing Lambda 1, Lambda 2, Lambda 3 and Lambda 4 of the transformed RS/FKML GLD

Arguments

x

A vector of four values representing Lambda 1, Lambda 2, Lambda 3 and Lambda 4 of RS/FKML GLD.

param

Can be "rs" or "fmkl" or "fkml"

val

The targeted theoretical mean

Author

Steve Su

Examples

Run this code

# Transform RS GLD with parameters 3,2,1,1 to mean of 0
fun.mean.convert(c(3,2,1,1),param="rs")

# Check that the desired outcome is achieved
fun.theo.mv.gld(0,2,1,1,param="rs")

# Transform RS GLD with parameters 3,2,1,1 to mean of 5
fun.mean.convert(c(3,2,1,1),param="fkml",5)

# Check that the desired outcome is achieved
fun.theo.mv.gld(5,2,1,1,param="fkml")

Run the code above in your browser using DataLab