Recall the standard difference-in-differences setup:
This is equivalent to estimating two separate equations for both the control and treatment groups:
Recall the standard difference-in-differences setup:
This is equivalent to estimating two separate equations for both the control and treatment groups:
Consider the linear regression model:
Choose beta to minimise the SSE. The least squares estimator for beta is (derivation omitted):
Now suppose the true form includes an omitted variable in the error:
| import numpy as np | |
| import pickle | |
| def xavier_init(size, gain=1.0): | |
| """ | |
| Xavier initialization of network weights. | |
| """ | |
| low = -gain * np.sqrt(6.0 / np.sum(size)) | |
| high = gain * np.sqrt(6.0 / np.sum(size)) |
Adapted from some notes I took in https://github.com/contrasting/Clutter.
| final yMMMd = DateFormat.yMMMd(); | |
| final MMMd = DateFormat.MMMd(); | |
| final E = DateFormat.E().add_d(); | |
| final Hm = DateFormat.Hm(); | |
| String formatUnixTime(int unixMilli) { | |
| final sentTime = DateTime.fromMillisecondsSinceEpoch(unixMilli); | |
| final currTime = DateTime.now(); | |
| DateFormat formatter; |
| exports.getProfile = functions | |
| .region(REGION) | |
| .https.onCall(async (data, context) => { | |
| await init(context); | |
| // let sampleData = "userId"; | |
| if (typeof(data) !== "string") throw new functions.https.HttpsError("invalid-argument"); | |
| let me = await User.findOne({ _id: context.auth.uid }).select(selectOn).lean(); |
| import 'dart:html'; | |
| class EventSourceModel { | |
| static const kEndPoint = 'https://myfirebaseendpoint.com'; | |
| EventSource es; | |
| final StreamController<UserMatch> _controller = StreamController<UserMatch>(); | |
| Stream<UserMatch> get stream => _controller.stream; | |
| EventSourceModel() { |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <style> | |
| html { | |
| box-sizing: border-box; | |
| } | |
| *, *:before, *:after { | |
| box-sizing: inherit; | |
| } | |
| body { | |
| margin: 0; |
| private void GoUphill(VectorP potentialPos, VectorP response, int y, float potentialDist) | |
| { | |
| // found non colliding height | |
| if (response == VectorP.zero) | |
| { | |
| // move to this position | |
| UpdatePosition(potentialPos); | |
| return; | |
| } |
| VectorP response = GetCollisionResponse(potentialPos, velocity); | |
| // if there was an actual collision | |
| if (response != VectorP.zero) | |
| { | |
| // collision resolution: search in direction of opposite velocity for potentialPos until there is no collision | |
| VectorP oppositeVelocity = -velocity.Normalise(); | |
| for (VectorP testResponse = response; testResponse != VectorP.zero; testResponse = GetCollisionResponse(potentialPos, velocity)) | |
| { | |
| // strange loop i know |