In the class today, I learned how to design and make my own T-shirt. The first thing I did was finding a copyright free picture (it's really important. You either design your own image of find a copyright free image). Then I imported the image into "GTX Graphic Lab". After making sure the size and place of the image are proper on the shirt, I used heat press to iron the white blank T-shirt for 50 seconds. What I needed to do next is I need to do next is download the file of the T-shirt on a flash drive and pint it! Finally, after my shirt was printed out, I need to iron it again for 60 seconds.
Except printing a T-shit, I also needed to use sublimination to transfer the images of a kind of special paper to some objects through the help of heat.
I chose to customize a pencil pouch. For doing this, I created an image by using CorelDraw (remember you need to mirror the image!).
Then I printed the image on the special paper which is designed especially for sublimination. After I got my printing image, I cutted it according to
the size of the surface of my pencil pouch then sticked the cutted paper on the pencil pouch with images face down. Then what I need to do is to put pencil pouch with image
into the heat press for 60 second! After I took off the paper, I got a fantastic pencil pouch!
In addition to subliminate a pouch, I also did sublimination on a key chain just for fun. I reapeated the same process and the image perfectly transfered from
the paper to the surface of my key chain.
In class today, I did UV printing on a wood box. UV Printing is basically a form of digital printing using ultra-violet to dry or cure ink on the surface of stuffs. UV printing is magic, because it print a image that I want on a wood box surface perfectly. The saturation and lightness of the image on the box surface are unbelievably good, although the process of doing UV printing is a little bit complicate. I need to use red laser in the UV printer to make sure the hight, width and length of my box. However, after making sure these dimensions, the rest of things are easy to do. I just need print what I want on the box by import the image in the computer!


Bus drivers go on strike in 10 districts over new transport law
by bdnews24.comBus drivers and their assistants have gone on strike in parts of the country to protest harsher punishments for traffic offences under the new transport law.
In 10 districts in the southwestern region of the country, the transport workers have ‘willingly’ stopped running the buses, Bangladesh Road Transport Owners Association General Secretary Mortaza Hossain said on Monday.
The districts are: Jashore, Khulna, Bagerhat, Satkhira, Magura, Narail, Jhenaidah, Meherpur, Kushtia and Chuadanga.
The new law branded the drivers as killers in cases of road accidents, whereas in reality, the transport workers never kill anyone intentionally, said Mortaza.
The new law is quite similar to the law meant for criminals, he alleged.
“The drivers and their assistants have objected to many sections of the law. They stopped operating the buses on Sunday afternoon as the government took no steps to settle the issue.”
The government introduced the new law in 2018 following an unprecedented movement by students for safer roads, after two students were killed in separate bus accidents in Dhaka. The new law has a provision for a five-year jail term and fine as punitive measures for deaths in road crashes.
The law passed in 2018 was published as a gazette on Nov 1 this year. But the transport owners and workers associations have been protesting against the law since it was drafted. On the other hand, the government implemented the law two weeks later as it lacked clarity.
The transport workers called for an amendment to the Road Transport Act 2018 during the rally in Jashore on Nov 14, said Harun Or Rashid, general secretary of Jashore District Transport Workers Union.
No buses operated on domestic routes, including Jashore-Benapole and Jashore-Satkhira, but smaller vehicles, including cars and microbuses, were in service.
Long-haul buses operated on the routes to Benapole and Chattogram and other parts of the country, said MR Rahman, manager at Benapole office of Eagle Paribahan.


Mahrez cracker helps Man City to 2-1 win over Chelsea
by James CoxManchester City and Chelsea played out an entertaining clash at the Etihad Stadium tonight.
Chelsea went on the attack from the off and the were rewarded in the 21st minute as N'Golo Kante's effort bobbled over the line.
To Pep Guardiola's credit, his side did not panic after going 1-0 down.
They kept their composure and ha an equaliser seven minutes later.
Kevin De Bruyne didn't need a second invitation to shoot when he picked up the ball on the edge of the box and it flew in after taking a fortunate deflection off Kurt Zouma.
In the 36th minute they had the lead after a piece of individual brilliant from Riyad Mahrez.
The Algerian winger went on a run before cutting inside and firing the ball past Kepa.
The second-half wasn't as lively, unsurprisingly given the frantic pace of the opening 45 minutes.
There were four minutes of additional time at the end, plenty of time for some late drama.
Mason Mount went close with a free-kick before City went down the field and scored moments later.
However, VAR ruled out Raheem Sterling's goal for offside.
The result saw City leapfrog Chelsea into third place.


More powerful research nodes allow you to handle more data and run faster computations in your notebooks.
| Node Type | Number of Cores | Processing Speed | RAM |
|---|---|---|---|
| R1-4 | 1 Core | 2.4 GHz | 4 GB |
| R2-8 | 2 Cores | 2.4 Ghz | 8 GB |
| R4-12 | 4 Cores | 2.4 GHz | 12 GB |
| R8-16 | 8 Cores | 2.4 GHz | 16 GB |


{% extends 'email_base.html' %} {% load i18n %} {% block body %}
{% blocktrans %}Hi there {{studygroup.facilitator.first_name}}{% endblocktrans %},
{% blocktrans %}We saw that you created a learning circle last week. Amazing!{% endblocktrans %}
{% blocktrans %}The P2PU community is a great place to help you get everything set up for your learning circle. You can also explore group activities and facilitation strategies that may help you during your learning circle.{% endblocktrans %}
{% trans "Cheers" %},
P2PU


The old renamed
proxy-comm
system -- the current implementation of
CapTP
.
@author Chip Morningstar @author Mark S. Miller


Scala (DSL)
The recommended way to interact with WARP is through the Scala DSL.
This API provides a richer feature set than the Java API, including the ability
to register custom MeasurementCollector
and Arbiter
instances, and add
new tags in the form of String metadata that will be persisted.
The DSL is implemented by using an immutable case class, ExecutionConfig
to hold
all configuration parameters, such as number of invocations, warmups, threadpool size, etc.
We give sane defaults to all parameters.
Calls to the various DSL methods invoke the compiler-generated copy
method to build up
new instances of ExecutionConfig
:
|
|
Note, however, that the DSL itself manages the measurement lifecycle. Thus, we do not recommend using @WarpTest
annotation
together with the DSL, as that would lead to doubly measured tests. The DSL can be especially useful in cases where users
already make heavy use of BeforeEach
/AfterEach
hooks. @WarpTest
annotation is implemented using JUnit before/after hooks, the order
of which cannot be controlled. Thus, it is possible that tests using @WarpTest
will have extra overhead from other hooks included in their
measurement metadata. The DSL is decoupled from JUnit and can be used with other JVM testing frameworks.
Finally, a call-by name block is passed to ExecutionConfig.measuring
:
|
|
Custom Arbiter
and MeasurementCollector
instances can be registered by calling the arbiters
and collectors
methods:
|
|
The arbiters
and collectors
methods both accept a call-by-name function that returns an Iterable
. We use an implicit
to lift a single instance into an Iterable
type.
The threshold defined by the should not exceed
syntax is implemented as a scalatest Matcher[Duration]
.
DSL Operations
The DSL provides a flexible way to describe experimental setups for conducting repeated trials, and supports the following operations:
-
testId(id: TestId)
sets a testId, the name under which results will be recorded in our database. (default"com.workday.warp.Undefined.undefined"
. Typically we use the fully qualified method name of the test being measured.) -
invocations(i: Int)
sets the number of measured trial invocations (default 1). -
warmups(w: Int)
sets the number of unmeasured warmups (default 0). -
threads(p: Int)
sets the thread pool size (default 1). -
distribution(d: DistributionLike)
sets aDistribution
to govern expected delay between scheduling invocations (default 0 delay). -
mode(m: ModeWord)
sets a “mode” for test measurement. This is an advanced feature that only applies to experiments with a threadpool of at least 2 threads. Thesingle
mode will treat the entire schedule of invocations as a single logical test. A single controller will be created to measure the entire schedule. Themulti
mode (which is the default) measures each invocation on an individual basis. -
only defaults
is a no-op included for more English-like readability. -
no arbiters
disables all existing defaultArbiter
. -
arbiters(a: => Iterable[ArbiterLike])
registers a collection of newArbiter
to act on the results of the measured test. -
only these arbiters(a: => Iterable[ArbiterLike])
composes the two above operations; disabling all existing arbiters and registering some new arbiters. -
no collectors
disables all existing default measurement collectors. -
collectors(c: => Iterable[AbstractMeasurementCollector])
registers a collection of new measurement collectors to measure the given test. -
only these collectors(c: => Iterable[AbstractMeasurementCollector])
composes the two above operations; disabling all existing collectors before registering some new collectors. -
tags(t: => Iterable[Tag])
registers a sequence of Tags that will be applied to the trials. -
measure(f: => T)
(and its synonym,measuring
) perform the measurement process wrapped aroundf
. We include themeasuring
synonym solely for more English-like readability when combined with a static threshold using our scalatestMatcher[Duration]
:This is naturally the most complex operation, as it involves creating a threadpool, layering collectors in the correct order, persisting results, etc.1 2
using only defaults measure someExperiment using only defaults measuring someExperiment should not exceed (5 seconds)
DSL Return Type
After we have constructed an ExecutionConfig
that fits the needs of our experiment, we call the measuring
(or measure
, a synonym) method
with the call-by-name function f
that we want to measure. The return type of measuring
is List[TrialResult[T]]
, where T
is the return type of f
. This gives us access to the returned values of each invocation of f
if they are needed for further
analysis.
Additionally, TrialResult
holds a TestExecutionRow
corresponding to the newly written row in our database, and
the measured response time of the trial.
For example, suppose we are interested in measuring the performance of List.fill[Int]
construction:
|
|
After measurement has been completed, we are able to access the return values of the function being measured.
The DSL provides a flexible way to customize the execution schedule of your experiment, including adding new measurement collectors and arbiters for defining failure criteria.


Front Matter encoded by Colleen Schlemmel. Chapter 1 encoded by Emily Fehr. Chapter 7 encoded by Shannyn McEntee. Chapter 9 encoded by Rose Kottwitz. Chapter 11 encoded by Colleen Schlemmel.
View the files in GitHub: XML , XSLT , and CSS .
View the files in Github: XML , XSLT , and CSS .
View the files in GitHub: XML , XSLT , and CSS .
View the files in GitHub: XML , XSLT , and CSS .
View the files in Github: XML , XSLT , and CSS .
This work
is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.


What is "Jumanji?"
It is a board game. A board game with supernatural powers. A board game that carries a terrible curse. Those who play it must complete the game or never see an end to the jungle perils it unleashes upon them.
The movie, JUMANJI, starts on a rainy night in 1869 as a pair of brothers bury a chest a mile outside of a small New Hampshire town. As they throw the dirt upon it, jungle drums beat from within the chest, calling to them. They persist, but when done, the younger asks the older, "What if someone else unearths it and plays the game?" The elder says, "Then may God have mercy upon his soul." [Lightning crash!]
Flash forward to 1969, when Alan Parrish, a boy of eleven or so, hears jungle drums at a construction site. He uncovers the chest and retrieves Jumanji. The game is so beautiful - a case of carved wood and with ivory pawn paths, animal-shaped tokens of carved onyx. What kid wouldn't want this game? (See note at end). He brings it home and shows it to his friend, Sarah. They settle in to play the game and when Alan rolls the dice, he is sucked into Jumanji.
Flash forward once more to 1995, when Judy and Peter move into the abandonned Parrish family home. No sooner do they settle in than they hear jungle drums coming from the attic. No sooner do they investigate the attic than they find themselves playing Jumanji. The game unleashes jungle terrors upon them, but it also sets free the vanished Alan Parrish - who has grown up inside the game. The three come to realize the only way to end the madness Jumanji has wrought is to finish the game that was started 26 years ago. But that, of course, means facing all the perils Jumanji has to offer head on.
(This is a lot more exposition than I normally do, but I found the trailer confusing when I first saw it and the commercials aren't much better. As far as you can tell from them, this movie concerns a wild man, a board game and animals running amok.)
So what is JUMANJI?
JUMANJI is a demolition derby. There is more smashing, crashing, blasting, and crunching in this movie than in any I've seen this year. The utter mayhem of JUMANJI makes SPEED look as if it were directed by Felix Unger.
Do you remember those moments in JURASSIC PARK when your mouth just hung open and your eyes felt like they were coming out of their sockets? JUMANJI has a bunch of these (albeit not quite as many). The most magnificent was the stampede sequence. I was prepared to be unimpressed, but was completely blown away. You could almost smell the elephant droppings.
The sound was critical in working this effect. Industrial Light and Magic did a great job spawning a jungle of digital creatures, but I wasn't as impressed by the cyber-beasts as by the sound design. If I may indulge in Oscar speculation at such an early stage, I think JUMANJI will nab this year's Academy Award for Sound Effects Editing.
JUMANJI is not a character-driven movie. There is a dab of character development thrown in - enough to keep the story from being flat as a board game. It is not a movie for small children. Take kids six years old or under to JUMANJI and I guarantee they will want to crawl into bed with mom & dad until they are 18. There were some kids in the audience at tonight's screening, and they seemed no worse for wear, but they all seemed to be eight or older.
JUMANJI is not an actor's movie, but there were no bad performances. Robin Williams plays the grown-up Alan. Kirsten Dunst (the vampirette of INTERVIEW WITH THE VAMPIRE) plays Judy. Bebe Neuwirth (Lilith from TV's "Cheers") is Judy and Peter's aunt. David Alan Greir (of TV's "In Living Color") plays a cop who's spends the movie trying to get to the bottom of the weirdness. And Bonnie Hunt plays the grown-up Sarah. Bonnie was the mother in the BEETHOVEN movies and the best friend to Marisa Tomei's character in ONLY YOU. I like her - she's funny.
JUMANJI draws a lot of laughs both from witty scripting and roller coaster excitement. But the emphasis is on the roller coaster. This movie is Busch Gardens, not the Comic Strip.
If you are at all inclined toward seeing this kind of movie, see it and see it on the big screen - preferably fifth row from the front in a theatre with digital sound. You'll have a blast.
Note: When I first saw the trailer for JUMANJI, I said to myself, "How shameless! They're making a movie to promote a new board game. I wonder which will be greater, the box office receipts or the toy store receipts." But having seen the movie, I now wonder how they expect to sell the board game? What good is it if a kid rolls the dice and nothing comes smashing through the walls?
-- Michael Doyle<EMAIL_ADDRESS>To join "Mike's Midnight Movie Reviews" send a message to<EMAIL_ADDRESS>with no subject and the words "subscribe m3review" in the body.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: default ---
Read my blog to learn about my savings adventures and product reviews.
{{ post.date | date_to_string }} - {{ post.author }}


