itdr-vignette

Overview

itdr is a system for estimating a basis of the central and central mean subspaces or selecting sufficient dimension reduction variables in regression by using integral transformation methods. This vignette demonstrate the usage of functions in itdr package over automobile, Recumbent ,PDB, prostate, and raman datasets.

Chapter 1: Installation

1.1: Install itdr package

Installation can be done for itdr R package in three ways.

install.packages("~/itdr.zip")
library(itdr)
library(devtools)
install_github("TharinduPDeAlwis/itdr")
library(itdr)

Chapter 5: A Minimum Discrepancy Approach with Fourier Transfrom in Sufficient Dimension Reduciton

In this section, we describe the fm_xite() function in itdr package that estimates the sufficient dimension reduction subspaces using five different approaches proposed by Weng and Yin (2022). The following R code chunk shows the estimation of sufficient dimension reduction subspace using FT-DRIRE approach for prostate dataset (Stamey et al. 1989).

library(itdr)
    set.seed(123)
    data(prostate)
    X=as.matrix(prostate[,1:8])
    Y=matrix(prostate[,9], ncol = 1)
    fit.ftire=fm_xire(Y,X,d=2,m = 10, method="FT-IRE")
    betahat = fit.ftire$hbeta_xire
    betahat
#>              [,1]          [,2]
#> [1,] -0.658371202 -0.0906078534
#> [2,] -0.611494712 -0.2493711238
#> [3,]  0.015269902 -0.0105628808
#> [4,] -0.148454529 -0.0753903192
#> [5,] -0.318437176  0.9142747970
#> [6,]  0.154861618  0.0360819508
#> [7,] -0.211976933 -0.2942920306
#> [8,] -0.005575356  0.0009348053
    newx = X %*% betahat
    plot(Y ~ newx[,1], xlab = "First reduced predictor", 
    ylab = paste0(expression(log),'(antigen)', sep="") )

    plot(Y ~ newx[,2], xlab = "Second reduced predictor", 
    ylab = paste0(expression(log),'(antigen)', sep="") )

Chapter 6: Fourier Transform Sparse Inverse Regression Estimators for Sufficient Variable Selection

In this section, we describe the admmft() function in itdr package that selects the sufficient variables using Fourier transformation method (Weng, 2022). The following R chunk demonstrate the sufficient variable selection for the prostate dataset in itdr package. In this function, we use lambda=0.5. However, if it is not given, then cross validation method is used to choose the optimal labmda value.

  data(raman)
    Y=as.matrix(Raman[,c(1100)]) ## percentage of total fat content
    X=as.matrix(Raman[c(2:501)]) ## first 500 wavelength variables
    out = admmft(X,Y,d = 1, m = 30, lambda = 0.5, sparse.cov=T, scale.X=T)
    estbeta = out$B
    estbeta
