Skip to content

Commit bd46b57

Browse files
committed
working
1 parent 0f89741 commit bd46b57

File tree

7 files changed

+28
-51
lines changed

7 files changed

+28
-51
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
33
^\.github$
4+
^simulation(/.*)?$

NAMESPACE

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
export(bspline)
44
export(npiv_regression)
5-
export(update_package)
65
import(RcppArmadillo)
76
importFrom(Rcpp,sourceCpp)
87
importFrom(devtools,install)

R/bspline.R

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
#' B spline
1+
#' B-spline calculation
22
#'
3-
4-
#' @export
3+
#' This function calculates B-spline basis functions.
4+
#'
5+
#' @param x Input vector. The points at which to evaluate the B-spline basis functions.
6+
#' @param l Resolution level. Determines the number of basis functions.
7+
#' @param r Order of the B-spline. Determines the polynomial degree (degree = order - 1).
8+
#' @param kts Optional. Vector of knots for the B-spline. If NULL, knots will be generated automatically.
59
#'
10+
#' @return A matrix of B-spline basis function values.
11+
#'
12+
#' @export
613
bspline <- function(x, l, r, kts = NULL) {
714
N <- length(x)
815
m <- 2^l - 1

R/utils.R

-28
This file was deleted.

man/bspline.Rd

+14-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/update_package.Rd

-16
This file was deleted.

simulation/working-sim.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ rm(list=ls())
22
library(parallel)
33
library(doParallel)
44
library(foreach)
5-
library(contdid)
65
library(doRNG)
76
library(tidyverse)
87
library(fixest)
98
library(splines2)
109

10+
devtools::load_all("~/Documents/uni/master-dissertation/contdid")
11+
library(contdid)
12+
1113
# Source necessary functions
1214
source("~/Documents/uni/master-dissertation/contdid/simulation/DGP1.R")
1315
source("~/Documents/uni/master-dissertation/contdid/simulation/run_simulation.R")

0 commit comments

Comments
 (0)