LIMBO (1999)
Rating: 3 stars (out of 4.0) ******************************** Key to rating system: 2.0 stars - Debatable 2.5 stars - Some people may like it 3.0 stars - I liked it 3.5 stars - I am biased in favor of the movie 4.0 stars - I felt the movie's impact personally or it stood out ********************************* A Movie Review by David Sunga
Directed by: John Sayles
Written by: John Sayles
Starring: Mary Elizabeth Mastrantonio, David Strathairn, and Vanessa Martinez
Synopsis: Mary Elizabeth Mastrantonio is lounge singer Donna De Angelo. Vanessa Martinez is Donna's teenage daughter Noelle. David Strathairn plays Joe Gastineau, a handyman who was once a fisherman. They all live in a seaside town in Alaska, and they all have issues. Donna has survived a string of failed relationships and her career as a singer hasn't panned out. Noelle is profoundly unhappy. Joe feels responsible for a boating accident years ago. The three of them take a boat ride up the Alaskan coast and end up stranded together on an inhospitable, deserted island.
Opinion: Some movies are all about action and effects. A beautiful, high-maintenance cast of stereotypical characters goes through a prefab movie formula to entertain us with big budget bangs and booms and give us manufactured warm and fuzzy feelings. Other, smaller budget movies are more like the small theater experience. The plot allows the audience to develop empathy with an ensemble of less than perfect characters. Then the characters are put in a tight situation or place and all their issues come out. A lesson is learned or an aspect highlighted.
LIMBO is more like the latter than the former. I'd like to see a theater version of it someday. Characters in LIMBO behave the way real people might act. They're not superheroic. They're not overly dramatic, overly successful, stereotypical, or even glamorous.  And there's no formula to this movie.
To tell the truth, the editing seems a little choppy in the last part, and the movie's finale is a complete surprise. But it's good that way. In life some of the most profound events, friendships, or forks in the road occur in an unannounced way, sometimes not even recognized or noticed till years later. LIMBO is sort of like that. Characters make life-changing decisions and never even realize that they are making decisions. That's the beauty of this movie.
Reviewed by David Sunga June 7, 1999
Copyright © 1999 by David Sunga This review and others like it can be found at THE CRITIC ZOO: http://www.criticzoo.com email<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Clear, a checklist app, just raised the bar for mobile design
tl;dr Clear is a simple, beautiful new checklist app. If you have an iPhone and use it or want to use it for grocery lists, todo lists, etc., or if you work on mobile apps and are looking for design inspiration, drop what you’re doing and download Clear from the App Store.
Every programmer makes a checklist app/website at some point in their life. Everyone uses checklists, everyone uses checklists differently, and they seem easy enough to make your own that it’s easy to try. Given the plethora of apps for this purpose, I didn’t imagine it possible for a checklist app design to be so innovative that it raises the bar for all mobile app design. Clear did just that.
I use checklists a lot. Grocery list. Todo list. Movies I want to watch. I’ve had a surprising struggle finding a good iPhone app for these purposes. My requirements are minimal:
- Easy drag and drop to reorder.
- Easy to add many items quickly.
- Easy to clear completed items.
- (Bonus) Sync to web
That’s it. I literally couldn’t find this app. Flow packed a bunch of features I didn’t need and charged $9/month. Lists didn’t have a way to clear completed items and kept a badge notification counting the number of incomplete items in the app (WTF?). Other apps, like the native Reminders, don’t have a way to reorder items (at least as far as I can tell). For me, a checklist app doesn’t need any of the following popular features:
- Social integration
- Email integration
- Due dates
- Comments
- Long form “details”
- Subitems
- Integration with Pivotal Tracker
- Integration with MS-DOS
OK, I made up the last one. You got me. The point is - everyone who makes a checklist app either does it as a crappy throwaway project, or thinks it’s going to be The Next Great Thing and spends so much time building cool features for 1% of their potential users that they don’t build a good interface for the checklist itself, the core feature.
I had actually given up on finding this app and started building my own. This made me realize that is trivial as it seems, designing a good checklist on a mobile phone is actually hard. Here are a few of the design challenges I’ve encountered:
- How do you decide whether to add items to the top or bottom of the list?
- What if you want to add an item in the middle?
- How do you arrange the buttons for “Add”, “Edit”, and “Clear completed” without making the app hideous and/or unusable?
- Should tapping an item’s text start editing, or check the item?
- How do you add lots of items quickly?
Clear thought outside the box, ditched every piece of iOS boilerplate chrome, and used gestures to brilliantly solve all of these problems. One of the problems with gestures is that they’re hard to learn. A checklist app, however, can populate its initial list with short tips teaching you all the gestures! This isn’t unique to Clear, but it works really well for them. Here are the gestures they used to solve the problems above:
- Tapping the space at the bottom of a list adds a new item to the bottom. A soft swipe down (i.e. pulling the list down to allow space for a new item) adds a new item to the top.
- Pinching two items apart adds an item in between - so obvious once you realize it. I’m just not sure anyone realized that until Clear.
- There is no edit mode. No checkbox. Swipe right to complete an item, left to delete. Hold down to drag and reorder. Swipe up to clear completed items.
- To add lots of items quickly, swipe down in the area above the keyboard to complete the current item and add another.
Clear also reclaimed screen real estate by replacing the traditional navigation bar/back button with two gestures to go back - pinch vertically inward, and swipe quickly up. I personally prefer swipe quickly up.
There are a few quirks I’d love to see Clear fix in the next release:
- A synced web interface so I can edit my lists from my computer.
- I usually swipe down from the top of the list to add an item to the top, which seems metaphorically correct to me (even though the gesture works on any part of the screen). However, this pulls down the iOS notification center. Not sure the best way to fix this.
- For quick add, swiping down to add an item above works great, but swiping up should add the new item below.
- Once you fill the screen, there’s nowhere to tap to add an item to the bottom of the list. They should just add a black dummy row here.
- Sometimes when I try to move up the list hierarchy with a fast swipe, I end up creating a new item (small swipe). They might just need to tweak the velocity boundary between these two gestures.
- There is no undo. You should be able to shake to undo.
I hope the Clear gestures become conventional for list editing. Clear raised the bar for all mobile apps, not just checklists. Every mobile designer should be thinking - how can I remove features, remove buttons, and take advantage of the unique properties of a handheld device? How can I take the mundane and make it simple, elegant, beautiful?


