From d77e318cf55524f80908ed7089291fb5d93e82f5 Mon Sep 17 00:00:00 2001 From: droodman Date: Thu, 30 May 2024 12:04:18 -0400 Subject: [PATCH] Update OLSexamples.md --- docs/src/OLSexamples.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/src/OLSexamples.md b/docs/src/OLSexamples.md index 9ae63c0..6b6b836 100644 --- a/docs/src/OLSexamples.md +++ b/docs/src/OLSexamples.md @@ -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: @@ -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 @@ -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