Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8027574

Browse files
version 2.2.2
1 parentb34b44e commit8027574

File tree

9 files changed

+41
-54
lines changed

9 files changed

+41
-54
lines changed

‎.github/workflows/R-CMD-check.yml‎

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,35 @@ jobs:
3434
steps:
3535
-uses:actions/checkout@v3
3636

37+
# ----------------------- Set up R -----------------------
3738
-name:Set up R
3839
uses:r-lib/actions/setup-r@v2
3940
with:
4041
r-version:${{ matrix.r }}
4142
http-user-agent:${{ matrix.http-user-agent }}
4243

43-
# ----------------- TinyTeX setup for macOS & Linux -----------------
44-
-name:Install TinyTeX (macOS & Linux)
45-
if:runner.os != 'Windows'
46-
run:|
47-
Rscript -e "install.packages('tinytex')"
48-
Rscript -e "tinytex::install_tinytex(force = TRUE)"
49-
Rscript -e "tinytex::tlmgr_install(c('xcolor','framed','inconsolata'))"
50-
51-
# ----------------- TinyTeX setup for Windows -----------------
52-
-name:Install TinyTeX (Windows)
53-
if:runner.os == 'Windows'
44+
# ----------------------- TinyTeX setup -----------------------
45+
-name:Install TinyTeX
5446
run:|
5547
Rscript -e "install.packages('tinytex')"
5648
Rscript -e "tinytex::install_tinytex(force = TRUE)"
5749
Rscript -e "tinytex::tlmgr_install(c('latex-bin','pdftex','babel-english','xcolor','framed','inconsolata'))"
58-
echo "C:/Users/runneradmin/AppData/Roaming/TinyTeX/bin/windows" >> $env:GITHUB_PATH
5950
60-
# ----------------- Check pdflatex version (Windows) -----------------
61-
-name:Check pdflatex version
51+
-name:Set TinyTeX PATH (Linux/macOS)
52+
if:runner.os != 'Windows'
53+
run:|
54+
export PATH="$HOME/bin/TinyTeX/bin:$PATH"
55+
echo "$HOME/bin/TinyTeX/bin" >> $GITHUB_PATH
56+
57+
-name:Set TinyTeX PATH (Windows)
6258
if:runner.os == 'Windows'
63-
run:pdflatex --version
64-
65-
# ----------------- Install tidy -----------------
59+
shell:pwsh
60+
run:|
61+
$texPath = "C:/Users/runneradmin/AppData/Roaming/TinyTeX/bin/windows"
62+
$env:PATH = "$texPath;$env:PATH"
63+
Get-Command pdflatex
64+
65+
# ------------------------ Install tidy ------------------------
6666
-name:Install tidy (macOS only)
6767
if:runner.os == 'macOS'
6868
run:brew install tidy-html5
@@ -71,7 +71,7 @@ jobs:
7171
if:runner.os == 'Linux'
7272
run:sudo apt-get update && sudo apt-get install -y tidy
7373

74-
# ----------------- Install R dependencies -----------------
74+
# ------------------- Install R dependencies-------------------
7575
-name:Install R dependencies
7676
uses:r-lib/actions/setup-r-dependencies@v2
7777
with:
@@ -82,16 +82,7 @@ jobs:
8282
any::tinytex
8383
8484
# ----------------- Run R CMD check -----------------
85-
-name:Run R CMD check (Linux & macOS)
86-
if:runner.os != 'Windows'
87-
uses:r-lib/actions/check-r-package@v2
88-
with:
89-
args:'c("--as-cran","--no-manual")'
90-
build_args:'c("--no-manual","--compact-vignettes=gs+qpdf")'
91-
upload-snapshots:true
92-
93-
-name:Run R CMD check (Windows - skip manual)
94-
if:runner.os == 'Windows'
85+
-name:Run R CMD check
9586
uses:r-lib/actions/check-r-package@v2
9687
with:
9788
args:'c("--as-cran","--no-manual")'