--- title: About layout: default permalink: /about/ ---
Built for English speakers that want to study new languages, either casually or with purpose, the Top Free Language Learning Resources website is a directory of online applications that allows any user to partake in language studies regardless of income or socioeconomic class. Unlike many other sites containing resources for language learning, our site will not include costly programs that only certain users can afford. No resources will require payment for use.
This site groups resources into 3 main types: immersive, linear lessions, and self study. Immersive resources allow users to interact with other users of the target language via text and speaking in real time. Linear lessions provide users with language courses that progress in a linear function; they teach skills hierarchically. Self study resources provide the tools through which learners can teach themselves an assortment of new vocabulary.


@JRPictures @TheNicozu I have no regrets, this was the only streaming service…
My whole life was Unlimited Streaming Works!


How I Hack Email
In a conversation with @alexbaldwin yesterday the topic of email came up, with each of us quickly diving into various observations, how its both awesome and a great form of communication/engagement, how most people still do it really bad. Alex has some good experience with it with hack design having over 100,000 subscribers. A tangent in an entirely unrelated meeting with @mschoening and others it was suggested instead of emailing a list to send out a ton of individual emails instead. Both of these reminded me that email is incredibly powerful, but taking advantage of its power has to be intentional.
This is not about ways to get to inbox 0 or better manage your inflow of emails. Rather its about how to get the maximum output out of emails that you send, or minimum output depending on what you prefer.
1 email to 100 vs. 100 emails to 1
This is perhaps my favorite approach to get more efficient feedback and also know how broad an impact something has. Most smaller companies or groups within a company have a mailing list thats<EMAIL_ADDRESS>or<EMAIL_ADDRESS>When people want to communicate out to the entire list its a great mechanism, however when you want feedback from the entire company its not a great mechanism.
The reason being is that most people will know how many are on that list and assume that someone else will pick it up. This concept is fairly common in physical settings known as the bystander effect, stating that individuals often do not offer up help to a victim when there are other bystanders preset.
Finally in certain situations you’ll want to hear the same thing 100 times. Hearing something once doesn’t represent how much others echo that. You’ll only see so many +1s on a thread, getting 100 individual responses ensure you get not only the breadth of responses but amplitude of them.
FWIW, I ran a test of this sending an email to essentially all@heroku, then an individualized email in a similar form. The one directly addressed to people received 5x response as well as more thorough responses in the same time frame
Scaling requests for input
The issue that typically exists with the above is that you don’t want 100 responses from 100 people most of the time. Most of the time you want feedback from 2 or 3, then feedback from 4 or 5, then smaller feedback or revision from the rest of that 100. This is actually how I craft blog posts, I start with broad messaging/theming. At that level there’s truly 100 different directions it could go, that kind of input it not helpful when I have to narrow it down to a single one. When collecting product/roadmap input it can be helpful. Knowing which of the two I’m aiming for is critical in deciding a method.
Being explicit about the before and the ask
On the note of crafting a blog post I do usually start with a request from 2 or 3 to get general direction. This takes the effect of, is this interesting? From here though theres still further refinement. The next phase is, does this flow, does it make sense? Here having a broader list is helpful so usually it’ll hit around 4 to 5 people. Finally I’ll revert to the 1 email to 100 people on a mailing list asking for grammar input because mine is crap. Here I don’t mind the bystander effect because I want people to intentionally filter so it works well.
The key at each step of the process is being extremely clear of whats already been done. With a blog post as an example… If I don’t explain the process of people having reviewed and set the goals and some consensus that it meets them, that several have been over it for flow, and that what I’m looking for now which is grammar feedback.
Circulating through people
Email and requests are a time burden on people. I commonly diversify and circle through a set of people. Much in the same way I reach out to people to have drinks or coffee every so often I am to not do the same person every week and only that person with the exception of my wife.
Having more of a rotating basis of getting through people increases their excited-ness to provide input. If I’m always going back to the same people they may feel slightly drained by my constant requests, and quite rightfully so. At the same time the input is good, but diversifying where you receive it gives a broader perspective.
Delayed sending
This is one that may be a little more obvious to people. But sending an email to slow down a thread, not seem over eager, or for whatever other reason you may have is hugely useful. There’s really two tools I look to here: 1. Boomerang and 2. Yesware. Both have slightly different benefits. Boomerang with a much simpler interface, Yesware better integration with Salesforce. Regardless of which you choose, if you ever want to type and email but send it at some point later one of these is critical.
Fin.
While this list is less of a defined process and more of a collection of random processes, several of these I’d be much less effective without, and the collection of all makes getting appropriate reactions from email incredibly useful. I’d love to hear what hacks you use to elicit positive impact from the emails you receive, as always if you have feedback please drop me a note.


a, w, d, and s will move you around the board. Eat the apples, but don't run into yourself. Read more about me.


- All Superinterfaces:
CurrencySupplier
public interface ExchangeRate extends CurrencySupplier
This class models an exchange rate, which defines the factor the numeric value of a base amount in some currency
'A' must be multiplied
to get the corresponding amount in the terminating currency 'B'. Hereby
- an exchange rate always models one rate from a base (source) to a term
(target)
CurrencyUnit
. - an exchange rate is always bound to a rate type, which typically matches the data source of the conversion data, e.g. different credit card providers may use different rates for the same conversion.
- an exchange rate may restrict its validity. In most of the use cases a rates' validity will be well defined, but it is also possible that the data provider is not able to support the rate's validity, leaving it undefined-
- an exchange rate has a provider, which is responsible for defining the rate. A provider hereby may be, but must not be the same as the rate's data source.
- an exchange rate can be a direct rate, where its factor is represented by a single conversion step. Or it can model a derived rate, where multiple conversion steps are required to define the overall base/term conversion. In case of derived rates the chained rates define the overall factor, by multiplying the individual chain rate factors. Of course, this also requires that each subsequent rate's base currency in the chain does match the previous term currency (and vice versa):
- Whereas the factor should be directly implied by the format rate chain for derived rates, this is obviously not the case for the validity range, since rates can have a undefined validity range. Nevertheless in many cases also the validity range can (but must not) be derived from the rate chain.
- Finally a conversion rate is always unidirectional. There might be cases
where the reciprocal value of
getFactor()
} matches the correct reverse rate. But in most use cases the reverse rate either has a different rate (not equal to the reciprocal value), or might not be defined at all. Therefore for reversing a ExchangeRate one must access anExchangeRateProvider
and query for the reverse rate.
The class also implements Comparable
to allow sorting of multiple
exchange rates using the following sorting order;
- Exchange rate type
- Exchange rate provider
- base currency
- term currency
Finally ExchangeRate is modeled as an immutable and thread safe type. Also
exchange rates are Serializable
, hereby serializing in the following
form and order:
- The base
CurrencyUnit
- The target
CurrencyUnit
- The factor (NumberValue)
- The
ConversionContext
- The rate chain
Implementation Specification
Implementations of this interface
- must be Comparable(with
ExchangeRate
) - must implement equals/hashCode considering #getBaseCurrency, #getCurrency, #getFactor and #getContext.
- should be thread-safe
- should be serializable
- should provide a fluent builder API for constructing new rate instances easily.
- Author:
- Werner Keil, Anatole Tresch
- See Also:
- Wikipedia: Exchange Rate (Quotations)
-
Method Summary
Modifier and Type Method Description CurrencyUnit
getBaseCurrency()
Get the base (source)CurrencyUnit
.ConversionContext
getContext()
Access theConversionContext
ofExchangeRate
.CurrencyUnit
getCurrency()
Get the term (target)CurrencyUnit
.java.util.List<ExchangeRate>
getExchangeRateChain()
Access the chain of exchange rates.NumberValue
getFactor()
Access the rate's bid factor.default boolean
isDerived()
Allows to evaluate if this exchange rate is a derived exchange rate.
-
Method Details
-
getContext
ConversionContext getContext()Access theConversionContext
ofExchangeRate
.- Returns:
- the conversion context, never null.
-
getBaseCurrency
CurrencyUnit getBaseCurrency()Get the base (source)CurrencyUnit
.- Returns:
- the base
CurrencyUnit
.
-
getCurrency
CurrencyUnit getCurrency()Get the term (target)CurrencyUnit
.- Specified by:
getCurrency
in interfaceCurrencySupplier
- Returns:
- the term
CurrencyUnit
.
-
getFactor
NumberValue getFactor()Access the rate's bid factor.- Returns:
- the bid factor for this exchange rate, or
null
.
-
getExchangeRateChain
java.util.List<ExchangeRate> getExchangeRateChain()Access the chain of exchange rates.- Returns:
- the chain of rates, in case of a derived rate, this may be
several instances. For a direct exchange rate, this equals to
new ExchangeRate[]{this}
.
-
isDerived
default boolean isDerived()Allows to evaluate if this exchange rate is a derived exchange rate. Derived exchange rates are defined by an ordered list of subconversions with intermediate steps, whereas a direct conversion is possible in one steps.This method always returns
true
, if the chain contains more than one rate. Direct rates, have also a chain, but with exact one rate.- Returns:
- true, if the exchange rate is derived.
-


Runtime Commands
In addition to expressions, Lavender programs may contain commands that change the state of the runtime. Runtime commands may only appear at the top level, and follow the format below. @ <command> [args...] Unlike expressions, runtime commands do not produce values and cannot interact with program state. Runtime commands are similar to C language preprocessor directives, except that they are executed at runtime in line with the source code. In particular, commands must be on a line of their own and may not span multiple lines.
The list of runtime commands is as follows.
| Command Format | Description |
|---|---|
@import <file> |
Evaluates the contents of the specified file. The file location is first checked relative to the filepath specified with the -fp command line option, and then to the working directory. |
@using <name> |
If the name is a qualified name, makes that name visible in the current namespace, else the name is treated as a namespace and all names in that namespace are made visible in the current namespace. |
@forward <func-decl> |
(Java only). Forward declares the given function. The function's name may be used from this point on as if the function had been defined (however evaluating such expressions is an error). The actual definition of the function must have the same function heading, including number of parameters and passing conventions. |
@resolve [files...] |
(Java only). Evaluates the given files and links all imported files. Linking replaces uses of forward declarations of functions with the actual function. It is an error if not all functions have been defined at the point this command is executed. |
@library <lib> |
(Java only). Loads the functions in the given library. The library in this runtime is a Java class file on the classpath, which includes the Lavender filepath. |
@delete <qual-name> |
Unbinds the specified name from the function it denotes. The name may be used to define a new function. The old function itself is not deleted, and previous uses of the name still refer to the old function. |
@quit |
Terminates the runtime. |
@dump |
Dumps information about the runtime to the console. |


