-
Notifications
You must be signed in to change notification settings - Fork 1
/
.Rhistory
120 lines (120 loc) · 3.02 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
source("~/Documents/GitHub/dtr/temp6.R")
DDL()
devtools::check()
setwd("~/")
setwd("~/Documents/GitHub/DDL")
devtools::check()
devtools::build()
library(DDL)
n=500
p=2000
s=5
q=3
sigmaE=2
sigma=2
pert=1
H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE)
Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE)
#value of X independent from H
E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE)
#defined in eq. (2), high-dimensional measured covariates
X = E + H %*% Gamma
delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE)
#px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s
beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE)
#nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X
nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE)
#eq. (1), the response of the Structural Equation Model
Y = X %*% beta + H %*% delta + nu
DDL(X,Y,idx)
DDL(X,Y,1)
result = DDL(X,Y,idx)
result = DDL(X,Y,1)
summary(result)
devtools::check()
source("~/Documents/GitHub/DDL/R/method.R")
devtools::check()
devtools::build()
library(DDL)
DDL(X,Y,1)
result = summary()
result = DDL(X,Y,1)
summary(result)
devtools::check()
devtools::check()
devtools::build_manual()
devtools::check()
devtools::build_manual()
devtools::check()
devtools::build_manual()
devtools::build()
result = DDL(X,Y,1)
summary(result)
library(DDL)
result = DDL(X,Y,1)
summary(result)
devtools::build()
library(DDL)
result = DDL(X,Y,1)
summary(result)
devtools::document()
library(DDL)
devtools:document()
library(devtools)
devtools:document()
devtools::document()
devtools::check()
devtools::check()
devtools::document()
devtools::document()
devtools::document()
devtools::check()
devtools::document()
devtools::build()
devtools::build_manual()
devtools::document()
devtools::check()
devtools::build()
devtools::document()
devtools::check()
devtools::build()
ci.DDL
devtools::load_all()
devtools::check()
devtools::build()
library(DDL)
version(DDL)
packageVersion(DDL)
packageVersion("DDL")
ci
install.packages("/Users/zhuyuqi/Documents/GitHub/DDL_1.0.1.tar.gz", repos = NULL, type = "source")
library(DDL)
index = c(1,2,10)
n = 500
p = 300
s = 5
q = 3
sigmaE = 2
sigma = 2
pert = 1
H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE)
Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE)
#value of X independent from H
E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE)
#defined in eq. (2), high-dimensional measured covariates
X = E + H %*% Gamma
delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE)
#px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s
beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE)
#nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X
nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE)
#eq. (1), the response of the Structural Equation Model
Y = X %*% beta + H %*% delta + nu
result = DDL(X,Y,index)
result
ci
ci(result)
ci
install.packages("/Users/zhuyuqi/Documents/GitHub/DDL_1.0.0.tar.gz", repos = NULL, type = "source")
library(DDL)
ci