‎DESCRIPTION‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ Package: CDatanet
22
Type: Package
33
Title: Econometrics of Network Data
44
Version: 2.2.2
5-
Date: 2025-10-13
5+
Date: 2025-12-01
66
Authors@R: person("Aristide", "Houndetoungan", role = c("cre","aut"), email = "ahoundetoungan@ecn.ulaval.ca")
7-
Description: Simulating and estimating peer effect models and network formation models. The class of peer effect models includes linear-in-means models (Lee, 2004; <doi:10.1111/j.1468-0262.2004.00558.x>), Tobit models (Xu and Lee, 2015; <doi:10.1016/j.jeconom.2015.05.004>), and discrete numerical data models (Houndetoungan,2024; <doi:10.2139/ssrn.3721250>). The network formation models include pair-wise regressions with degree heterogeneity (Graham, 2017; <doi:10.3982/ECTA12679>) and exponential random graph models (Mele, 2017; <doi:10.3982/ECTA10400>).
7+
Description: Simulating and estimating peer effect models and network formation models. The class of peer effect models includes linear-in-means models (Lee, 2004; <doi:10.1111/j.1468-0262.2004.00558.x>), Tobit models (Xu and Lee, 2015; <doi:10.1016/j.jeconom.2015.05.004>), and discrete numerical data models (Houndetoungan,2025; <doi:10.48550/arXiv.2405.17290>). The network formation models include pair-wise regressions with degree heterogeneity (Graham, 2017; <doi:10.3982/ECTA12679>) and exponential random graph models (Mele, 2017; <doi:10.3982/ECTA10400>).
88
License: GPL-3
99
Language: en-US
1010
Encoding: UTF-8
1111
BugReports: https://github.com/ahoundetoungan/CDatanet/issues
1212
URL: https://github.com/ahoundetoungan/CDatanet
1313
LazyData: true
1414
Depends: R (>= 3.5.0)
15-
Imports: Rcpp (>= 1.0.0), Formula, formula.tools,ddpcr,Matrix, matrixcalc, foreach, doRNG, doParallel, parallel
15+
Imports: Rcpp (>= 1.0.0), Formula, formula.tools, Matrix, matrixcalc, foreach, doRNG, doParallel, parallel
1616
LinkingTo: Rcpp, RcppArmadillo, RcppProgress, RcppDist, RcppNumerical, RcppEigen
1717
RoxygenNote: 7.3.2
1818
Roxygen: list(markdown = TRUE)

‎NAMESPACE‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export(vec.to.mat)
3838
importFrom(Formula,as.Formula)
3939
importFrom(Matrix,rankMatrix)
4040
importFrom(Rcpp,sourceCpp)
41-
importFrom(ddpcr,quiet)
4241
importFrom(doParallel,registerDoParallel)
4342
importFrom(doRNG,"%dorng%")
4443
importFrom(foreach,"%dopar%")

‎R/CDatanet.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @references
88
#' Eddelbuettel, D., & Francois, R. (2011). \pkg{Rcpp}: Seamless \R and \code{C++} integration. \emph{Journal of Statistical Software}, 40(8), 1-18, \doi{10.18637/jss.v040.i08}.
99
#' @references
10-
#' Houndetoungan, E. A. (2024). Count Data Models with Heterogeneous Peer Effects. Available atSSRN 3721250, \doi{10.2139/ssrn.3721250}.
10+
#' Houndetoungan, E. A. (2025). Count Data Models with Heterogeneous Peer Effects. Available atarXiv:2405.17290, \doi{10.48550/arXiv.2405.17290}.
1111
#' @references
1212
#' Lee, L. F. (2004). Asymptotic distributions of quasi-maximum likelihood estimators for spatial autoregressive models. \emph{Econometrica}, 72(6), 1899-1925, \doi{10.1111/j.1468-0262.2004.00558.x}.
1313
#' @references

