Skip to content

Commit

Permalink
Lowercased most parameters and exported entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed Apr 6, 2022
1 parent 8efa0c3 commit 7ac8bbe
Show file tree
Hide file tree
Showing 20 changed files with 242 additions and 247 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "WildBootTests"
uuid = "65c2e505-86ba-4c19-93f1-95506c1443d5"
authors = ["droodman <[email protected]>"]
version = "0.7.10"
version = "0.7.11"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test <- WildBootTests$wildboottest(R, r, resp=df$y, predexog=cbind(1, df$x), clu
test
WildBootTests$teststat(test)
WildBootTests$p(test)
WildBootTests$CI(test)
WildBootTests$ci(test)
plotpoints <- WildBootTests$plotpoints(test)
plot(plotpoints$X[[1]], plotpoints$p, type="l")
```
Expand All @@ -61,7 +61,7 @@ clustid = df.firm.values
test = wbt.wildboottest(R, r, resp=resp, predexog=predexog, clustid=clustid)
wbt.teststat(test)
wbt.p(test)
wbt.CI(test)
wbt.ci(test)
plotpoints = wbt.plotpoints(test)
plt.plot(plotpoints.X[0], plotpoints.p)
```
Expand All @@ -81,6 +81,6 @@ 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)
wbt.ci(test)
end
```
2 changes: 1 addition & 1 deletion docs/build/exported/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/search/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · WildBootTests.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">WildBootTests.jl</a></span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Overview</a></li><li><a class="tocitem" href="../OLSexamples/">OLS examples</a></li><li><a class="tocitem" href="../IVexamples/">IV/2SLS examples</a></li><li><a class="tocitem" href="../exported/">Public functions and types</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.15 on <span class="colophon-date" title="Sunday 3 April 2022 15:20">Sunday 3 April 2022</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · WildBootTests.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">WildBootTests.jl</a></span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Overview</a></li><li><a class="tocitem" href="../OLSexamples/">OLS examples</a></li><li><a class="tocitem" href="../IVexamples/">IV/2SLS examples</a></li><li><a class="tocitem" href="../exported/">Public functions and types</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.15 on <span class="colophon-date" title="Wednesday 6 April 2022 15:40">Wednesday 6 April 2022</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
2 changes: 1 addition & 1 deletion docs/build/search_index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/src/IVexamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ wildboottest(R, r; resp, predexog, predendog, inst, clustid=df.industry, reps=0)
wildboottest(R, r; resp, predexog, predendog, inst, clustid=df.industry, reps=0, imposenull=false)
# Anderson-Rubin test that hypothesis holds and instrument is valid
wildboottest(R, r; resp, predexog, predendog, inst, clustid=df.industry, ARubin=true)
wildboottest(R, r; resp, predexog, predendog, inst, clustid=df.industry, arubin=true)
# modify model to drop controls and make ttl_exp an instrument
f = @formula(wage ~ 1)
Expand All @@ -42,5 +42,5 @@ predendog, inst = modelcols(ivf, df)
# test same hypothesis in context of LIML regression
R = [0 1]; r = [0]
wildboottest(R, r; resp, predexog, predendog, inst, LIML=true, clustid=df.industry)
wildboottest(R, r; resp, predexog, predendog, inst, liml=true, clustid=df.industry)
```
4 changes: 2 additions & 2 deletions docs/src/OLSexamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ julia> test = wildboottest(R, r; resp=resp, predexog=predexog, clustid=clustid)
WildBootTests.BootTestResult{Float32}
p = 0.492
CI = Float32[0.93461335 1.1347668]
ci = Float32[0.93461335 1.1347668]
julia> test = wildboottest(R, r; resp, predexog, clustid); # same, using Julia syntactic sugar
julia> p(test) # programmatically extract p value
0.49459493f0
julia> CI(test) # programmatically extract confidence interval
julia> ci(test) # programmatically extract confidence interval
1×2 Matrix{Float32}:
0.934961 1.13469
Expand Down
2 changes: 1 addition & 1 deletion docs/src/exported.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dof
dof_r
plotpoints
peak
CI
ci
dist
statnumer
statvar
Expand Down
26 changes: 13 additions & 13 deletions src/StrBootTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct StrFE{T<:Real}
end

mutable struct StrEstimator{T<:AbstractFloat}
isDGP::Bool; LIML::Bool; Fuller::T; κ::T
isDGP::Bool; liml::Bool; fuller::T; κ::T
R₁perp::Matrix{T}; Rpar::Matrix{T}

kZ::Int64
Expand Down Expand Up @@ -43,21 +43,21 @@ mutable struct StrEstimator{T<:AbstractFloat}
Xpar₁::Matrix{T}
invZperpZperpZperpX₁::Matrix{T}; invZperpZperpZperpX₂::Matrix{T}; invZperpZperpZperpy₁::Vector{T}; invZperpZperpZperpY₂::Matrix{T}; S✻UY₂::Matrix{T}; invZperpZperpZperpZpar::Matrix{T}; invZperpZperpZperpZR₁::Matrix{T}

StrEstimator{T}(isDGP, LIML, Fuller, κ) where T<:AbstractFloat = new(isDGP, LIML, Fuller, κ, Matrix{T}(undef,0,0))
StrEstimator{T}(isDGP, liml, fuller, κ) where T<:AbstractFloat = new(isDGP, liml, fuller, κ, Matrix{T}(undef,0,0))
end