#>                [,1]
#>   [1,]  0.000000000
#>   [2,]  0.000000000
#>   [3,]  0.000000000
#>   [4,]  0.000000000
#>   [5,]  0.000000000
#>   [6,]  0.000000000
#>   [7,]  0.000000000
#>   [8,]  0.000000000
#>   [9,]  0.000000000
#>  [10,]  0.000000000
#>  [11,]  0.000000000
#>  [12,]  0.000000000
#>  [13,]  0.000000000
#>  [14,]  0.000000000
#>  [15,]  0.000000000
#>  [16,]  0.000000000
#>  [17,]  0.000000000
#>  [18,]  0.000000000
#>  [19,]  0.000000000
#>  [20,]  0.000000000
#>  [21,]  0.000000000
#>  [22,]  0.000000000
#>  [23,]  0.000000000
#>  [24,]  0.000000000
#>  [25,]  0.000000000
#>  [26,]  0.000000000
#>  [27,]  0.000000000
#>  [28,]  0.000000000
#>  [29,]  0.000000000
#>  [30,]  0.000000000
#>  [31,]  0.000000000
#>  [32,]  0.000000000
#>  [33,]  0.000000000
#>  [34,]  0.000000000
#>  [35,]  0.000000000
#>  [36,]  0.000000000
#>  [37,]  0.000000000
#>  [38,]  0.000000000
#>  [39,]  0.000000000
#>  [40,]  0.000000000
#>  [41,]  0.000000000
#>  [42,]  0.000000000
#>  [43,]  0.000000000
#>  [44,]  0.000000000
#>  [45,]  0.000000000
#>  [46,]  0.000000000
#>  [47,]  0.000000000
#>  [48,]  0.000000000
#>  [49,]  0.000000000
#>  [50,]  0.000000000
#>  [51,]  0.000000000
#>  [52,]  0.000000000
#>  [53,]  0.000000000
#>  [54,]  0.000000000
#>  [55,]  0.000000000
#>  [56,]  0.000000000
#>  [57,]  0.000000000
#>  [58,]  0.000000000
#>  [59,]  0.000000000
#>  [60,]  0.000000000
#>  [61,]  0.000000000
#>  [62,]  0.000000000
#>  [63,]  0.000000000
#>  [64,]  0.000000000
#>  [65,]  0.000000000
#>  [66,]  0.000000000
#>  [67,]  0.000000000
#>  [68,]  0.000000000
#>  [69,]  0.000000000
#>  [70,]  0.000000000
#>  [71,]  0.000000000
#>  [72,]  0.000000000
#>  [73,]  0.000000000
#>  [74,]  0.000000000
#>  [75,]  0.000000000
#>  [76,]  0.000000000
#>  [77,]  0.000000000
#>  [78,]  0.000000000
#>  [79,]  0.000000000
#>  [80,]  0.000000000
#>  [81,]  0.000000000
#>  [82,]  0.000000000
#>  [83,]  0.000000000
#>  [84,]  0.000000000
#>  [85,]  0.000000000
#>  [86,]  0.000000000
#>  [87,]  0.000000000
#>  [88,]  0.000000000
#>  [89,]  0.000000000
#>  [90,]  0.000000000
#>  [91,]  0.000000000
#>  [92,]  0.000000000
#>  [93,]  0.000000000
#>  [94,]  0.000000000
#>  [95,]  0.000000000
#>  [96,]  0.000000000
#>  [97,]  0.000000000
#>  [98,]  0.000000000
#>  [99,]  0.000000000
#> [100,]  0.000000000
#> [101,]  0.000000000
#> [102,]  0.000000000
#> [103,]  0.000000000
#> [104,]  0.000000000
#> [105,]  0.000000000
#> [106,]  0.000000000
#> [107,]  0.000000000
#> [108,]  0.000000000
#> [109,]  0.000000000
#> [110,]  0.000000000
#> [111,]  0.000000000
#> [112,]  0.000000000
#> [113,]  0.000000000
#> [114,]  0.000000000
#> [115,]  0.000000000
#> [116,]  0.000000000
#> [117,]  0.000000000
#> [118,]  0.000000000
#> [119,]  0.000000000
#> [120,]  0.000000000
#> [121,]  0.000000000
#> [122,]  0.000000000
#> [123,]  0.000000000
#> [124,]  0.000000000
#> [125,]  0.000000000
#> [126,]  0.000000000
#> [127,]  0.000000000
#> [128,]  0.000000000
#> [129,]  0.000000000
#> [130,]  0.000000000
#> [131,]  0.000000000
#> [132,]  0.000000000
#> [133,]  0.000000000
#> [134,]  0.000000000
#> [135,]  0.000000000
#> [136,]  0.000000000
#> [137,]  0.000000000
#> [138,]  0.000000000
#> [139,]  0.000000000
#> [140,]  0.000000000
#> [141,]  0.000000000
#> [142,]  0.000000000
#> [143,]  0.000000000
#> [144,]  0.000000000
#> [145,]  0.000000000
#> [146,]  0.000000000
#> [147,]  0.000000000
#> [148,]  0.000000000
#> [149,]  0.000000000
#> [150,]  0.000000000
#> [151,]  0.000000000
#> [152,]  0.000000000
#> [153,]  0.000000000
#> [154,]  0.000000000
#> [155,]  0.000000000
#> [156,]  0.000000000
#> [157,]  0.000000000
#> [158,]  0.000000000
#> [159,]  0.000000000
#> [160,]  0.000000000
#> [161,]  0.000000000
#> [162,]  0.000000000
#> [163,]  0.000000000
#> [164,]  0.000000000
#> [165,]  0.000000000
#> [166,]  0.000000000
#> [167,]  0.000000000
#> [168,]  0.000000000
#> [169,]  0.000000000
#> [170,]  0.000000000
#> [171,]  0.001082901
#> [172,]  0.101985948
#> [173,]  0.000000000
#> [174,]  0.000000000
#> [175,]  0.055508855
#> [176,]  0.010211942
#> [177,]  0.000000000
#> [178,]  0.000000000
#> [179,]  0.000000000
#> [180,]  0.000000000
#> [181,]  0.000000000
#> [182,]  0.000000000
#> [183,]  0.000000000
#> [184,]  0.000000000
#> [185,]  0.000000000
#> [186,]  0.000000000
#> [187,]  0.000000000
#> [188,]  0.000000000
#> [189,]  0.000000000
#> [190,]  0.000000000
#> [191,]  0.000000000
#> [192,]  0.000000000
#> [193,]  0.000000000
#> [194,]  0.000000000
#> [195,]  0.000000000
#> [196,]  0.000000000
#> [197,]  0.000000000
#> [198,]  0.000000000
#> [199,]  0.000000000
#> [200,]  0.000000000
#> [201,]  0.044700711
#> [202,]  0.000000000
#> [203,]  0.000000000
#> [204,]  0.000000000
#> [205,]  0.000000000
#> [206,]  0.000000000
#> [207,]  0.000000000
#> [208,]  0.000000000
#> [209,]  0.000000000
#> [210,]  0.000000000
#> [211,]  0.010647325
#> [212,]  0.031810973
#> [213,]  0.058064584
#> [214,]  0.061252772
#> [215,]  0.053789526
#> [216,]  0.024919796
#> [217,]  0.007651234
#> [218,]  0.000000000
#> [219,]  0.000000000
#> [220,]  0.000000000
#> [221,]  0.000000000
#> [222,]  0.000000000
#> [223,]  0.000000000
#> [224,]  0.000000000
#> [225,]  0.000000000
#> [226,]  0.000000000
#> [227,]  0.000000000
#> [228,]  0.000000000
#> [229,]  0.000000000
#> [230,]  0.000000000
#> [231,]  0.000000000
#> [232,]  0.000000000
#> [233,]  0.000000000
#> [234,]  0.000000000
#> [235,]  0.000000000
#> [236,]  0.000000000
#> [237,]  0.000000000
#> [238,]  0.000000000
#> [239,]  0.000000000
#> [240,]  0.000000000
#> [241,]  0.000000000
#> [242,]  0.000000000
#> [243,]  0.000000000
#> [244,]  0.000000000
#> [245,]  0.000000000
#> [246,]  0.000000000
#> [247,]  0.000000000
#> [248,]  0.000000000
#> [249,]  0.000000000
#> [250,]  0.000000000
#> [251,]  0.000000000
#> [252,]  0.000000000
#> [253,]  0.000000000
#> [254,]  0.000000000
#> [255,]  0.000000000
#> [256,]  0.000000000
#> [257,]  0.000000000
#> [258,]  0.000000000
#> [259,]  0.000000000
#> [260,]  0.000000000
#> [261,]  0.000000000
#> [262,]  0.000000000
#> [263,]  0.000000000
#> [264,]  0.000000000
#> [265,]  0.000000000
#> [266,]  0.000000000
#> [267,]  0.000000000
#> [268,]  0.000000000
#> [269,]  0.000000000
#> [270,]  0.000000000
#> [271,]  0.000000000
#> [272,]  0.000000000
#> [273,]  0.000000000
#> [274,]  0.000000000
#> [275,]  0.000000000
#> [276,]  0.000000000
#> [277,]  0.000000000
#> [278,]  0.000000000
#> [279,]  0.000000000
#> [280,]  0.000000000
#> [281,]  0.000000000
#> [282,]  0.000000000
#> [283,]  0.000000000
#> [284,]  0.000000000
#> [285,]  0.000000000
#> [286,]  0.000000000
#> [287,] -0.016266774
#> [288,] -0.076053554
#> [289,]  0.000000000
#> [290,]  0.000000000
#> [291,]  0.000000000
#> [292,]  0.000000000
#> [293,] -0.022020460
#> [294,] -0.074110033
#> [295,] -0.176401218
#> [296,] -0.342531043
#> [297,] -0.240202369
#> [298,] -0.068813135
#> [299,]  0.000000000
#> [300,]  0.000000000
#> [301,]  0.000000000
#> [302,]  0.000000000
#> [303,] -0.051687166
#> [304,]  0.000000000
#> [305,]  0.000000000
#> [306,]  0.000000000
#> [307,]  0.000000000
#> [308,]  0.000000000
#> [309,]  0.000000000
#> [310,]  0.000000000
#> [311,]  0.000000000
#> [312,]  0.000000000
#> [313,]  0.000000000
#> [314,]  0.000000000
#> [315,]  0.000000000
#> [316,]  0.000000000
#> [317,]  0.000000000
#> [318,]  0.000000000
#> [319,]  0.000000000
#> [320,]  0.000000000
#> [321,]  0.000000000
#> [322,]  0.000000000
#> [323,]  0.000000000
#> [324,]  0.000000000
#> [325,]  0.000000000
#> [326,]  0.000000000
#> [327,]  0.000000000
#> [328,]  0.000000000
#> [329,]  0.000000000
#> [330,]  0.000000000
#> [331,]  0.000000000
#> [332,]  0.000000000
#> [333,]  0.000000000
#> [334,]  0.000000000
#> [335,]  0.000000000
#> [336,]  0.000000000
#> [337,]  0.000000000
#> [338,]  0.000000000
#> [339,]  0.000000000
#> [340,]  0.000000000
#> [341,]  0.000000000
#> [342,]  0.000000000
#> [343,]  0.000000000
#> [344,]  0.000000000
#> [345,]  0.000000000
#> [346,]  0.000000000
#> [347,]  0.000000000
#> [348,]  0.000000000
#> [349,]  0.000000000
#> [350,]  0.000000000
#> [351,]  0.000000000
#> [352,]  0.000000000
#> [353,]  0.000000000
#> [354,]  0.000000000
#> [355,]  0.000000000
#> [356,]  0.000000000
#> [357,]  0.000000000
#> [358,]  0.000000000
#> [359,]  0.000000000
#> [360,]  0.000000000
#> [361,]  0.000000000
#> [362,]  0.000000000
#> [363,]  0.000000000
#> [364,]  0.000000000
#> [365,]  0.000000000
#> [366,]  0.000000000
#> [367,]  0.000000000
#> [368,]  0.000000000
#> [369,]  0.000000000
#> [370,]  0.000000000
#> [371,]  0.000000000
#> [372,]  0.000000000
#> [373,]  0.000000000
#> [374,]  0.000000000
#> [375,]  0.000000000
#> [376,]  0.000000000
#> [377,]  0.000000000
#> [378,]  0.000000000
#> [379,]  0.000000000
#> [380,]  0.000000000
#> [381,]  0.000000000
#> [382,]  0.000000000
#> [383,]  0.000000000
#> [384,]  0.012689780
#> [385,]  0.089213694
#> [386,]  0.000000000
#> [387,]  0.000000000
#> [388,]  0.000000000
#> [389,]  0.000000000
#> [390,]  0.000000000
#> [391,]  0.000000000
#> [392,]  0.000000000
#> [393,]  0.048187450
#> [394,]  0.029683035
#> [395,]  0.049625648
#> [396,]  0.081663524
#> [397,]  0.121523906
#> [398,]  0.000000000
#> [399,]  0.000000000
#> [400,]  0.000000000
#> [401,]  0.249614981
#> [402,]  0.562149137
#> [403,]  0.837791801
#> [404,]  0.909244693
#> [405,]  0.975777153
#> [406,]  0.921847138
#> [407,]  0.860013365
#> [408,]  0.776781784
#> [409,]  0.643561314
#> [410,]  0.404005226
#> [411,]  0.142047134
#> [412,]  0.000000000
#> [413,]  0.000000000
#> [414,]  0.000000000
#> [415,]  0.018779537
#> [416,]  0.000000000
#> [417,]  0.000000000
#> [418,]  0.000000000
#> [419,]  0.000000000
#> [420,]  0.000000000
#> [421,]  0.000000000
#> [422,]  0.000000000
#> [423,]  0.000000000
#> [424,]  0.000000000
#> [425,]  0.000000000
#> [426,]  0.000000000
#> [427,]  0.000000000
#> [428,]  0.000000000
#> [429,]  0.000000000
#> [430,]  0.000000000
#> [431,]  0.000000000
#> [432,]  0.000000000
#> [433,]  0.000000000
#> [434,]  0.000000000
#> [435,]  0.000000000
#> [436,]  0.000000000
#> [437,]  0.000000000
#> [438,]  0.000000000
#> [439,]  0.000000000
#> [440,]  0.000000000
#> [441,]  0.054801024
#> [442,]  0.000000000
#> [443,]  0.000000000
#> [444,]  0.000000000
#> [445,]  0.019255135
#> [446,]  0.142691654
#> [447,]  0.157931103
#> [448,]  0.016991959
#> [449,]  0.000000000
#> [450,]  0.000000000
#> [451,]  0.132993741
#> [452,]  0.011555493
#> [453,]  0.000000000
#> [454,]  0.000000000
#> [455,]  0.000000000
#> [456,]  0.000000000
#> [457,]  0.000000000
#> [458,]  0.000000000
#> [459,]  0.000000000
#> [460,]  0.000000000
#> [461,]  0.000000000
#> [462,]  0.000000000
#> [463,]  0.000000000
#> [464,]  0.000000000
#> [465,]  0.000000000
#> [466,]  0.000000000
#> [467,]  0.000000000
#> [468,]  0.000000000
#> [469,]  0.000000000
#> [470,]  0.000000000
#> [471,]  0.000000000
#> [472,]  0.000000000
#> [473,]  0.000000000
#> [474,]  0.000000000
#> [475,]  0.000000000
#> [476,]  0.000000000
#> [477,]  0.000000000
#> [478,]  0.000000000
#> [479,]  0.000000000
#> [480,]  0.000000000
#> [481,]  0.000000000
#> [482,]  0.000000000
#> [483,]  0.000000000
#> [484,]  0.000000000
#> [485,]  0.000000000
#> [486,]  0.000000000
#> [487,]  0.000000000
#> [488,]  0.000000000
#> [489,]  0.000000000
#> [490,]  0.000000000
#> [491,]  0.000000000
#> [492,]  0.000000000
#> [493,]  0.000000000
#> [494,]  0.000000000
#> [495,]  0.000000000
#> [496,]  0.000000000
#> [497,]  0.000000000
#> [498,]  0.000000000
#> [499,]  0.000000000
#> [500,]  0.000000000
    plot(Y ~ X %*% estbeta, xlab = "First reduced predictor", 
    ylab = "Percentage of total fat")

Acknowledgment

The codes for the Fourier transformation and the convolution transformation methods are adapted from the codes provided by Zhu and Zeng (2006). Moreover, those for the elliptically contoured distributed variables and the kernel density estimation methods are essentially a modification of the program provided by Zeng and Zhu (2010). The code for Fourier transforms approach for the inverse dimension reduction method is adapted from the code provided by Weng and Yin (2018).

References