‎R/auxfunc.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ fcoefficients <- function(coef, std) {
302302
#' @importFrom stats delete.response
303303
#' @importFrom stats as.formula
304304
#' @importFrom Matrix rankMatrix
305-
#' @importFrom ddpcr quiet
306305
formula.to.data<-function(formula,
307306
contextual,
308307
Glist,

‎R/homophily.fe.R‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ homophily.fe <- function(network,
134134
}
135135
N<- sum(Nvec)
136136

137-
quiet(gc())
137+
invisible(gc())
138138
if (sum(!((network==0)| (network==1)))!=0) {
139139
stop("Network should contain only 0 and 1.")
140140
}
@@ -148,7 +148,7 @@ homophily.fe <- function(network,
148148
index<- cbind(tmp2,tmp1)
149149
rm(list= c("tmp1","tmp2"))
150150

151-
quiet(gc())
151+
invisible(gc())
152152
indexgr<-matrix(c(cumsum(c(0,nvec[-M])), cumsum(nvec)-1),ncol=2)#start group, end group
153153
# INDEXgr <- matrix(c(cumsum(c(0, Nvec[-M])), cumsum(Nvec) - 1), ncol = 2)
154154
# Formula to data
@@ -159,13 +159,13 @@ homophily.fe <- function(network,
159159
type="network",theta0=NA)
160160
if(!missing(data)) {
161161
rm("data")
162-
quiet(gc())
162+
invisible(gc())
163163
}
164164
formula<-f.t.data$formula
165165
dX<-f.t.data$X
166166
if(nrow(dX)!=N&& nrow(dX)!=0) stop("The number of observations in X does not match the network.")
167167
rm("f.t.data")
168-
quiet(gc())
168+
invisible(gc())
169169
hasX<-TRUE
170170
}
171171
coln<- colnames(dX)
@@ -233,7 +233,7 @@ homophily.LogitFE <- function(network, fe.way, M, nvec, n, N, Nvec, index, index
233233

234234
#starting value
235235
initllh<-NULL
236-
quiet(gc())
236+
invisible(gc())
237237
if(is.null(init)){
238238
if(print) cat("starting point searching\n")
239239
beta<-NULL
@@ -299,12 +299,12 @@ homophily.LogitFE <- function(network, fe.way, M, nvec, n, N, Nvec, index, index
299299
}
300300
}
301301
}
302-
quiet(gc())
302+
invisible(gc())
303303

304304
theta<-1*init
305305

306306
estim<-NULL
307-
quiet(gc())
307+
invisible(gc())
308308

309309
if(print) {
310310
cat("maximizer searching\n")
@@ -421,7 +421,7 @@ homophily.LogitFESym <- function(network, M, nvec, n, N, Nvec, index, indexgr, f
421421

422422
#starting value
423423
initllh<-NULL
424-
quiet(gc())
424+
invisible(gc())
425425
if(is.null(init)){
426426
if(print) cat("starting point searching\n")
427427
beta<-NULL
@@ -465,13 +465,12 @@ homophily.LogitFESym <- function(network, M, nvec, n, N, Nvec, index, indexgr, f
465465
stopifnot(length(init)== (K+n))
466466
}
467467
}
468-
469-
quiet(gc())
468+
invisible(gc())
470469

471470
theta<-1*init
472471

473472
estim<-NULL
474-
quiet(gc())
473+
invisible(gc())
475474

476475
if(print) {
477476
cat("maximizer searching\n")

‎R/homophily.re.R‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#' For one-way random effect models (`re.way = 1`), \eqn{\nu_j = \mu_j}. For symmetric models, the network is not directed and the
3131
#' random effects need to be one way.
3232
#' @seealso \code{\link{homophily.fe}}.
33-
#' @importFrom ddpcr quiet
3433
#' @importFrom stats lm
3534
#' @importFrom stats var
3635
#' @importFrom stats cov
@@ -150,7 +149,7 @@ homophily.re <- function(network,
150149
}
151150
N<- sum(Nvec)
152151

153-
quiet(gc())
152+
invisible(gc())
154153
if (sum(!((network==0)| (network==1)))!=0) {
155154
stop("Network should contain only 0 and 1.")
156155
}
@@ -164,7 +163,7 @@ homophily.re <- function(network,
164163
tmp2<- c(0,tmp1[-n]+1)
165164
index<- cbind(tmp2,tmp1)
166165
rm(list= c("tmp1","tmp2"))
167-
quiet(gc())
166+
invisible(gc())
168167

169168
indexgr<-matrix(c(cumsum(c(0,nvec[-M])), cumsum(nvec)-1),ncol=2)
170169
INDEXgr<-matrix(c(cumsum(c(0,Nvec[-M])), cumsum(Nvec)-1),ncol=2)
@@ -173,14 +172,14 @@ homophily.re <- function(network,
173172
type="network",theta0=NA)
174173
if(!missing(data)) {
175174
rm("data")
176-
quiet(gc())
175+
invisible(gc())
177176
}
178177

179178
formula<-f.t.data$formula
180179
dX<-f.t.data$X
181180
if(nrow(dX)!=N) stop("The number of observations in X does not match the network.")
182181
rm("f.t.data")
183-
quiet(gc())
182+
invisible(gc())
184183
coln<- colnames(dX)
185184
nfix<- ifelse("(Intercept)"%in%coln,1,0)
186185
K<- ncol(dX)
@@ -204,12 +203,12 @@ homophily.re <- function(network,
204203
dXdX<- rbind(cbind(diag(Nvec), t(sumdX)), cbind(sumdX,dXdX))
205204
invdXdX<- solve(as.matrix(dXdX))
206205
rm("sumdX")
207-
quiet(gc())
206+
invisible(gc())
208207
}else{
209208
invdXdX<- solve(as.matrix(dXdX))
210209
}
211210
rm("dXdX")
212-
quiet(gc())
211+
invisible(gc())
213212

214213
#starting value
215214
beta<-init$beta
@@ -219,7 +218,7 @@ homophily.re <- function(network,
219218
snu2<-init$snu2
220219
rho<-init$rho
221220

222-
quiet(gc())
221+
invisible(gc())
223222
if (is.null(beta)) {
224223
# print(dim(invdXdX))
225224
# print(length(sumnetwork))

‎archives/CDatanet_2.2.2.tar.gz‎

11.9 KB
Binary file not shown.

‎man/CDatanet-package.Rd‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp