I know that for an lm model is enough to run plot(model_lm) to get diagnostic plots. I am dealing with high-dimensional count data, so I am using Poisson, Quasipoisson, Negative Binomial and Zero Inflated . Is there a way to compare different glm outputs to see which one fit the data better? Moreover, how can I plot diagnostic plots?  My question is a bit different from:  since my X is made of five numeric variables.
What diagnostic plots (and perhaps formal tests) do you find most informative for regressions where the outcome is a count variable?  I'm especially interested in Poisson and negative binomial models, as well as zero-inflated and hurdle counterparts of each. Most of the sources I've found simply plot the residuals vs. fitted values without discussion of what these plots "should" look like.  Wisdom and references greatly appreciated. The back story on why I'm asking this, if it's relevant, is .  Related discussions:
Is there a Stack Exchange site for both technical and behavioural interview questions? Where I could ask questions about, for example:   Sample questions and solutions, experiences, or seeking advice for interviews A place where I could ask interview questions and what the best way to answer it (not just a correct way or the most efficient).   What to do in a certain situation such as negotiation, unfair interviews, etc.   Experiences interviewing at so-and-so company. In  Deathly Hallows, when Harry, Ron, and Hermione are at No. 12, Grimmauld Place, Harry summons Kreacher from the kitchens at Hogwarts where the elf has been working on Harry’s orders given a year previously.  When the trio’s heist in the Ministry of Magic ends with Hermione inadvertently bringing Yaxley inside the perimeter of the Fidelius charm that protects Grimmauld Place, the trio leg it and dare not return there for fear that it’s now crawling with Death Eaters.  Before they leave for the Ministry in the morning, Kreacher is talking about making a stew or pot roast or something for dinner. After the trio go on the run and camp out in the tent, Harry thinks of poor Kreacher preparing a dinner they’ll never return to eat, but they dare not summon him lest a Death Eater tag along (like how Dobby ‘tagged along’ with Kreacher when Harry called him to have him follow Draco in Half-Blood Prince).  The next time we see Kreacher is during the Battle of Hogwarts where he leads the house-elves from the kitchen with battle-cries of “For Master! For Harry Potter!” (or something like that), so he’s clearly lost none of his new-found loyalty to Harry.  Harry is still Kreacher’s master throughout the book, and since he does not communicate at all with Kreacher after their escape from the doorstep, he cannot have ordered Kreacher to return to Hogwarts to work there again.  We know that house-elves can go against their masters’ wishes, but this usually entails them punishing themselves rather brutally, and Kreacher does not seem to have been constantly injuring himself for the better part of a year at Hogwarts.  So when and how does Kreacher leave his master’s house without orders and return to Hogwarts? First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)? Why won't this Path.Combine work? Convert string to Title Case with JavaScript Importing coordinate data from Excel into QGIS I have an Excel file containing data collected over many years as latitude and longitude coordinates for archaeological sites. How can I import it into QGIS as a new layer? Galois Group of $\sqrt{2+\sqrt{2}}$ over $\mathbb{Q}$ How do you compare two version Strings in Java? I am planning an hour and a half ride with my 1 month old baby girl. I heard that being in the car seat for a long time is not good for newborns.  Is an hour and a half too long? Should we do a stop in the middle of the trip? Understanding Clip Warning 000117 for Polygons? This error makes little sense because 95% of the time this works without any problem, but here is the situation:  I am clipping polygon A by polygons B-H.  While most of the time this works perfectly, occasionally this happens:   All layers are from the same coordinate system, and the processing extent is the same as polygon A when I setup the clip. Polygons C-H clip just fine without any errors, so it is usually polygon B that has the issue; however, most of the time there are no issues whatsoever. The polygons do overlap each other. I have repaired the geometry, but the results are the same.  Given that it isn't a coordinate problem, a processing extent problem, or even a geometry problem, what else could it be causing this error, and what would I have to do to resolve this problem?  UPDATE:  The error happened again with my largest set of Polygon A; however, I then deleted 75% of the Polygon A set and it worked just fine. So my question now is: how limited is the Clip feature when it comes to large areas, and is there a way around this without having to divide the Polygon A shapefile into several segments? I have a project where I have a few layers (State of Texas, cities, roads, etc.). They are all resaved and projected to NAD83 / UTM zone 14N EPSG: 26914. The project CRS is also NAD83 / UTM zone 14N EPSG: 26914 and on the fly projection is enabled. I added a text delimited file and cannot get them to line up. I checked the attribute table of the delimited file and the coordinates are correct. I cross-checked this with a point close to where a few of the points from the delimited file are and they are very close so in theory they should be lining up. I tried to save the delimited file and save it with the same projection and add the shp file back in and that did not work. Anyone have any ideas? I can't think of anything else to try. Determining a matrix from its characteristic polynomial Let $A\in\mathcal{M}_{n}(K)$, where $K$ is a field. Then, we can obtain the characteristic polynomial of $A$ by simply taking $p(\lambda)=\det(A-\lambda I_n)$, which give us something like $$p(\lambda) = (-1)^n\lambda^n + (-1)^{n-1}(\text{tr } A)\lambda^{n-1} +  \cdots + \det A$$ Now, how can we obtain the matrix $A$ knowing the characteristic polynomial? Can I access private members from outside the class without using friends? Disclaimer Yes, I am fully aware that what I am asking about is totally stupid and that anyone who would wish to try such a thing in production code should be fired and/or shot.  I'm mainly looking to see if can be done. Now that that's out of the way, is there any way to access private class members in C++ from outside the class?  For example, is there any way to do this with pointer offsets? (Naive and otherwise non-production-ready techniques welcome) Update As noted in the comments, I asked this question because I wanted to write a blog post on over-encapsulation (and how it affects TDD).  I wanted to see if there was a way to say &quot;using private variables isn't a 100% reliable way to enforce encapsulation, even in C++.&quot;  At the end, I decided to focus more on how to solve the problem rather than why it's a problem, so I didn't feature some of the stuff brought up here as prominently as I had planned, but I still left a link. At any rate, if anyone's interested in how it came out, here it is:   (I suggest reading it before you decide that I'm crazy). Photoshop resize circularly Is there a way to do this circular resize of a pattern in photoshop (flat image) ? (I only want to resize the green disk, without changing the size of the interior white disk and without losing details of the green disk, just flatting them) What factors determine enemy levels or: How do enemy levels scale to the player character's? When I finished Normal Mode at around Level 30 and went back to the  (still at Normal mode), I found that all enemies there are now very easy to kill, meaning they didn't level up (or hit a level cap).  When I went to  as a Level 36 character in True Vault Hunter Mode, I noticed that the enemies are the same level as me.  What factors determine enemy levels?   Specifically, I would like to know:       Are enemies affected by what level a character accepted a mission?      Or is it what level a character is when they first entered an area?      How does Normal Mode, True Vault Hunter mode, and the Ultimate True Vault Hunter Mode affect enemy levels?     Are there enemies that will scale to the player level, as the player levels up? Any enemy leveling differences specific to the DLC areas?         EDIT:   There is now  that explains how this works generally: "In playthrough 1, outside of the DLC, there's no such thing as scaling. Enemy levels are determined solely by the area they're in and your mission." Can anyone expound on that, and comment or provide an answer on what are the specific enemy levels on specific areas and/or missions?    states that "enemies do not actually "scale", or at least from what we know of..." and lists specifics for enemy levels on certain areas in the game (sans DLC areas). Can anyone expound on that and/or add specifics for enemy levels in the DLC missions or areas in TVHM (PT 2.0) and/or UTVHM? The  update has just been released, can anyone provide info about enemy levels on that mode, including the DLC areas or missions? The Barbarian's Rage ability gives advantage on Strength checks and saving throws.  Does this mean that the Barbarian gets advantage to attack rolls as well? Is an attack a check, or since saving throws are mentioned, that means it does not apply to attacks? Read Committed Snapshot Isolation vs Read Committed - pros and cons? If a spell is cast on a moveable creature/object and lasts longer than a round, and the creature/object moves, does the spell move with it? Identify GoogleTv from Android app Good and easy way to share files on local machine I would like to have a directory that has following properties:    Many users can copy files into it  These files can be deleted/changed by these users (user A can delete/modify file that was copied into this directory)    it cant be done using normal file permissions (because permissions are retained on copy).  Here is what I found on the net:        Some use cases:    Sharing music on local machine  Simple git repository sharing (just make a bare repository writeable to many people) --- i know that there are solutions like gitosis Allow many developers to modify test instance of php app without giving them root (i guess they would copy files) --- I'm leading a team of nonprofit junior developers and I need to keep that one simple!    EDIT  AFAIK setting SGID bit is not enugh, it only affects newly created files --- and basic workflow for these use cases ivnolves copying and other operations (which cleave file's gid unchanged)