Before Change
def drop_models(self, *args): pass
def analyze_models(self, *args): pass
def simulate_joint(self, _bdb, _generator_id, targets, _constraints):
return stats.norm(loc=0, scale=1).rvs(len(targets))
def logpdf(self, _bdb, _generator_id, targets, _constraints):
vals = [value for (_, _, value) in targets]
anss = stats.norm(loc=0, scale=1).logpdf(vals)
After Change
def drop_models(self, *args): pass
def analyze_models(self, *args): pass
def simulate_joint(self, _bdb, _generator_id, targets, _constraints):
return [self.prng.gauss(0, 1) for _ in targets]
def logpdf(self, _bdb, _generator_id, targets, _constraints):
return sum(logpdfOne(value, 0, 1) for (_, _, value) in targets)
def insert(self, *args): pass
def remove(self, *args): pass


--- layout: post date: 2011-08-08 time: "09:00:00" authors: ["Greg Wilson"] title: Introducing Programming a Different Way tags: ["Content"] ---
Our quick introduction to Python is the module I'm least happy with, so I've been thinking about how to re-design it. I've included a new outline below; comments would be very welcome.
Programming is what you do when you can't find an off-the-shelf tool to do what you want
Why is programming hard to teach/learn?
We will teach basic programming by example
We will use Python
Will not start with multimedia programming, 3D graphics, etc.
We assume that you've done some programming, in some language, at some point
Before we dive in, what is a program?
Programs store data and do calculations
Put the following in a text file (not Word) and run it
# Convert temperature in Fahrenheit to Kelvin.
temp_in_f = 98.6
temp_in_k = (temp_in_f - 32.0) * (5.0 / 9.0) + 273.15
print "body temperature in Kelvin:", temp_in_k
body temperature in Kelvin: 310.15
Variable is a name that labels a value (picture)
Created by assignment
Usual rules of arithmetic: * before +, parentheses
Print displays values
Need to know it: use "5/9" instead of "5.0/9.0"
# Convert temperature in Fahrenheit to Kelvin.
temp_in_f = 98.6
temp_in_k = (temp_in_f - 32.0) * (5 / 9) + 273.15 # this line is different
print "body temperature in Kelvin:", temp_in_k
body temperature in Kelvin: 273.15
Run interpreter, try 5/9
, get 0
Integer vs. float, and what division does
Automatic conversion: 5.0/9
does the right thing
[Box] Why are so many decimal places shown in 5.0/9
Need to know it: sometimes Python doesn't know what to do
# Try adding numbers and strings.
print "2 + 3:", 2 + 3
print "two + three:", "two" + "three"
print "2 + three:", 2 + "three"
2 + 3: 5 two + three: twothree 2 + three: Traceback (most recent call last): File "add-numbers-strings.py", line 5, in <module> print "2 + three:", 2 + "three" TypeError: unsupported operand type(s) for +: 'int' and 'str'
In this case, "2three"
would be sensible
But what about "1" + 2?
On your own, try "two" * 3
Back to useful things
Computers are useful because they can do lots of calculations on lots of data
Which means we need a concise way to represent multiple values and multiple steps
# Find the mean.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
total = 0
number = 0
for value in data:
total = total + value
number = number + 1
mean = total / number
print "mean is", mean
mean is 2
Use list to store multiple values
Use loop to perform multiple operations
Can trace execution step by step manually or in a debugger
Did you notice that the result in the example above is wrong?
Problem is that total starts as an integer, we're adding integers, we wind up doing int/int (again)
Could fix it by initializing total to 0.0
Or use a function to do the conversion explicitly
# Find the mean.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
total = 0
number = 0
for value in data:
total = total + value
number = number + 1
mean = float(total) / number # this line has changed
print "mean is", mean
mean is 2.77777777778
Functions do what they do in mathematics
Spend a whole chapter on them, since they're key to building large programs
Right now, most important lesson is that just because a program runs, doesn't mean it's correct
[1, 4]
produces 2 instead of 2.5Need to know it: the len
function
# Find the mean.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
total = 0
for value in data:
total = total + value
mean = float(total) / len(data) # this line has changed
print "mean is", mean
mean is 2.77777777778
Need to know it: list are mutable
# Calculate running sum by creating new list.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
result = []
current = 0
for value in data:
current = current + value
result.append(current)
print "running total:", result
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
Start with the empty list
result.append
is a method
How to double the values in place?
# Try to double the values in place.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
for value in data:
value = 2 * value
print "doubled data is:", data
doubled data is [1, 4, 2, 3, 3, 4, 3, 4, 1]
New values are being created, but never assigned to list elements
Easiest to understand with a picture
Need to know it: list indexing
Mathematicians use subscripts, we use square brackets
Index from 0..N-1 rather than 1..N for reasons that made sense in 1970 and have become customary since
# Try to double the values in place.
data = [1, 4, 2]
data[0] = 2 * data[0]
data[1] = 2 * data[1]
data[2] = 2 * data[2]
print "doubled data is:", data
doubled data is [2, 8, 4]
Clearly doesn't scale...
Need to get all the indices for a list of length N
The range
function produces a list of numbers from 0..N-1
You will almost never be the first person to need something
# Double the values in a list in place
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
length = len(data) # 9
indices = range(length) # [0, 1, 2, 3, 4, 5, 6, 7, 8]
for i in indices:
data[i] = 2 * data[i]
print "doubled data is:", data
doubled data is: [2, 8, 4, 6, 6, 8, 6, 8, 2]
Fold this together by combining function calls (like \sqrt{sin(x)})
# Double the values in a list in place.
data = [1, 4, 2, 3, 3, 4, 3, 4, 1]
for i in range(len(data)):
data[i] = 2 * data[i]
print "doubled data is:", data
doubled data is: [2, 8, 4, 6, 6, 8, 6, 8, 2]
Usually won't type in our data
Store it outside program
# Count the number of lines in a file
reader = open("data.txt", "r")
number = 0
for line in reader:
number = number + 1
reader.close()
print number, "values in file"
9 lines in file
What about mean?
# Find the mean.
reader = open("data.txt", "r")
total = 0.0
number = 0
for line in reader:
total = total + line
number = number + 1
reader.close()
print "mean is", total / number
Traceback (most recent call last): File "mean-read-broken.py", line 7, in <module> total = total + line TypeError: unsupported operand type(s) for +: 'float' and 'str'
Data in file is text, so we need to convert
# Find the mean.
reader = open("data.txt", "r")
total = 0.0
number = 0
for line in reader:
value = float(line)
total = total + value
number = number + 1
reader.close()
print "mean is", total / number
mean is 2.77777777778
Notice that we're using the original program as an oracle
Real-world data is never clean
Count how many scores were not between 0 and 5
# Count number of values out of range.
data = [0, 3, 2, -1, 1, 4, 4, 6, 5, 5, 6]
num_outliers = 0
for value in data:
if value < 0: num_outliers = num_outliers + 1 if value > 5:
num_outliers = num_outliers + 1
print num_outliers, "values out of range"
3 values out of range
Need to know it: combine tests using and
and or
# Count number of values out of range.
data = [0, 3, 2, -1, 1, 4, 4, 6, 5, 5, 6]
num_outliers = 0
for value in data:
if (value < 0) or (value > 5):
num_outliers = num_outliers + 1
print num_outliers, "values out of range"
3 values out of range
Need to know it: in-place operators
# Count number of values out of range.
data = [0, 3, 2, -1, 1, 4, 4, 6, 5, 5, 6]
num_outliers = 0
for value in data:
if (value < 0) or (value > 5):
num_outliers += 1
print num_outliers, "values out of range"
3 values out of range
Don't actually "need" to know it
But it's a common idiom in many languages
Data cleanup
# Report where values are not monotonically inreasing
data = [1, 2, 2, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8]
for i in range(2, len(data)):
if data[i] < data[i-1]:
print "failure:", i
i = i + 1
failure: 8
Group by threes
# Combine successive triples of data.
data = [1, 2, 2, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8]
result = []
for i in range(0, len(data), 3):
sum = data[i] + data[i+1] + data[i+2]
result.append(sum)
print "grouped data:", result
Traceback (most recent call last): File "group-by-threes-fails.py", line 6, in <module> sum = data[i] + data[i+1] + data[i+2] IndexError: list index out of range
13 values = 4 groups of 3 and 1 left over
First question must be, what's the right thing to do scientifically?
Let's assume, "Add up as many as are there"
# Combine successive triples of data.
data = [1, 2, 2, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8]
result = []
for i in range(0, len(data), 3):
sum = data[i]
if (i+1) < len(data):
sum += data[i+1]
if (i+2) < len(data):
sum += data[i+2]
result.append(sum)
print "grouped data:", result
grouped data: [5, 11, 16, 20, 8]
But this is clumsy
How do we add up the first three, or as many as are there?
Don't want to have to keep modifying the list as we try out ideas
So use a list of lists.
# Add up the first three, or as many as are there.
test_cases = [[], # no data at all
[10], # just one value
[10, 20], # two values
[10, 20, 30], # three
[10, 20, 30, 40]] # more than enough
for data in test_cases:
print data
[] [10] [10, 20] [10, 20, 30] [10, 20, 30, 40]
Can now try all our tests by running one program
Back to our original problem: sum of at most the first three
# Sum up at most the first three values.
test_cases = [[], # no data at all
[10], # just one value
[10, 20], # two values
[10, 20, 30], # three
[10, 20, 30, 40]] # more than enough
for data in test_cases:
limit = min(3, len(data))
sum = 0
for i in range(limit):
sum += data[i]
print data, "=>", sum
[] => 0 [10] => 10 [10, 20] => 30 [10, 20, 30] => 60 [10, 20, 30, 40] => 60
That looks right
Need one more tool: nested loops
# Loops can run inside loops.
for i in range(4):
for j in range(i):
print i, j
1 0 2 0 2 1 3 0 3 1 3 2
Easiest to understand with a picture
Final step: instead of starting at zero every time, start at 0, 3, 6, 9, etc.
Don't need to test everything (which is why we skip from 40 to 60 to 80)
# Sum up in groups of three.
test_cases = [[],
[10],
[10, 20],
[10, 20, 30],
[10, 20, 30, 40],
[10, 20, 30, 40, 50, 60],
[10, 20, 30, 40, 50, 60, 70, 80]]
for data in test_cases:
result = []
for i in range(0, len(data), 3):
limit = min(i+3, len(data))
sum = 0
for i in range(i, limit):
sum += data[i]
result.append(sum)
print data, "=>", result
[] => [] [10] => [10] [10, 20] => [30] [10, 20, 30] => [60] [10, 20, 30, 40] => [60, 40] [10, 20, 30, 40, 50, 60] => [60, 150] [10, 20, 30, 40, 50, 60, 70, 80] => [60, 150, 150]
Understand this in pieces
Outer for
loop is selecting a test case
Inner loop is going in strides of three
limit is as far as we can go toward three values up from i
range(i, limit)
guaranteed to be valid indices for listHuman beings can only keep a few things in working memory at once
How we actually understand this program is:
for data in test_cases: result = sum_by_threes(data) print data, "=>", result to sum_by_threes given a list data: result = [] for i in range(0, len(data), 3): limit = min(i+3, len(data)) sum = sum_from(data, i, limit) result.append(sum) to sum_from given a list data, and start and end indices: sum = 0 for i in range(start, end): sum += data[i]
The computer doesn't care one way or another
But what we need is a way to write our programs in pieces, then combine the pieces
That's the subject of the next chapter


