Choosing between alternate pseudo R squared methods My project uses logistic regression and I needed to calculate pseudo r squared to understand the explanatory power of each model.  I have been using the formula below to calculate what I thought was equivalent to pseudo R squared by comparing a null model using just the intercept to the full specified model to be measured.  mod1 &lt;- glm(yn~hinctnta+hincfel+uemp5yr+stfeco+gincdif, data=euro,family = "binomial") summary(mod1)  nullmod1 &lt;- glm(yn~1, data=euro, family="binomial") 1-logLik(mod1)/logLik(nullmod1)   I noticed that some of the results were higher than expected. Therefore I sought out additional ways to calculate R2 and used the following function which calculates Hosmer and Lemeshows R squared as well as Nagelkerke and Cox and Snell. Testing 5 different models showed very different (lower) results than those showed by my first attempt using the simple null model.  My question therefore is what is the theoretical difference between the two approaches and is there any validity in just using the first simpler approach to report pseudo r squared?  Function to calculate R squared:  logisticPseudoR2s &lt;- function(LogModel) { dev &lt;- LogModel$deviance nullDev &lt;- LogModel$null.deviance modelN &lt;- length(LogModel$fitted.values) R.l &lt;- 1 - dev / nullDev R.cs &lt;- 1 - exp ( -(nullDev - dev)/ modelN) R.n &lt;- R.cs / ( 1 - (exp (-(nullDev / modelN)))) cat("Pseudo R^2 for logistic regression\n") cat("Hosmer and lemeshow R^2", round(R.l, 3), "\n") cat("Cox and Snell R^2", round(R.cs, 3), "\n") cat("Nagelkerke R^2", round(R.n, 3), "\n") }  logisticPseudoR2s(mod)
Which pseudo-$R^2$ measure is the one to report for logistic regression (Cox & Snell or Nagelkerke)? I have SPSS output for a logistic regression model. The output reports two measures for the model fit, Cox &amp; Snell and Nagelkerke.  So as a rule of thumb, which of these $R^²$ measures would you report as the model fit?  Or, which of these fit indices is the one that is usually reported in journals?    Some Background: The regression tries to predict the presence or absence of a bird (capercaillie) from some environmental variables (e.g., steepness, vegetation cover, ...). Unfortunately, the bird did not appear very often (35 hits to 468 misses) so the regression performs rather poorly. Cox &amp; Snell is .09, Nagelkerke, .23.    The subject is environmental sciences or ecology.
What do you call the frequent conjunction {juxtaposition} of two words? The statement that I want to make is:     "Impostor syndrome" ... why does this (conjunction of words) sneak into every text I read these days?   What is the right or best expression for "conjunction of words"? In the statement I don't want to refer to the syndrome itself, but rather to the expression. If it was one word instead of two I would want to say     ... why does this word sneak into every text I read these days.   However, writing     ________ why do these two words sneak into every text I read these days.   would miss the point, because it's not these two words that sneak into every text at various location but rather their conjunction. Can a textbox be enabled after a certain value from a picklist is selected Create custom fields with apex Anybody knows how to create custom text fields on salesforce.com objects using apex? I'm new to ArcGIS 10 and am trying to do a really simple field calculator equation and it is not working. I'm just trying to find the percentage of a certain demographic trait by doing:  [asian]/[total]*100   It is populating about 10% of the column correctly and then I get an error:     There was a failure during processing, check the Geoprocessing Results   window for details   Obviously my syntax is not incorrect or else it wouldn't start populating the field correctly.   Does anyone have any idea why this is happening? Why should the interface for a Java class be preferred? Windows vs Linux Local Time? Ever since I started using Linux in dualboot with Windows I noticed that when I rebooted the machine, the time on the other OS was wrong, e.g. it was 12:00 on Linux, then I rebooted and on Windows it was 18:00, and when I checked the BIOS, the RTC was set to 18:00. Since my timezone is -06:00 CST I assume Linux just sets the RTC’s time to UTC and re-calculates the time based on the timezone, whereas Windows just sets the RTC to the local time. Both use the same NTP server to sync the time.  The question is, which one is doing the right thing? On which one should I set the timezone setting to UTC in order to have the right time on both? How do I trust a self signed certificate? How to compute moments of log normal distribution? The computed moments of log normal distribution can be found . How to compute them? If I want to know the meaning of wget -b, I see the manual by man wget, then search the -b option.     -b    --background        Go to background immediately after startup.  If no output file is specified via the -o, output is redirected to wget-log.   I want to get the result by a command like man wget -b. (Of course this doesn't work.)  Is there a similar way to make it possible? Trying to plot the sin(x) function, I get this result:    The MWE is here:  \documentclass{standalone} \usepackage{ pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[samples=500]{sin(x)}; \end{axis} \end{tikzpicture} \end{document}   cos(x) looks like an inverted parabola and tan looks just like sin.  I'm using pdflatex and MiKTeX. Any ideas? I have created an FME workspace which inputs a pipeline as well as other linear features which cross it (waterways, roads, railways, fences, other pipelines, etc).  The output is a point file which contains the crossing type.  What I would like to do is calculate the distance along the pipe from the start of the pipeline for each intersection.  So, as you travel along the pipeline, the distance attribute will increase.   I'm thinking that I'll need to use some of the linear referencing tools like MeasureGenerator, MeasureExtractor, or something like that, but I'm not sure how to do so.  Does anyone have an idea of how to do this? Find $\lim_{n\to\infty}2^n\underbrace{\sqrt{2-\sqrt{2+\sqrt{2+\dots+\sqrt2}}}}_{n \textrm{ square roots}}$. Find $\displaystyle \lim_{n\to\infty}2^n\underbrace{\sqrt{2-\sqrt{2+\sqrt{2+\dots+\sqrt2}}}}_{n \textrm{ square roots}}$.   By geometry method, I know that this is $\pi$. But is there algebraic method to find this ?   Thank you. I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water? I need a little hint in a proof on convergence of a sequence. The problem I have is: Suppose $(x_n)$ is a monotone decreasing sequence of real numbers such that $\sum x_n$ converges, prove that:  $$\lim_{n \to \infty} nx_n=0$$  My idea is: proving this fact aims to prove that given $\epsilon &gt;0$ there's some natural $n_0 \in \mathbb{N}$ such that if $n &gt;n_0$ we have $|nx_n|&lt;\epsilon$.  Now, I know that $\sum x_n$ converges, so that given $\epsilon'&gt;0$ there's some $k_0 \in \mathbb{N}$ such that if $k &gt; k_0$ we have:  $$\left|\sum_{i=1}^{k}x_i - S\right|&lt;\epsilon'$$  Where $S = \sum x_n$. Now, since $(x_n)$ is monotone decreasing we know that we must have $x_1 &gt; \cdots &gt; x_k$ so that the sum of all $x_i$ should be less or equal to $k x_k$. So I know that I have:  $$\left|\sum_{i=1}^{k}x_i - S\right|\leq\left|\sum_{i=1}^{k}x_i\right|+|S|\leq|kx_k|+|S|$$  I feel that the proof will come from this, however I'm stuck at this point. Can someone give just a little hint on how to proceed from here?  Thanks very much in advance for your help. I installed Ubuntu 14.04, and I'm loving it. However, when playing a game called Garry's Mod I noticed that my CTRL and ALT keys on my wired keyboard were both being detected as Shift. I looked at the keyboard layout chart and confirmed this. I also noticed that my Windows, or Super Key, Right CTRL and Right ALT are all being mapped to Left Shift.  They're all working perfect, they're just being detected wrong. I have selected the United States layout which is what my keyboard is supposed to be and is in Windows. Can anyone help? My keyboard is being detected as a SONiX USB Keyboard (the actual keyboard brand is Avazz).   my xev -event keyboard output is this for every single one:   KeyRelease event, serial 28, synthetic NO, window 0x4a00001,     root 0xdc, subw 0x0, time 2446369, (730,547), root:(795,599),     state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False   The only thing that changes is the time. The sudo evtest command shows all the modifier keys as   type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1v type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 0  for lsusb, the driver it's using is the usbhid driver.  lsusb shows something confusing; the same port as my keyboard is being shown in other commands is showing up in lsusb as my wireless mouse's driver, Logitech, Inc. Unifying Receiver. This may be the problem, but I'm probably simply mistaken in what port it is on. Due to this, I'm not sure what driver is what. I'm going to post all of them, although this might be annoying. I have a separate keyboard plugged in along side my main one to use the CTRL, Super, or ALT by the way, so don't be confused by the Logitech Classic Keyboard Driver.  Bus 001 Device 009: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter Bus 001 Device 008: ID 046d:c315 Logitech, Inc. Classic Keyboard 200 Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB Bus 001 Device 006: ID 0480:0200 Toshiba America Info. Systems, Inc.  Bus 001 Device 004: ID 0c45:6340 Microdia  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 002 Device 002: ID 0c45:7603 Microdia  Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   For lsusb -t, the driver being used is usbhid. for i in $(ls /sys/module/usbhid/parameters/); do echo -ne "$i\t"; more /sys/module/usbhid/parameters/$i; done is:  ignoreled   0 mousepoll   0 quirks  (null),(null),(null),(null)  I don't think you need this since I said it's usbhid, but here's it anyways.  for i in $(ls /sys/module/hid/parameters/); do echo -ne "$i\t"; more /sys/module/hid/parameters/$i; done's output.  debug   0 ignore_special_drivers  0 modinfo usbhid's output is:  filename:       /lib/modules/3.18.3-031803-generic/kernel/drivers/hid/usbhid/usbhid.ko license:        GPL description:    USB HID core driver author:         Jiri Kosina author:         Vojtech Pavlik author:         Andreas Gal srcversion:     A395FA22EA2729BAC1557C9 alias:          usb:v*p*d*dc*dsc*dp*ic03isc*ip*in* depends:        hid intree:         Y vermagic:       3.18.3-031803-generic SMP mod_unload modversions  signer:         Magrathea: Glacier signing key sig_key:        29:DB:FD:FC:5A:CC:82:3C:C5:2C:39:4C:C1:C7:4C:01:C3:BE:BF:78 sig_hashalgo:   sha512 parm:           mousepoll:Polling interval of mice (uint) parm:           ignoreled:Autosuspend with active leds (uint) parm:           quirks:Add/modify USB HID quirks by specifying  quirks=vendorID:productID:quirks where vendorID, productID, and quirks are all in 0x-prefixed hex (array of charp)  cat /sys/kernel/debug/usb/usbmon/2u &gt; /tmp/usb.mon.out is telling me not found even though I changed 2 to my bus ID. What am I doing wrong here? Clarify if you can please, kinda confused there. I tried putting 2, 02 and 002. The output of  sudo ls /sys/kernel/debug/usb/usbmon/ is  0s  0u    1s  1t  1u  2s  2t  2u A $60\times 60$ board is partitioned into rectangles of size $2\times 5$ (or $5\times 2$). Is it true that there always exist another partition into rectangles of size $1\times 3$ (or $3\times 1$) such that any $2\times 5$ (or $5\times 2$) rectangle contains a $1\times 3$ (or $3\times 1)$ rectangle?  For the "simple" partition into $2\times 5$ rectangles, this is certainly true: use the simple partition into $1\times 3$ rectangle.  Another way to partition is to first partition the $60\times 60$ board into $12\times 10$ boards, and then for each such board, put two $2\times 5$ at the top and ten $5\times 2$ below. It is not hard to tile each such $12\times 10$ board with $1\times 3$ (or $3\times 1)$ rectangles so that each $2\times 5$ (or $5\times 2$) contains a $1\times 3$ (or $3\times 1)$ rectangle.  (I'm assuming that an $m\times n$ rectangle has $m$ rows and $n$ columns.) Could you help me finding some less colloquial equivalent to highlighted phrases of this speech Today I want to be able to give you some good tips on parallel parking. It's part of your road test. It's something you need to learn. For most new drivers it's real difficult, because they're not able to judge angles. And parallel parking is all about angles. I'll take you through a typical parking, I'll take you through how I teach it , and maybe that'll help you in passing your road test. The first thing you want to do is you want to pull over over and you want to stop alongside a parked car. Typically, an inspector will give you a command to pull over, stop next to the red or blue car. You're just going to pull over, put your blinker on to the right, and pull over even with that car.     taken from a series of videos teaching driving   Why did the man use  be able in his speech? What is the difference between be able and I would like to or I want ? I mean what the listener should make of  I want to be able to give you ...  . Why did not he say I want to give you... ?  When he says I'll take you through a typical parking , I get the meaning of take one through ,It means I am going to teach you , isn't it? But my real concern is what the second I'll take you through means, while saying I'll take you through how I teach it . Perhaps it doesn't mean I will teach you that how I teach it ! , does it? The man always says the first thing you want to do . Why does not he say the first thing you should do , the first thing you need to do ? What are the diffrences in meaning? Isn't it unnatural saying you want to do ? In the last sentence he says You're just going to pull over, is the use of going to just weakening would and will? I think here it means something else. I think it means you just want to or you just start What is this strange function definition syntax in C? GCD of two numbers divided by their greatest common divisor is 1 Why is it not true that if $\Phi \models \exists x \phi$ then there is a term $t$ with $\Phi \models \phi \frac{t}{x}$?