Skip to content

Commit

Permalink
Update OLSexamples.md
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed May 30, 2024
1 parent eb238e3 commit d77e318
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions docs/src/OLSexamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ julia> f = apply_schema(f, schema(f, df)); # link model to data

julia> lm(f, df) # run OLS for illustration; not needed for following lines
StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}}}}, Matrix{Float64}}
```
```

y ~ 1 + x

Coefficients:
Expand All @@ -23,8 +22,7 @@ Coefficients:
(Intercept) 0.0296797 0.0283593 1.05 0.2954 -0.025917 0.0852764
x 1.03483 0.0285833 36.20 <1e-99 0.978798 1.09087
─────────────────────────────────────────────────────────────────────────
```
```julia

julia> resp, predexog = modelcols(f, df); # extract response & (exogenous) predictor variables

julia> clustid = df.firm; # extract clustering variable
Expand All @@ -43,16 +41,13 @@ julia> p(test) # programmatically extract p value
0.49459493f0

julia> ci(test) # programmatically extract confidence interval
```
```

1×2 Matrix{Float32}:
0.934961 1.13469
```
```julia

julia> plot(plotpoints(test)...) # plot confidence curve
```

## Further examples
```julia
using WildBootTests, CSV, DataFrames, StatsModels, GLM, Plots

# use Webb instead of Rademacher weights, 99,999 bootstrap replications instead of 999
Expand Down

0 comments on commit d77e318

Please sign in to comment.