I am trying to understand how to test for the goodness of fit in GLM regression. I am using an example from the book Davison and Hinkley (1997). In R, they fit the following model:  data(cane) # this dataset is available by default cane.glm &lt;- glm(y ~ block+var,family=binomial,data=cane) summary(cane.glm)   Then they write that "for an adequate fit, the deviance would roughly be distributed according to a $\chi^2_{132}$ (where $132$ is the residual degrees of freedom of the regression); in fact, it is 1142.8; This indicates overdispersion relative to the model." They, however, miss to provide more details on how to proceed.  I think I need to compute the deviance deviance(cane.glm) and use pachisq function to test whether the observed value is far away from the theoretical distribution. I don't understand, however, the exact testing procedure. Any example in R would be much appreciated.  In addition,  suggest that this type of "goodness of fit" test "does not actually work very well." Why not? What else should I use?
I was reading . They are performing a logistic regression (with R). At some point they calculate the probability of getting a residual deviance higher than the one they got on a $\chi^2$ distribution with degrees of freedom equal to the degrees of freedom of the model. Copying-pasting from their website...   &gt; glm( cbind(using,notUsing) ~ age + hiEduc + noMore, family=binomial)  Call:  glm(formula = cbind(using, notUsing) ~ age + hiEduc + noMore,            family = binomial)   Coefficients: (Intercept)     age25-29     age30-39     age40-49       hiEduc       noMore       -1.9662       0.3894       0.9086       1.1892       0.3250       0.8330    Degrees of Freedom: 15 Total (i.e. Null);  10 Residual Null Deviance:      165.8  Residual Deviance: 29.92        AIC: 113.4        The residual deviance of 29.92 on 10 d.f. is highly significant:  &gt; 1-pchisq(29.92,10) [1] 0.0008828339       so we need a better model     Why does it make sense to compute 1-pchisq(29.92,10) and why does a low probability indicate that something is going wrong with their model?
How do I check if an element is really visible with JavaScript? In JavaScript, how would you check if an element is actually visible?  I don't just mean checking the visibility and display attributes. I mean, checking that the element is not   visibility: hidden or display: none underneath another element scrolled off the edge of the screen   For technical reasons I can't include any scripts. I can however use  as it is on the page already. Degree of the extension $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$ Following my  the book then asks      Use this to determine when the field extension  $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$  is biquadratic (where $a,b\in\mathbb{Q}$)   "this" means what proved in the linked post.  My thoughts: First, I don't know what to say when $a^2-b$ is not a square. When $a^2-b$ is a square I think that the extension is of degree $2$ if $a=b$, this leaves the case $a\neq b$ which I am also having problems with and I don't know what to do (I have some cases like if $m,n$ are different primes then the degree of the extension is $4$, but I don't have something that is general)  Can someone please help my do this exercice  ? Why the sudden fascination with tensors? I've noticed lately that a lot of people are developing tensor equivalents of many methods (tensor factorization, tensor kernels, tensors for topic modeling, etc) I'm wondering, why is the world suddenly fascinated with tensors? Are there recent papers/ standard results that are particularly surprising, that brought about this? Is it computationally a lot cheaper than previously suspected?  I'm not being glib, I sincerely am interested, and if there are any pointers to papers about this, I'd love to read them. How to install Blender from the official website I installed Blender from official Ubuntu repository but its version is always behind the version available from the official Blender website.  I'm aware that I can launch the program within the downloaded folder, but i want to replace the install version with a new version downloaded from the website?   It must be present in the unity launcher.  I'm also aware of the available PPA's that are available, however I just want to install Blender manually.  Thanks in advance Calling Python in PHP I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac.  I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP to call the Python script.  Any better ideas? Thanks in advance! I am looking for an animated series, shown in the 90s. I remember an episode where the boy went into VR and fought a medusa-like monster.  It may be that this was the premise for the whole series: That the children heroes go into VR every time to fight the evil guys.   I am not sure if the whole series were computer-animated but surely there were such elements together with classic animation.  The style of the series was quite dark and cool for teenage boys. Last not empty cell (column) in the given row; Excel VBA Get names of all keys in the collection Why does my wildcard SSL certificate cause a domain mismatch error on a second level subdomain? Making adult decisions "is" or "are" really not fun: Which is correct? Making adult decisions are/is really not fun.     What is the proper answer and why? My gut says "is" but I can't explain why. Nothing can ruin your day like a poorly-written bug report.  I've seen several sets of guidelines for bug reporting in different organizations. In your opinion, what guidelines/steps are most essential for good bug reporting?  Feel free to share complete guideline recommendations from prior/current projects/organizations. how to avoid ssh asking permission? We are attempting to speed up the installation of oracle nodes for RAC installation. this requires that we get ssh installed and configured so that it doesn't prompt for a password.  The problem is: On first usage, we are prompted for  RSA key fingerprint is 96:a9:23:5c:cc:d1:0a:d4:70:22:93:e9:9e:1e:74:2f. Are you sure you want to continue connecting (yes/no)? yes   Is there a way to avoid that or are we doomed to connect at least once on every server from every server manually? Is there a way to offset an edge? (extrude edge loop perpendicular to each edge) I recently figured out how to do it with faces, but with edges, I can't seem to get it to work. I have a complex flat plane and i need to extend an edge loop. I tried setting to individual origins in combination with all possibilities for x,y,z axes in global and local, but it is still not extruding along the normals.   actual problem   simplified It is well known that confidence intervals and testing statistical hypothesis are strongly related. My questions is focused on comparison of means for two groups based on a numerical variable. Let's assume that such hypothesis is tested using t-test. On the other side, one can compute confidence intervals for means of both groups. Is there any relation between overlapping of confidence intervals and the rejection of the null hypothesis that means are equal (in favor of the alternative that means differ - two-sided test)? For example, a test could reject the null hypothesis iff the confidence intervals do not overlap. Following an online tutorial that uses an object named "icosahedron" from Add > Mesh > Regular Solids > Archimedean > Icosahedron. This object is not available in my version of Blender (2.74). Presenter asks me to include an add-on named "Add Mesh: Regular Solids", which again is not listed in my User Preferences dialog. What can I do about it? Add existing ssh key for git Notepad doesn't open files created by Gedit? Attending an academic conference is what type of travel? I am planning to travel to Portugal to attend an academic conference and in that regard needed a short-stay Schengen visa. The visa application has a field "Purpose of Travel" with the following options:   - Business - Sports - Cultural - Other - Study - Visiting family or friends - Medical reasons - Official visit - Transit - Airport transit - Tourism   I am attending the conference to present the research I am conducting as a part of my PhD. So "Study" is the closest in my opinion. But I don't want the Embassy to misconstrue that it is for studying at a university in Portugal. In that case, would "Business" be the right option to choose? How / can you connect Ethernet devices together without magnetics? How do you wire it up? What sorts of practical limitations are there on doing this?  To clarify, I'm not trying to connect two computers here. I'm thinking specifically of creating a small network of microcontrollers on a single board. Lets say the total length of a network segment is no longer than 6 inches. This would be for 10BaseT or at most 100BaseT. Can you please explain this to me?          Could you please explain this to me?   I am unable to figure out which to use which situation. I did google, and some posts say they are both the same, even if the second one is more formal. Other posts say could is the past tense of can, but in the above example, I don't think could is used as past tense of can.  What is correct way to use these words?