Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed May 30, 2024
2 parents a34f5d1 + 47f5a21 commit 934eb81
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In all cases, to install, start Julia and type `using Pkg; Pkg.add("WildBootTest

### From Julia

```
```julia
using WildBootTests, CSV, DataFrames, StatsModels, Plots
d = download("https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/sandwich/PetersenCL.csv");
df = CSV.read(d, DataFrame);
Expand All @@ -25,7 +25,7 @@ plot(plotpoints(test)...) # plot confidence curve
```

### From R via fwildclusterboot
```
```R
library(fwildclusterboot)
df <- read.csv("https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/sandwich/PetersenCL.csv")
lm_fit <- lm(y ~ x, data = df)
Expand All @@ -35,7 +35,7 @@ plot(boot_lm)
```

### From via JuliaConnectoR
```
```julia
library(JuliaConnectoR)
startJuliaServer()
WildBootTests <- juliaImport("WildBootTests")
Expand All @@ -51,7 +51,7 @@ plot(plotpoints$X[[1]], plotpoints$p, type="l")
```

### From Python via PyJulia
```
```python
from julia import WildBootTests as wbt
import pandas as pd
import numpy as np
Expand All @@ -76,22 +76,3 @@ import delimited https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/
regress y x, cluster(firm)
boottest x, reps(99999) julia
```

### From Stata via Python and PyJulia
```
import delimited https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/sandwich/PetersenCL.csv
python
from julia import WildBootTests as wbt
import numpy as np
from sfi import Data
R = np.array([[0, 1]]); r = np.array([1])
resp = np.asarray(Data.get('y'))
predexog = np.c_[np.ones(resp.size), np.asarray(Data.get('x'))]
clustid = np.asarray(Data.get('firm'))
test = wbt.wildboottest(R, r, resp=resp, predexog=predexog, clustid=clustid)
wbt.p(test)
wbt.teststat(test)
wbt.ci(test)
end
```

0 comments on commit 934eb81

Please sign in to comment.