sigmoid package

The sigmoid package makes it easy to become familiar with the way neural networks work by demonstrating the key concepts using straightforward code examples. Installation The package can now be installed from CRAN using: {% highlight r %} install.packages(‘sigmoid’) # case sensitive! {% endhighlight %} Usage After installation, the package can be loaded using: {% highlight r %} library(sigmoid) {% endhighlight %} For information on using the package, please refer to the help files.

Handcoding a Difference in Differences

In this post we will discuss how to manually implement a Difference-in-Differences (DiD) estimator in R, using simulated data. {% highlight r %} reproducible random numbers set.seed(123) untreated and treated independent variable for period 0 xutr <- rnorm(1000, mean=5) xtr <- rnorm(1000, mean=1) create a data.frame with the dep. var., indep. var., time and id vars for period 0 dfutr <- data.frame(time = 0, id= 1:1000, y=xutr+15+rnorm(1000), x=xutr) dftr <- data.frame(time = 0, id=1001:2000, y=xtr +9+rnorm(1000), x=xtr ) df0 <- rbind(dfutr, dftr)

© Some rights reserved.

Using the Chirpy theme for Hugo.