Nightwatch.js is an automated testing framework for web applications and websites, written in Node.js and using the W3C WebDriver API (formerly Selenium WebDriver).
It is a complete browser ( End-to-End) testing solution which aims to simplify the process of setting up Continuous Integration and writing automated tests. Nightwatch can also be used for writing Node.js unit tests.
Nightwatch got its name from the famous painting The Night Watch by Dutch artist Rembrandt van Rijn. The masterpiece is prominently displayed in the Rijksmuseum, in Amsterdam - The Netherlands.
WebDriver is a general purpose library for automating web browsers. It was started as part of the Selenium project, which is a very popular and comprehensive set of tools for browser automation, initially written for Java but now with support for most programming languages.
Nightwatch uses the WebDriver API to perform the browser automation related tasks, like opening windows and clicking links for instance.
WebDriver is now a W3C specification, which aims to standardize browser automation. WebDriver is a remote control interface that enables introspection and control of user agents. It provides a platform and a restful HTTP api as a way for web browsers to be remotely controlled.
Nightwatch works by communicating over a restful HTTP api with a WebDriver server (typically the Selenium server). The restful API protocol is defined by the W3C WebDriver API. See below for an example workflow for browser initialization.
Most of the times, Nightwatch needs to send at least 2 requests to the WebDriver server in order to perform a command or assertion, the first one being the request to locate an element given a CSS selector (or Xpath expression) and the next to perform the actual command/assertion on the given element.


menu
Home
Projects
Logout
Home
Projects
Logout
Phase: Travel
70% Complete
Actual
Scheduled
Remaining
ETC
100
800
700
Submit
Phase: Field Work
30% Complete
Actual
Scheduled
Remaining
ETC
50
400
350
Submit


Project name: {{activity.project.name}} Owner: {{activity.project.owner.fname}} Created on: {{activity.project.created| date:'medium'}}