mutable struct StrBootTest{T<:AbstractFloat}
R::Matrix{T}; r::Vector{T}; R₁::Matrix{T}; r₁::Vector{T}
y₁::Vector{T}; X₁::Matrix{T}; Y₂::Matrix{T}; X₂::Matrix{T}
wt::Vector{T}; fweights::Bool
LIML::Bool; Fuller::T; κ::T; ARubin::Bool
liml::Bool; fuller::T; κ::T; arubin::Bool
B::Int64; auxtwtype::Symbol; rng::AbstractRNG; maxmatsize::Float16
ptype::Symbol; null::Bool; bootstrapt::Bool
ID::Matrix{Int64}; NBootClustVar::Int8; NErrClustVar::Int8; issorted::Bool; small::Bool; clusteradj::Bool; clustermin::Bool
FEID::Vector{Int64}; FEdfadj::Int64
level::T; rtol::T
madjtype::Symbol; NH₀::Int16
ML::Bool; β̈::Vector{T}; A::Symmetric{T,Matrix{T}}; sc::Matrix{T}
ml::Bool; β̈::Vector{T}; A::Symmetric{T,Matrix{T}}; sc::Matrix{T}
willplot::Bool; gridmin::Vector{T}; gridmax::Vector{T}; gridpoints::Vector{Float32}

q::Int16; twotailed::Bool; scorebs::Bool; robust::Bool
Expand All @@ -67,7 +67,7 @@ mutable struct StrBootTest{T<:AbstractFloat}
confpeak::Vector{T}
ID✻::Vector{Int64}; ID✻_✻⋂::Vector{Int64}
anchor::Vector{T}; poles::Vector{T}; numer::Matrix{T}
CI::Matrix{T}
ci::Matrix{T}
peak::NamedTuple{(:X, :p), Tuple{Vector{T}, T}}

Nobs::Int64; NClustVar::Int8; kX₁::Int64; kX₂::Int64; kY₂::Int64; WREnonARubin::Bool; boottest!::Function
Expand Down Expand Up @@ -110,18 +110,18 @@ mutable struct StrBootTest{T<:AbstractFloat}
S⋂ReplZX::Array{T,3}; S⋂Xy₁::Matrix{T}
S✻⋂XU₂::Array{T,3}; S✻⋂XU₂RparY::Array{T,3}; S✻XU₂::Array{T,3}; S✻XU₂RparY::Array{T,3}; S✻ZperpU₂::Array{T,3}; S✻ZperpU₂RparY::Array{T,3}; invZperpZperpS✻ZperpU₂::Array{T,3}; invZperpZperpS✻ZperpU₂RparY::Array{T,3}; invXXS✻XU₂::Array{T,3}; invXXS✻XU₂RparY::Array{T,3}

StrBootTest{T}(R, r, R₁, r₁, y₁, X₁, Y₂, X₂, wt, fweights, LIML,
Fuller, κ, ARubin, B, auxtwtype, rng, maxmatsize, ptype, null, scorebs, bootstrapt, ID, NBootClustVar, NErrClustVar, issorted, robust, small, clusteradj, clustermin,
NFE, FEID, FEdfadj, level, rtol, madjtype, NH₀, ML,
StrBootTest{T}(R, r, R₁, r₁, y₁, X₁, Y₂, X₂, wt, fweights, liml,
fuller, κ, arubin, B, auxtwtype, rng, maxmatsize, ptype, null, scorebs, bootstrapt, ID, NBootClustVar, NErrClustVar, issorted, robust, small, clusteradj, clustermin,
NFE, FEID, FEdfadj, level, rtol, madjtype, NH₀, ml,
β̈, A, sc, willplot, gridmin, gridmax, gridpoints) where T<:Real =
begin
kX₂ = ncols(X₂)
scorebs = scorebs || iszero(B) || ML
WREnonARubin = !(iszero(kX₂) || scorebs) && !ARubin
scorebs = scorebs || iszero(B) || ml
WREnonARubin = !(iszero(kX₂) || scorebs) && !arubin

new(R, r, R₁, r₁, y₁, X₁, Y₂, X₂, wt, fweights, LIML || !iszero(Fuller),
Fuller, κ, ARubin, B, auxtwtype, rng, maxmatsize, ptype, null, bootstrapt, ID, NBootClustVar, NErrClustVar, issorted, small, clusteradj, clustermin,
FEID, FEdfadj, level, rtol, madjtype, NH₀, ML,
new(R, r, R₁, r₁, y₁, X₁, Y₂, X₂, wt, fweights, liml || !iszero(fuller),
fuller, κ, arubin, B, auxtwtype, rng, maxmatsize, ptype, null, bootstrapt, ID, NBootClustVar, NErrClustVar, issorted, small, clusteradj, clustermin,
FEID, FEdfadj, level, rtol, madjtype, NH₀, ml,
β̈, A, sc, willplot, gridmin, gridmax, gridpoints,
nrows(R), ptype == :symmetric || ptype == :equaltail, scorebs, robust || NErrClustVar>0,
false, false, NFE, false, false, 0, 0, 0, false,
Expand Down
Loading

2 comments on commit 7ac8bbe

@droodman
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/58065

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.11 -m "<description of version>" 7ac8bbe9d2b49f17f0a02562666c498d62bd9a6c
git push origin v0.7.11

Please sign in to comment.