@@ -59,35 +59,35 @@ url = "https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides/cs
5959df = DataFrame (CSV. File (Downloads. download (url)))
6060res1 = nlreg (df, @formula (y ~ x1 + fe (i) + fe (j)), Poisson (), LogLink () ; separation = [:ReLU ])
6161
62- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/01.csv"
62+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/01.csv"
6363df = DataFrame (CSV. File (Downloads. download (url)))
6464res1 = nlreg (df, @formula (y ~ x1 + x2 + fe (id1) + fe (id2)), Poisson (), LogLink () ; separation = [:ReLU ])
6565@test all (df. separated .== .~ res1. esample)
6666
67- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/02.csv"
67+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/02.csv"
6868df = DataFrame (CSV. File (Downloads. download (url)))
6969res1 = nlreg (df, @formula (y ~ fe (id1) + fe (id2)), Poisson (), LogLink () ; drop_singletons = false , separation = [:ReLU ])
7070@test all (df. separated .== .~ res1. esample)
7171
72- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/03.csv"
72+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/03.csv"
7373df = DataFrame (CSV. File (Downloads. download (url)))
7474res1 = nlreg (df, @formula (y ~ fe (id1) + fe (id2) + fe (id3)), Poisson (), LogLink () ; separation = [:ReLU ])
7575@test all (df. separated .== .~ res1. esample)
7676
77- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/04.csv"
77+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/04.csv"
7878df = DataFrame (CSV. File (Downloads. download (url)))
7979res1 = nlreg (df, @formula (y ~ fe (id1) + fe (id2)), Poisson (), LogLink () ; separation = [:ReLU ])
8080# don't test on the last ob because it was a singleton instead of a separation
8181@test all (df. separated[1 : end - 1 ] .== .~ res1. esample[1 : end - 1 ])
8282
83- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/05.csv"
83+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/05.csv"
8484df = DataFrame (CSV. File (Downloads. download (url)))
8585# add one fixed effect that is basically a intercept, because nlreg won't run without fe
8686df. id = ones (size (df,1 ))
8787res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + x4 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
8888@test all (df. separated .== .~ res1. esample)
8989
90- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/06.csv"
90+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/06.csv"
9191df = DataFrame (CSV. File (Downloads. download (url)))
9292# add one fixed effect that is basically a intercept, because nlreg won't run without fe
9393df. id = ones (size (df,1 ))
@@ -105,71 +105,72 @@ when setting ppmlhdfe sep as sep(ir), the output is:
105105(ReLU method dropped 1 separated observation in 2 iterations)
106106and the output gives ill results too.
107107
108- url = "https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/07.csv"
108+ url = "https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/07.csv"
109109df = DataFrame(CSV.File(Downloads.download(url)))
110110res1 = nlreg(df, @formula(y ~ x1 + x2 + fe(id1) + fe(id2)), Poisson(), LogLink() ; drop_singletons = false, separation = [:ReLU])
111111@test all(df.separated .== .~res1.esample)
112112=#
113113
114- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/08.csv"
114+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/08.csv"
115115df = DataFrame (CSV. File (Downloads. download (url)))
116116res1 = nlreg (df, @formula (y ~ x1 + x2 + fe (id1) + fe (id2)), Poisson (), LogLink () ; separation = [:ReLU ])
117117@test all (df. separated .== .~ res1. esample)
118118
119- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/09.csv"
119+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/09.csv"
120120df = DataFrame (CSV. File (Downloads. download (url)))
121121# add one fixed effect that is basically a intercept, because nlreg won't run without fe
122122df. id = ones (size (df,1 ))
123123res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
124124@test all (df. separated .== .~ res1. esample)
125125
126- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/10.csv"
126+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/10.csv"
127127df = DataFrame (CSV. File (Downloads. download (url)))
128128df. id = ones (size (df,1 ))
129129res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
130130@test all (df. separated .== .~ res1. esample)
131131
132- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/11.csv"
132+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/11.csv"
133133df = DataFrame (CSV. File (Downloads. download (url)))
134134df. id = ones (size (df,1 ))
135135res1 = nlreg (df, @formula (y ~ x1 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
136136@test all (df. separated .== .~ res1. esample)
137137
138- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/12.csv"
138+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/12.csv"
139139df = DataFrame (CSV. File (Downloads. download (url)))
140140res1 = nlreg (df, @formula (y ~ fe (id1) + fe (id2)), Poisson (), LogLink () ; drop_singletons = false , separation = [:ReLU ])
141141@test all (df. separated .== .~ res1. esample)
142142
143- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test/separation_datasets/13.csv"
144- df = DataFrame (CSV. File (Downloads. download (url)))
145- res1 = nlreg (df, @formula (y ~ fe (id1) + fe (id2)), Poisson (), LogLink () ; drop_singletons = false , separation = [:ReLU ])
146- @test all (df. separated .== .~ res1. esample)
143+ # original 13 no longer exists
144+ # url = "https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides/separation_datasets/13.csv"
145+ # df = DataFrame(CSV.File(Downloads.download(url)))
146+ # res1 = nlreg(df, @formula(y ~ fe(id1) + fe(id2)), Poisson(), LogLink() ; drop_singletons = false , separation = [:ReLU])
147+ # @test all(df.separated .== .~res1.esample)
147148
148- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/14 .csv"
149+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/13 .csv"
149150df = DataFrame (CSV. File (Downloads. download (url)))
150151df. id = ones (size (df,1 ))
151152res1 = nlreg (df, @formula (y ~ x1 + x2 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
152153@test all (df. separated .== .~ res1. esample)
153154
154- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/15 .csv"
155+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/14 .csv"
155156df = DataFrame (CSV. File (Downloads. download (url)))
156157df. id = ones (size (df,1 ))
157158res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
158159@test all (df. separated .== .~ res1. esample)
159160
160- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/16 .csv"
161+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/15 .csv"
161162df = DataFrame (CSV. File (Downloads. download (url)))
162163df. id = ones (size (df,1 ))
163164res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
164165@test all (df. separated .== .~ res1. esample)
165166
166- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/17 .csv"
167+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/16 .csv"
167168df = DataFrame (CSV. File (Downloads. download (url)))
168169df. id = ones (size (df,1 ))
169170res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
170171@test all (df. separated .== .~ res1. esample)
171172
172- url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/test /separation_datasets/18 .csv"
173+ url = " https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/guides /separation_datasets/17 .csv"
173174df = DataFrame (CSV. File (Downloads. download (url)))
174175df. id = ones (size (df,1 ))
175176res1 = nlreg (df, @formula (y ~ x1 + x2 + x3 + fe (id)), Poisson (), LogLink () ; separation = [:ReLU ])
0 commit comments