help for reghdfe.ado
Title
reghdfe -- Linear and instrumental-variable/GMM regression absorbing any
number of fixed effects
Syntax
reghdfe depvar [indepvars] [(endogvars = iv_vars)] [if] [in] [weight]
, absorb(absvars) [vce(vcetype)] [more_options]
Variables and Weights:
- all varlists allow for time-series and factor variables
- fweights, aweights and pweights are allowed; see weight.
Absvars:
absvar Description
--------------------------------------------------------------------------
i.varname indicators for each level of varname (the i.
prefix is tacit and can be omitted).
var1#var2 indicators for each combination of levels of var1
and var2 (same as i.var1#i.var2).
var1#c.var2 indicators for each level of var1, multiplied by
var2
var1##c.var2 equivalent to "i.var1 i.var1#c.var2", but much
faster (the two sets of fixed effects are
absorbed jointly at each iteration)
--------------------------------------------------------------------------
Notes:
- Each absvar in the absvars list represents a fixed effect that you wish
to absorb (like individual, firm or time).
- To save the estimates of a particular fixed effect, write
newvar=absvar. Please be aware that in most cases these estimates are
neither consistent nor econometrically identified.
- It is good practice to put the absvars with more dimensions first.
- Interactions (e.g. x#z) are supported. Using categorical interactions
is faster than running egen group(...) beforehand.
- To partial-out fixed slopes (and not just fixed intercepts), use
continuous interactions (e.g. x#c.z).
- Each absvar can contain any number of categorical interactions (e.g.
i.var1#i.var2#i.var3) but at most one continuous interaction (thus,
i.var1#c.var2#c.var3 is not allowed).
- The first absvar cannot contain a continuous variable (i.var1#c.var2 is
not allowed, although i.var1##c.var2 is ok).
- When saving fixed effects and using ## interactions, remember that
newvar=varname1##c.varname2 will be expanded to "newvar=varname1
newvar_slope=varname1#c.varname2"
Summary of Options:
options Description
--------------------------------------------------------------------------
Model and Miscellanea [+]
* absorb(absvars) identifiers of the fixed effects that will be
absorbed
absorb(..., savefe) save fixed effects with autogenerated names;
useful when running predict afterwards
+ dropsingletons remove singleton groups from the sample; once per
absvar (recommended)
nested add each absvar recursively, reporting the R2 and
associated F-test at each stage (only under
linear regression and unadjusted standard
errors)
summarize(stats) equivalent to running estat summarize after the
regression, but more flexible, compatible with
the fast option, and saves the matrix of results
on e(summarize)
suboptions(...) additional options that will be passed to the
regression command (either regress, ivreg2, or
ivregress)
SE/Robust [+]
+ vce(vcetype, subopt) vcetype may be unadjusted/ols (default), robust,
or cluster clustervars
subopt allows bw(#), dkraay(#), kernel(str),
kiefer
IV/2SLS/GMM [+]
estimator(str) estimator used in the instrumental-variable
regression. The default is 2sls, valid options
are gmm2s (two-stage GMM estimator), liml and
cue (which gives approximate results, as
discussed in detail below)
stages(stage_list) runs and saves additional or alternative
regression stages. the four possible stages are:
ols first acid reduced.
ivsuite(subcmd) package used in the regressions; either ivreg2
(default; needs installing) or ivregress
first report first stage regression (but sadly not
first-stage summary results)
savefirst saves the first-stage regressions results;
requires first
showraw show the raw output of ivreg2 (if that's the
ivsuite used); useful to see first-stage summary
results
Diagnostic [+]
verbose(#) amount of debugging information to show (0=None,
1=Some, 2=More, 3=Parsing/convergence details,
4=Every iteration)
check if convergence was achieved, the fixed effects
should have a 1.0 coeficient in each step
Degrees-of-Freedom Adjustments [+]
dofadjustments(list) allows selecting the desired adjustments for
degrees of freedom; rarely used
group(newvarname) unique identifier for the first mobility group
Speeding Up Estimation [+]
fast avoids one save, one use, and one merge operation
cores(#) run the demeaning algorithm in # parallel
instances of Stata
savecache(filename) compute the demeaning for a list of variables and
save in the file; allows for multiple
regressions later
usecache(filename) run regression using results previously computed
and stored in filename. requires a previous
usecache call with the same absvars and sample
over(varname) run regression for different groups. used together
with savecache and usecache
"Average Effects" (AvgE) [+]
avge(varlist) Attempt to control for categorical variables using
the so-called AvgE correction (see Gormley &
Matsa 2013 for why this is wrong)
avgevar has the same syntax as absvars, except
that continuous interactions (c.) are not
allowed
excludeself excludes observation at hand when calculating the
group average
Maximization [+]
+ tolerance(#) criterion for convergence (default=1e-7)
maxiterations(#) maximum number of iterations to attempt for each
variable (default=10000). if set to 0, it will
run for as long as it takes.
Advanced Options, rarely used:
noaccelerate apply fixed point iteration without applying
Aitken's acceleration
accel_start(#) how many iterations to wait until the Aitken's
acceleration starts (default=6)
accel_freq(#) how often the acceleration occurs (default=3)
bad_loop_threshold(#) if the acceleration seems stuck # times in a row,
pause it (default=1)
stuck_threshold(#) defines when is the acceleration stuck (if the
relative improvement is less than #). Default is
5e-3
pause_length(#) how many acceleration steps to pause after the
iteration got stuck (default=20)
Reporting [+]
level(#) set confidence level; default is level(95)
display_options control column formats, row spacing, line width,
display of omitted variables and base and empty
cells, and factor-variable labeling
version reports the version number and date of reghdfe,
and saves it in e(version). standalone option
--------------------------------------------------------------------------
* absorb(varlist) is required.
+ indicates a recommended or important option.
Description
reghdfe fits a linear regression of depvar on indepvars while absorbing an
arbitrary number of fixed effects indicated by the categories of absvars.
It also supports regressing on endogvars, in which case it uses iv_vars
(along with indepvars and the fixed effects) as instruments for endogvars
(either with 2SLS or GMM/LIML).
No constant is reported as that is absorbed by the fixed effects. However,
if you wish to recover it, after the regression run predict dummies, d
followed by su dummies, di r(mean).
The estimates for the fixed effects (including those with continous
interactions) can be saved, although their standard errors are not
recovered. When using multiple highly-dimensional fixed-effects, the user
should be aware of the identification requirements regarding the fixed
effects. For instance, the fixed effects cannot form disjoint graphs or
else identification would only be possible within each subgraph (see
references).
There are several features generalized from either areg or xtreg, fe, such
as:
a) reporting F-tests on the absorbed variables (except with robust and
clustered vce)
b) correlations between the FEs and the other regressors(except with
robust and clustered vce)
c) degrees-of-freedom adjustements with clustered data when one absorbed
category is contained within the clusters (as in xtreg, fe robust)
Options
+-----------------------+
----+ Model and Miscellanea +---------------------------------------------
absorb(absvars) list of categorical variables (or interactions)
representing the fixed effects to be absorbed. this is equivalent to
including a dummy variable for each category of each absvar. absorb()
is required.
To save a fixed effect, prefix the absvar with "newvar=". For
instance, the option absorb(firm_id worker_id year_coefs=year_id) will
include firm, worker and year fixed effects, but will only save the
estimates for the year fixed effects (in the new variable year_coefs).
If you want to predict afterwards but don't care about setting the
names of each fixed effect, use the savefe suboption. This will
delete all variables named __hdfe*__ and create new ones as required.
Example: reghdfe price weight, absorb(turn trunk, savefe)
dropsingletons will drop the observations that contain values of the fixed
effects repeated only once. For instance, with individual fixed
effects, it will drop individuals that appear only once in the sample.
I strongly recommend you to use this option.
Benefits of this option include a faster estimation (due to less
observations and fixed effects) and less change of problems when
estimating the VCE matrix.
Note that after dropping singletons on the first fixed effect, a value
of the second fixed effect that previously appeared in two
observations may now appear in only one and thus will be dropped.
Also note that only one check will be done for each fixed effect.
nested Add each absvar recursively into the model
This option will reporting the R2 at each stage, and also compute the
Fisher test of significance for each set of absorbed variables.
Only available in OLS with vce(unadjusted).
summarize(stats) will report and save a table of summary of statistics of
the regression variables (including the instruments, if applicable),
using the same sample as the regression.
summarize (without parenthesis) saves the default set of statistics:
mean min max.
The complete list of accepted statistics is available in the tabstat
help. The most useful are count range sd median p##.
The summary table is saved in e(summarize)
To save the summary table silently (without showing it after the
regression table), use the quietly suboption. You can use it by itself
(summarize(,quietly)) or with custom statistics (summarize(mean,
quietly)).
suboptions(...) options that will be passed directly to the regression
command (either regress, ivreg2, or ivregress)
Some options are not allowed and will be silently ignored (nosmall,
hascons, tsscons)
+-----------+
----+ SE/Robust +---------------------------------------------------------
vce(vcetype, subopt) specifies the type of standard error reported. Note
that all the advanced estimators rely on asymptotic theory, and will
likely have poor performance with small samples (but again if you are
using reghdfe, that is probably not your case)
unadjusted/ols estimates conventional standard errors, valid even in
small samples under the assumptions of homoscedasticity and no
correlation between observations
robust estimates heteroscedasticity-consistent standard errors
(Huber/White/sandwich estimators), but still assuming independence
between observations
Warning: in a FE panel regression, using robust will lead to
inconsistent standard errors if for every fixed effect, the other
dimension is fixed. For instance, in an standard panel with
individual and time fixed effects, we require both the number of
individuals and time periods to grow asymptotically. If that is not
the case, an alternative may be to use clustered errors, which as
discussed below will still have their own asymptotic requirements.
For a discussion, see Stock and Watson, "Heteroskedasticity-robust
standard errors for fixed-effects panel-data regression," Econometrica
76 (2008): 155-174
cluster clustervars estimates consistent standard errors even when the
observations are correlated within groups.
Multi-way-clustering is allowed. Thus, you can indicate as many
clustervars as desired (e.g. allowing for intragroup correlation
across individuals, time, country, etc.).
Each clustervar permits interactions of the type var1#var2 (this is
faster than using egen group() for a one-off regression).
Warning: The number of clusters, for all of the cluster variables,
must go off to infinity. A frequent rule of thumb is that each
cluster variable must have at least 50 different categories (the
number of categories for each clustervar appears on the header of the
regression table).
The following suboptions require either the ivreg2 or the avar package
from SSC. For a careful explanation, see the ivreg help file, from which
the comments below borrow.
unadjusted, bw(#) (or just , bw(#)) estimates
autocorrelation-consistent standard errors (Newey-West).
robust, bw(#) estimates autocorrelation-and-heteroscedasticity
consistent standard errors (HAC).
cluster clustervars, bw(#) estimates standard errors consistent to
common autocorrelated disturbances (Driscoll-Kraay). At most two
cluster variables can be used in this case.
, kiefer estimates standard errors consistent under arbitrary
intra-group autocorrelation (but not heteroskedasticity) (Kiefer).
kernel(str) is allowed in all the cases that allow bw(#) The default
kernel is bar (Bartlett). Valid kernels are Bartlett (bar); Truncated
(tru); Parzen (par); Tukey-Hanning (thann); Tukey-Hamming (thamm);
Daniell (dan); Tent (ten); and Quadratic-Spectral (qua or qs).
Advanced suboptions:
, suite(default|mwc|avar) overrides the package chosen by reghdfe to
estimate the VCE. default uses the default Stata computation (allows
unadjusted, robust, and at most one cluster variable). mwc allows
multi-way-clustering (any number of cluster variables), but without
the bw and kernel suboptions. avar uses the avar package from SSC. Is
the same package used by ivreg2, and allows the bw, kernel, dkraay and
kiefer suboptions. This is useful almost exclusively for debugging.
, twicerobust will compute robust standard errors not only on the
first but on the second step of the gmm2s estimation. Requires
ivsuite(ivregress), but will not give the exact same results as
ivregress.
Explanation: When running instrumental-variable regressions with the
ivregress package, robust standard errors, and a gmm2s estimator,
vce(robust) is translated into wmatrix(robust) vce(unadjusted). This
maintains compatibility with ivreg2 and other packages, but may
unadvisable as described in ivregress (technical note). Specifying
this option will instead use wmatrix(robust) vce(robust).
However, computing the second-step vce matrix requires computing
updated estimates (including updated fixed effects). Since reghdfe
currently does not allow this, the resulting standard errors will not
be exactly the same as with ivregress. This issue is similar to
applying the CUE estimator, described further below.
Note: The above comments are also appliable to clustered standard
error.
Options bootstrap and jackknife could be implemented, although their
execution would be extremely slow.
+-------------+
----+ IV/2SLS/GMM +-------------------------------------------------------
estimator(2sls|gmm2s|liml|cue) estimator used in the instrumental-variable
estimation
2sls (two-stage least squares, default), gmm2s (two-stage efficient
GMM), liml (limited-information maximum likelihood), and cue
("continuously-updated" GMM) are allowed.
Warning: cue will not give the same results as ivreg2. See the
discussion in Baum, Christopher F., Mark E. Schaffer, and Steven
Stillman. "Enhanced routines for instrumental variables/GMM estimation
and testing." Stata Journal 7.4 (2007): 465-506 (page 484). Note that
even if this is not exactly cue, it may still be a desirable/useful
alternative to standard cue, as explained in the article.
stages(stage_list) adds and saves up to four auxiliary regressions useful
when running instrumental-variable regressions:
ols an equivalent ols regression (as a benchmark/comparison)
first all the first stage regressions
acid an "acid" regression that includes both the instruments,
exogenous regressors (i.e. included instruments), and endogenous
regressors, against the dependent variable. In this setup, the
instruments should not be significant.
reduced the reduced-form regression, between the instruments and
exogenous regressors, and the dependent variable (excludes the
endogenous regressor).
ivsuite(subcmd) allows the IV/2SLS regression to be run either using
ivregress or ivreg2.
ivreg2 is the default, but needs to be installed for that option to
work.
first will report first stage regression.
Note that first-stage summary results will not be reported due to the
way ivreg2 is called; to view them see the option showraw
savefirst will save first stage regressions. Requires the option first to
work.
showraw shows the entire output of ivreg2 (if that's the ivsuite used);
this is used to see the first-stage summary results.
The downside is that it will have temporary names in place of whenever
factors variables and time-series operators are used.
+------------+
----+ Diagnostic +--------------------------------------------------------
verbose(#) orders the command to print debugging information.
Possible values are 0 (none), 1 (some information), 2 (even more), 3
(adds dots for each iteration, and reportes parsing details), 4 (adds
details for every iteration step)
For debugging, the most useful value is 3. For simple status reports,
set verbose to 1.
check will regress the variable against the calculated fixed effects. If
convergence was indeed achieved, the coefficients should be 1.0 in
each step (except under perfect collinearity situations.)
+--------------------------------+
----+ Degrees-of-Freedom Adjustments +------------------------------------
dofadjustments(doflist) selects how the degrees-of-freedom, as well as
e(df_a), are adjusted due to the absorbed fixed effects.
Without any adjustment, we would assume that the degrees-of-freedom
used by the fixed effects is equal to the count of all the fixed
effects (e.g. number of individuals + number of years in a typical
panel). However, in complex setups (e.g. fixed effects by individual,
firm, job position, and year), there may be a huge number of fixed
effects collinear with each other, so we want to adjust for that.
Note: changing the default option is rarely needed, except in
benchmarks, and to obtain a marginal speed-up by excluding the
pairwise option.
all is the default and almost always the best alternative. It is
equivalent to dof(pairwise clusters continuous)
none assumes no collinearity across the fixed effects (i.e. no
redundant fixed effects). This is overtly conservative, although it is
the faster method by virtue of not doing anything.
firstpair will exactly identify the number of collinear fixed effects
across the first two sets of fixed effects (i.e. the first absvar and
the second absvar). The algorithm used for this is described in Abowd
et al (1999), and relies on results from graph theory (finding the
number of connected sub-graphs in a bipartite graph). It will not do
anything for the third and subsequent sets of fixed effects.
For more than two sets of fixed effects, there are no known results
that provide exact degrees-of-freedom as in the case above. One
solution is to ignore subsequent fixed effects (and thus oversestimate
e(df_a) and understimate the degrees-of-freedom). Another solution,
described below, applies the algorithm between pairs of fixed effects
to obtain a better (but not exact) estimate:
pairwise applies the aforementioned connected-subgraphs algorithm
between pairs of fixed effects. For instance, if there are four sets
of FEs, the first dimension will usually have no redundant
coefficients (i.e. e(M1)==1), since we are running the model without a
constant. For the second FE, the number of connected subgraphs with
respect to the first FE will provide an exact estimate of the
degrees-of-freedom lost, e(M2).
For the third FE, we do not know exactly. However, we can compute the
number of connected subgraphs between the first and third G(1,3), and
second and third G(2,3) fixed effects, and choose the higher of those
as the closest estimate for e(M3). For the fourth FE, we compute
G(1,4), G(2,4) and G(3,4) and again choose the highest for e(M4).
Finally, we compute e(df_a) = e(K1) - e(M1) + e(K2) - e(M2) + e(K3) -
e(M3) + e(K4) - e(M4); where e(K#) is the number of levels or
dimensions for the #-th fixed effect (e.g. number of individuals or
years). Note that e(M3) and e(M4) are only conservative estimates and
thus we will usually be overestimating the standard errors. However,
given the sizes of the datasets typically used with reghdfe, the
difference should be small.
Since the gain from pairwise is usually minuscule for large datasets,
and the computation is expensive, it may be a good practice to exclude
this option for speedups.
clusters will check if a fixed effect is nested within a clustervar.
In that case, it will set e(K#)==e(M#) and no degrees-of-freedom will
be lost due to this fixed effect. The rationale is that we are
already assuming that the number of effective observations is the
number of cluster levels. This is the same adjustment that xtreg, fe
does, but areg does not use it.
continuous Fixed effects with continuous interactions (i.e. individual
slopes, instead of individual intercepts) are dealt with differently.
In an i.categorical#c.continuous interaction, we will do one check: we
count the number of categories where c.continuous is always zero. In
an i.categorical##c.continuous interaction, we do the above check but
replace zero for any particular constant. In the case where
continuous is constant for a level of categorical, we know it is
collinear with the intercept, so we adjust for it.
Additional methods, such as bootstrap are also possible but not yet
implemented. Some preliminary simulations done by the author showed a
very poor convergence of this method.
group(newvarname) name of the new variable that will contain the first
mobility group. Requires pairwise, firstpair, or the default all.
+------------------------+
----+ Speeding Up Estimation +--------------------------------------------
Parallel Computing
fast avoids one save, one use, and one merge operation. It usually makes
the regression 30% faster, but comes at a cost: you cannot save the
FEs with predict, you cannot predict the residuals, e(sample) is not
saved, and the correlation between the FEs and xb are not reported.
Also, savecache, usecache, nested, check, group options are not
compatible with fast.
If you wish to use fast while reporting estat summarize, see the
summarize option.
cores(#) will run the demeaning algorithm in # parallel instances.
currently, cores() only runs on Windows, although the code is already
generalized for Linux and OSX. Volunteers for bugfixing or testing are
welcome!
Several Stata processes will be created, and the task of demeaning all
the required variables will be distributed amongst them. This option
requires the package parallel by George Vega Yon (run ssc install
parallel to download it)
Disclaimer: there may still be some rough corners (e.g. sometimes not
deleting temporary files)
Example:
. sysuse auto
. reghdfe price weight length, a(turn rep) cores(2)
Precomputing transformations (useful when testing alternative
specifications)
reghdfe varlist [if] [in], absorb(absvars) savecache(filename) [options]
This will demean varlist with respect to absvars, and save the
transformed variables in filename. Note that if any variable has a
missing value, the entire row is dropped.
Options allowed are all optimization options except fast, and all
diagnostic options including cores(#)
This will create a variable __uid__ in the master data.
usecache(filename) can be added to a normal command and will load the
transformed variables from filename instead of computing them again.
In order for this to work, i) the filename needs to exist and all the
variables need to have been precomputed using that filename, ii) the
variable __uid__ must exist, iii) the precomputed transformation must
have been made using the same absvars and the same observations (if it
was precomputed with more observations, an error will occur; with less
observations, that subset of the dataset will be used for the
regression).
Example:
. sysuse auto
. tempfile cache
. reghdfe price weight length, a(turn rep) savecache("`cache'")
. reghdfe price weight, a(turn rep) usecache("`cache'")
. reghdfe price length, a(turn rep) usecache("`cache'")
Running the same regression over different categories of a variable
(equivalent to by:)
over(varname) allows regressions over the different levels of varname,
with the advantage that the data needs to be demeaned only once.
To use this, first add this option together with savecache. This will
change the absvars from e.g. "i.var1 i.var2##c.var3" to "i.over
i.over#i.var1 i.over#i.var2##c.var3", basically adding one fixed
effect and adding the over variable to every interaction. Transforming
the entire dataset with this specification is equivalent to
transforming it separately by levels of over.
This call will return e(over_levels), after which the regressions can
be called as long as both usecache and over are specified. The user
should be very careful not to change the dataset between calls, as the
program will detect only some inconsistencies between the savecache
call and the usecache call.
Example:
. sysuse auto
. tempfile cache
. reghdfe price weight length, a(turn rep) savecache("`cache'")
over(foreign)
. local levels `e(levels_over)'
. foreach level of local levels {
. reghdfe price weight length if foreign==`level', a(turn rep)
usecache("`cache'") over(foreign)
. }
This is equivalent to running
. reghdfe price weight length if foreign==0, a(turn rep)
. reghdfe price weight length if foreign==1, a(turn rep)
+--------------------------+
----+ "Average Effects" (AvgE) +------------------------------------------
avge(avgevars) will attempt to control for categorical variables using the
so-called AvgE correction
The advantage of this approach, vis-a-vis using absorb() is its speed
and higher reported degrees-of-freedom. It's disadvantage lies in it
being inconsistent, as reported by Gormley & Matsa (2013).
avgevar has the same syntax as absvars, except that continuous
interactions (c.) are not allowed
excludeself excludes observation at hand when calculating the group
average
+--------------+
----+ Maximization +------------------------------------------------------
tolerance(#) specifies the tolerance criterion for convergence; default is
tolerance(1e-7)
Note that for tolerances beyond 1e-14, the limits of the double
precision are reached and the results will most likely not converge.
At the other end, is not tight enough, the regression may not identify
perfectly collinear regressors. However, those cases can be easily
spotted due to their extremely high standard errors.
maxiterations(#) specifies the maximum number of iterations; the default
is maxiterations(10000); 0 means run forever until convergence.
Advanced options:
fast avoids one save, one use, and one merge operation. Useful if the
dataset is very large, but will not save e(sample) or compute
correlations between the fixed effects and Xb.
Will not work under check, or if any variable (fixed effect, mobility
group) needs to be saved.
noaccelerate apply fixed point iteration without applying Aitken's
acceleration.
This will be much slower but may avoid situations where the
acceleration gets stuck.
accel_start(#) indicates how many iterations to wait until the Aitken's
acceleration starts. Default is 6.
accel_freq(#) indicates how often the acceleration occurs. The default is
3, meaning that after two steps without acceleration, the third one
accelerates. Other common value is 6.
bad_loop_threshold(#) If the acceleration seems stuck # times in a row,
pause it. Default is 1.
stuck_threshold(#) Defines when is the acceleration stuck (if the relative
improvement is less than #). Default is 5e-3
pause_length(#) indicates how many acceleration steps to pause after the
iteration got stuck. Default is 20
Note that this is in terms of acceleration steps, not iterations (so
if accel_freq=3 and pause_length=20, 60 iterations will pass until the
acceleration resumes)
+-----------+
----+ Reporting +---------------------------------------------------------
level(#) sets confidence level; default is level(95)
display_options: noomitted, vsquish, noemptycells, baselevels,
allbaselevels, nofvlabel, fvwrap(#), fvwrapon(style), cformat(%fmt),
pformat(%fmt), sformat(%fmt), and nolstretch; see [R] estimation
options.
Postestimation Syntax
Only estat summarize, predict and test are currently supported and tested.
estat summarize
Summarizes depvar and the variables described in _b (i.e.
> not the excluded instruments)
predict newvar [if] [in] [, statistic]
Requires all set of fixed effects to be previously saved b
> y reghdfe (except for option xb)
Equation: y = xb + d_absorbvars + e
statistic Description
--------------------------------------------------------------------------
Main
xb xb fitted values; the default
xbd xb + d_absorbvars
d d_absorbvars
residuals residual
score score; equivalent to residuals
--------------------------------------------------------------------------
test
Performs significance test on the parameters, see the stat
> a help
suest
If you want to perform tests that are usually run with suest, such as
non-nested models, tests using alternative specifications of the
variables, or tests on different groups, you can replicate it manually, as
described here.
Note: do not use suest. It will run, but the results will be incorrect.
Implementation Details
- This program usually runs at least 10 times faster than related programs
(areg, xtreg, fe, twfe, a2reg, reg2hdfe, etc.).
- The relative gain increases with the number of observations and the
number of absorbed fixed effects, so for a small dataset the gain could
even be negative due to the initial setup of the program).
- The reason is that it takes the best of these programs (such as the
fixed point iteration from reg2hdfe) while improving on their
bottlenecks.
- In particular, the biggest gain comes from computing averages by group
without sorting the dataset by each group. Since sorting is an o(n log
n) operation, and averages by group is o(n), the gains get larger with
the dataset size.
- It also allows for efficient estimation of interactions between
continuous variables and HDFEs
- Finally, also allows for running IV/GMM regressions
- For more details see the PDF notes.
Possible Pitfalls and Common Mistakes
1. (note: as of version 2.1, the constant is no longer reported) Ignore
the constant; it doesn't tell you much. If you want to use descriptive
stats, that's what the summarize() and estat summ commands are for.
Even better, use noconstant to drop it (although it's not really
dropped as it never existed on the first place!)
2. Think twice before saving the fixed effects. They are probably
inconsistent / not identified and you will likely be using them wrong.
3. It's good practice to drop singletons. dropsingleton is your friend.
4. If you use vce(robust), be sure that your other dimension is not
"fixed" but grows with N, or your SEs will be wrong.
5. If you use vce(cluster ...), check that your number of clusters is
high enough (50+ is a rule of thumb). If not, you are making the SEs
even worse!
6. The panel variables (absvars) should probably be nested within the
clusters (clustervars) due to the within-panel correlation induced by
the FEs. (this is not the case for *all* the absvars, only those that
are treated as growing as N grows)
7. If you run analytic or probability weights, you are responsible for
ensuring that the weights stay constant within each unit of a fixed
effect (e.g. individual), or that it is correct to allow
varying-weights for that case.
8. Be aware that adding several HDFEs is not a panacea. The first
limitation is that it only uses within variation (more than acceptable
if you have a large enough dataset). The second and subtler
limitation occurs if the fixed effects are themselves outcomes of the
variable of interest (as crazy as it sounds). For instance, imagine a
regression where we study the effect of past corporate fraud on future
firm performance. We add firm, CEO and time fixed-effects (standard
practice). This introduces a serious flaw: whenever a fraud event is
discovered, i) future firm performance will suffer, and ii) a CEO
turnover will likely occur. Moreover, after fraud events, the new
CEOs are usually specialized in dealing with the aftershocks of such
events (and are usually accountants or lawyers). The fixed effects of
these CEOs will also tend to be quite low, as they tend to manage
firms with very risky outcomes. Therefore, the regressor (fraud)
affects the fixed effect (identity of the incoming CEO). Adding
particularly low CEO fixed effects will then overstate the performance
of the firm, and thus understate the negative effects of fraud on
future firm performance.
Missing Features
(If you are interested in discussing these or others, feel free to contact
me)
- Add a more thorough discussion on the possible identification issues
- Find out a way to use reghdfe iteratively with CUE (right now only
OLS/2SLS/2SGMM/LIML give the exact same results)
- Implement a -bootstrap- option in DoF estimation
- The interaction with cont vars (i.a#c.b) may suffer from numerical
accuracy issues, as we are dividing by a sum of squares
- Calculate exact DoF adjustment for 3+ HDFEs (note: not a problem with
cluster VCE when one FE is nested within the cluster)
- More postestimation commands (lincom? margins?)
- Not sure if I should add an F-test for the absvars in the vce(robust)
and vce(cluster) cases. Discussion on e.g. -areg- (methods and
formulas) and textbooks suggests not; on the other hand, there may be
alternatives: A Heteroskedasticity-Robust F-Test Statistic for
Individual Effects
Examples
--------------------------------------------------------------------------------
Setup
. sysuse auto
Simple case - one fixed effect
. reghdfe price weight length, absorb(rep78)
--------------------------------------------------------------------------------
As above, but also compute clustered standard errors
. reghdfe price weight length, absorb(rep78) vce(cluster rep78)
--------------------------------------------------------------------------------
Two and three sets of fixed effects
. webuse nlswork
. reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode
year)
. reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode
year occ)
--------------------------------------------------------------------------------
Advanced examples
Save the FEs as variables
. reghdfe ln_w grade age ttl_exp tenure not_smsa south ,
absorb(FE1=idcode FE2=year)
Report nested F-tests
. reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode
year) nested
Do AvgE instead of absorb() for one FE
. reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode
year) avge(occ)
. reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode
year) avge(AvgByOCC=occ)
Check that FE coefs are close to 1.0
. reghdfe ln_w grade age ttl_exp tenure not_smsa , absorb(idcode year)
check
Save first mobility group
. reghdfe ln_w grade age ttl_exp tenure not_smsa , absorb(idcode occ)
group(mobility_occ)
Factor interactions in the independent variables
. reghdfe ln_w i.grade#i.age ttl_exp tenure not_smsa , absorb(idcode
occ)
Interactions in the absorbed variables (notice that only the # symbol is
allowed)
. reghdfe ln_w grade age ttl_exp tenure not_smsa , absorb(idcode#occ)
Interactions in both the absorbed and AvgE variables (again, only the #
symbol is allowed)
. reghdfe ln_w grade age ttl_exp not_smsa , absorb(idcode#occ)
avge(tenure#occ)
IV regression
. sysuse auto
. reghdfe price weight (length=head), absorb(rep78)
. reghdfe price weight (length=head), absorb(rep78) first
. reghdfe price weight (length=head), absorb(rep78) ivsuite(ivregress)
Factorial interactions
. reghdfe price weight (length=head), absorb(rep78)
. reghdfe price weight length, absorb(rep78 turn##c.price)
Stored results
reghdfe stores the following in e():
Scalars
e(N) number of observations
e(N_hdfe) number of absorbed fixed-effects
e(N_avge) number of average effects
e(tss) total sum of squares
e(df_m) model degrees of freedom
e(rss) residual sum of squares
e(df_r) residual degrees of freedom
e(r2) R-squared
e(r2_a) adjusted R-squared
e(r2_within) Within R-squared
e(r2_a_within) Adjusted Within R-squared
e(df_a) degrees of freedom lost due to the fixed effects
e(rmse) root mean squared error
e(ll) log-likelihood
e(ll_0) log-likelihood of fixed-effect-only regression
e(N_clust) number of clusters
e(F) F statistic
e(F_absorb) F statistic for absorbed effect (when
vce(robust) is not specified)
e(rank) rank of e(V)
e(K#) Number of categories of the #th absorbed FE
e(M#) Number of redundant categories of the #th
absorbed FE
e(mobility) Sum of all e(M#)
e(corr#) Correlation between #th absorbed FE and xb
Macros
e(cmd) reghdfe
e(subcmd) either regress, ivreg2 or ivregress
e(model) Either ols or iv
e(cmdline) command as typed
e(dofmethod) dofmethod employed in the regression
e(depvar) name of dependent variable
e(indepvars) names of independent variables
e(endogvars) names of endogenous right-hand-side variables
e(instruments) names of excluded instruments
e(avgevars) name of the variables "controled" with the AvgE
correction
e(absvars) name of the absorbed variables or interactions
e(title) title in estimation output
e(clustvar) name of cluster variable
e(vce) vcetype specified in vce()
e(vcetype) title used to label Std. Err.
e(properties) b V
Matrices
e(b) coefficient vector
e(V) variance-covariance matrix of the estimators
Functions
e(sample) marks estimation sample
Author
Sergio Correia
Fuqua School of Business, Duke University
Email<EMAIL_ADDRESS>Latest Updates
reghdfe is updated frequently, and upgrades or minor bug fixes may not be
immediately available in SSC. To check or contribute to the latest
version of reghdfe, explore the Github repository.
To see your current version and installed dependencies, type reghdfe,
version
Acknowledgements
This package wouldn't have existed without the invaluable feedback and
contributions of Paulo Guimaraes and Amine Quazad. I am also indebted to
the guidance of Mark Schaffer, Kit Baum, and Nikolas Mittag; and to the
great bug-spotting abilities of many users.
In addition, reghdfe is build upon important contributions from the Stata
community:
reg2hdfe, from Paulo Guimaraes, and a2reg from Amine Quazad, were the
inspiration and building blocks on which reghdfe was built.
ivreg2, by Christopher F Baum, Mark E Schaffer and Steven Stillman, is the
package used by default for instrumental-variable regression.
avar by Christopher F Baum and Mark E Schaffer, is the package used for
estimating the HAC-robust standard errors of ols regressions.
tuples by Joseph Lunchman and Nicholas Cox, is used when computing
standard errors with multi-way clustering (two or more clustering
variables).
parallel by George Vega Yon is used when running reghdfe with multiple
processors.
References
This program implements an extension on the fixed-point iteration proposed by:
Paulo Guimaraes and Pedro Portugal. "A Simple Feasible Alternative
Procedure to Estimate Models with High-Dimensional Fixed Effects".
Stata Journal, 10(4), 628-649, 2010. [link]
A technical appendix of the algorithm employed is available in the PDF file belo
> w:
Sergio Correia. "Least Squares Iteration with Several High-Dimensional
Fixed Effects". Mimeo, 2014 [link]
Note that the algorithm is not the same as the one used in:
Torres, Sonia & Portugal, Pedro & Addison, John T. & Guimaraes, Paulo,
2013. "The Sources of Wage Variation: A Three-Way High-Dimensional
Fixed Effects Regression Model". IZA Discussion Papers 7276,
Institute for the Study of Labor (IZA).
If you use this program in your research, please cite either the REPEC entry or
the first article on this list.
For details on the acceleration technique employed, please see "method 3" as des
> cribed by:
Macleod, Allan J. "Acceleration of vector sequences by multi-dimensional
Delta-2 methods." Communications in Applied Numerical Methods 2.4
(1986): 385-392.
For the rationale behind interacting fixed effects with continuous variables, se
> e:
Duflo, Esther. "The medium run effects of educational expansion: Evidence
from a large school construction program in Indonesia." Journal of
Development Economics 74.1 (2004): 163-197. [link]
Also see:
Abowd, J. M., R. H. Creecy, and F. Kramarz 2002. Computing person and
firm effects using linked longitudinal employer-employee data. Census
Bureau Technical Paper TP-2002-06.
Cameron, A. Colin & Gelbach, Jonah B. & Miller, Douglas L., 2011. "Robust
Inference With Multiway Clustering," Journal of Business & Economic
Statistics, American Statistical Association, vol. 29(2), pages
238-249.
Gormley, T. & Matsa, D. 2014. "Common errors: How to (and not to) control
for unobserved heterogeneity." The Review of Financial Studies, vol.
27(2), pages 617-661.
Mittag, N. 2012. "New methods to estimate models with large sets of fixed
effects with an application to matched employer-employee data from
Germany." FDZ-Methodenreport 02/2012.


Job Experience
Made In Space
Executive Assistant
July 2014 - Feb 2015
- Worked exclusively for Mike Chen, Co-Founder of Made In Space, as his executive assistant
- Handled all email on Mike Chen’s behalf with high profile companies and internal/external contacts
- Managed projects which included marketing, scheduling, and organization
Magic
Operations Manager
Feb 2015 - July 2015
My role at Magic was floor manager and then sales manager. I was recruited by former employer and co-founder, Mike Chen and was at Magic since the beginning. My team would handle all the high profile requests and clients such as Ashton Kutcher, Justin Kan, and Patrick Collison. I helped manage operations such as identifying and defining new roles, training new hires, and creating more efficient task management strategies. I became proficient in internet research and problem solving on the fly while also finding and executing solutions to complex tasks on a daily basis.
Kalisher
Creative Traffic Manager
Sept 2015 - Feb 2016
- Analyzed art requests for accuracy and direction, assigned daily art requests to a team of 6 artists and 2 curators, created and managed their daily schedule that had to adhere to strict deadlines that were constantly changing
- Acted as mediator between the creative department and accounting team with artwork complications, setbacks, and rush requests
- Worked directly with the creative director to optimize workflow and provide solutions to traffic issues
Empey Realty
Director of Operations and Marketing
May 2016 - Feb 2017
- Managed luxury vacation rentals
- Created and implemented social media marketing campaigns
- Designed,organized, and automated a client follow-up plan
- Maintained the Wordpress website and built landing pages via Thrive Themes