Essentially comparing:  glm1 = glmer(Mortality ~ CCI + PatientRace + PatientSex + age_cat + (CCI | FacilityIdentifier),               data = tmp, family = binomial,               control = glmerControl(optimizer = "bobyqa"), nAGQ = 1)   to   m1 = glm(Mortality ~ CCI + PatientRace + PatientSex + age_cat,           family=binomial, data = tmp)   To determine if the random effect is a significant contributor, hopefully to show that each facility doesn't have varying practices in measuring CCI that may affect interpretation of mortality. Would appreciate any advice.
Given three variables, y and x, which are positive continuous, and z, which is categorical, I have two candidate models given by:  fit.me &lt;- lmer( y ~ 1 + x + ( 1 + x | factor(z) ) )   and  fit.fe &lt;- lm( y ~ 1 + x )   I hope to compare these models to determine which model is more appropriate. It seems to me that in some sense fit.fe is nested within fit.me. Typically, when this general scenario holds, a chi-squared test can be performed. In R, we can perform this test with the following command,  anova(fit.fe,fit.me)   When both models contain random-effects (generated by lmer from the lme4 package), the anova() command works fine. Owing to boundary parameters, it is normally advisable to test the resulting Chi-Square statistic via simulation, nonetheless, we can still use the statistic in the simulation procedure.  When both models contain only fixed-effects, this approach---and, the associated anova() command---work fine.  However, when one model contains random effects and the reduced model contains only fixed-effects, as in the above scenario, the anova() command doesn't work.  More specifically, I get the following error:   &gt; anova(fit.fe, fit.me)  Error: $ operator not defined for this S4 class   Is there anything wrong with using the Chi-Square approach from above (with simulation)? Or is this simply a problem of anova() not knowing how to deal with linear models generated by different functions?  In other words, would it be appropriate to manually generate the Chi-Square statistic derived from the models? If so, what are the appropriate degrees of freedom for comparing these models? By my reckoning:  $$ F = \frac{\left((SSE_{reduced}-SSE_{full})/(p-k)\right)}{\left((SSE_{full})/(n-p-1)\right)} \sim F_{p-k,n-p-1} $$  We are estimating two parameters in the fixed effects model (slope and intercept) and two more parameters (variance parameters for the random slope and random intercept) in the mixed-effects model. Typically, the intercept parameter isn't counted in the degrees of freedom computation, so that implies that $k=1$ and $p=k+2=3$; having said that I'm not sure if the variance parameters for the random-effects parameters should be included in the degrees of freedom computation; the variance estimates for fixed-effect parameters are not considered, but I believe that to be because the parameter estimates for fixed effects are assumed to be unknown constants whilst they are considered to be unknowable random variables for mixed effects. I would appreciate some assistance on this issue.  Finally, does anybody have a more appropriate (R-based) solution to comparing these models?
How could Thranduil have met a dragon? A doubt from Milnor's "Topology from a Differentiable Viewpoint". This is a doubt from Milnor's "Topology from a Differentiable Viewpoint".     For a smooth $f:M\to N$, with $M$ compact, and a regular value $y\in N$, we define $n(f^{-1}(y))$ to be the number of points in $f^{-1}(y)$. It is easy to see that $n(f^{-1}(y))$ is finite. It can also be seen that $n(f^{-1}(y))$ is locally constant; i.e. there is a neighbourhood of $y$ such that for every point $y'$ in that neighbourhood, $n(f^{-1}(y'))=n(f^{-1}(y))$.   The proof for the statement in bold is the following:     Let $x_1,x_2,\dots,x_n$ be the points of $f^{-1}(y)$, and choose disjoint neighbourhoods $U_1,U_2,\dots,U_n$ of these points, which are mapped diffeomorphically into neighbourhoods $V_1,V_2,\dots,V_n$ of $y$. The required neighbourhood is $(V_1\cap V_2\cap\dots V_n)-f(M-U_1-U_2-\dots U_n)$.   I don't understand how $(V_1\cap V_2\cap\dots V_n)-f(M-U_1-U_2-\dots U_n)$ is open. I know that $(V_1\cap V_2\cap\dots V_n)$ is open. However, how can one prove that $f(M-U_1-U_2-\dots U_n)$ is closed? I can see this working if $f$ is surjective, but not otherwise. Is there any possibility of setting up two factor authentication (2FA) for Stack Exchange OpenID authentication?  I could just use my (already 2FA-enabled) Google account for Stack Exchange, but I would prefer to continue use Stack Exchange OpenID.  After  (which, I appreciate, didn't affect Stack Exchange, as you use IIS and Schannel, not OpenSSL), there have been a lot of recommendations to change passwords and to enable 2FA where possible.  So, what are the chances of a text-messaging-based or Google-Authenticator-based 2FA for Stack Exchange? I would like to run a script from the main ubuntu shell as a different user that has no password.  I have full sudo privileges, so I tried this:  sudo su -c "Your command right here" -s /bin/sh otheruser   Then I have to enter my password, but I am not sure if that script is now really running under that user.  How can I confirm that the script is really running under that user now? Limiting floats to two decimal points I want a to be rounded to 13.95.  &gt;&gt;&gt; a 13.949999999999999 &gt;&gt;&gt; round(a, 2) 13.949999999999999   The  function does not work the way I expected. Can open sets and closed sets of $\mathbb{R}^n$ be homeomorphic? If a Matrix Has Only Zero as an Eigen-Value Then It Is Nilpotent How can I use function's parameter in it? Why is absolute value  function   not a polynomial?   I need  a clear  answer to this question please,?  Why couldn't we consider absolute value function as a polynomial? "wait more than" vs. "wait FOR more than" If you make him wait (for) more than ten minutes, he'll just walk away.  I found both instances on Google Books:  and . So I'm a bid confused. How do I switch back to python2 after Anaconda set python3 as the default? Recently, I installed  on my 15.04 and ended up with this!  :~$ python --version Python 3.5.1 :: Anaconda 2.5.0 (64-bit)  :~$ python2 --version Python 2.7.9  :~$ python3 --version Python 3.5.1 :: Anaconda 2.5.0 (64-bit)   During the last moments of installation, I did enter something as yes in hurry, and I suppose it had to do something with this. (Ok, my fault, I should have handled that carefully, but I need help now, not criticism).    AFAIK this is definitely going to break other programs. What do I do now?    What I think could work.  Can this be done using aliases?  alias python=python2   But I ain't sure. How to get all possible combinations of a list’s elements? Remove sudo privileges from a user (without deleting the user) What is divergence? I am reading the book Darth Plagueis, and when an assassination attempt is made on him by use of a nuclear bomb, the book states that nuclear weapons are scarcely available.   I searched briefly but found nothing on this and wondered if an explanation is available. Why would nuclear weapons be rare in a universe with such advanced technology across the board? How much set theory and logic should typical algebraists/analysts/geometers know? (soft-question) I know enough amount of set theory and logic to study grad-level math. However, I don't know more advanced set theory and logic, such as the ones on Kunen's or Shoenfield's texts. Although it's good to learn such advanced topics, I may not have enough time to do so, since I will probably put my emphasis on algebra, analysis or geometry as well as mathematical physics.   Although how much set theory and logic I should learn is totally up to what sort of analysis, algebra or geometry I will study, I want to know how much of them typical competitive algebraists/analysts/geometers know. If you are one of them, how much do you know? $d = \gcd(c,m),\ ac≡bc\pmod{\! m}\Rightarrow a≡b\pmod {\!m/d}\ $ [Congruence Cancellation & Division Rule] How would you show that if $ac≡bc$ $\mod m$ and $\gcd(c,m)=d$, then  $a≡b$ $\mod \frac{m}{d}$?  Any help would be much appreciated! Basically, I want to have a single operator which can do multiple things, based on some attributes values.  class MyPanel(bpy.types.Panel):     # (...)     layout = self.layout     row = layout.row()     row.operator("my.button", text="Button text")  class MY_BUTTON_OT_Button(bpy.types.Operator):     bl_idname = "my.button"     bl_description = "Button description"     bl_label = "Button"     foo = bpy.props.IntProperty()     bar = bpy.props.BoolProperty()      if bar:         # Do something with foo     else:         # Do something else :P   I know how to set one attribute, like so:      row.operator("my.button", text="Button text").foo=5   But what about multiple arguments? I tried several things that didn't worked, like (e.g.):   With setattr(): row.operator("my.button", text="Button text").setattr(foo=5,bar=True)   With a custom method setVal() in the operator class: row.operator("my.button", text="Button text").setVal(foo=5,bar=True)   Maybe I must use a single EnumProperty? I hope to avoid this, so my question is: Is it possible to pass multiple custom arguments to set attributes in an operator class? And if yes, how ?  Thanks for your help. WiFi Adapter AX201 Not Found: Ubuntu 18.04 Please note that this question is specific to Intel WiFi adapters.  My laptop is an HP ENVY with an Intel AX201 Wifi Adapter. I've dualbooted Ubuntu with Windows.  AX201 WiFi adapter is not supported by latest Ubuntu 18.04 version, because Ubuntu 18.04 comes with Linux Kernel 5.0, whereas support for AX201 comes built-in in Linux Kernel 5.2+. Canonical claims that Ubuntu 18.04 will get Linux Kernel 5.3 sometime next year. However, I wont be able to wait that long.  I tried downloading and installing Kernel 5.2.14, but I cant go beyond Grub: I get the error:     error: you need to load the kernel first.   Other option is to download the Intel Backport Driver, which I tried. That didn't seem to work either. As per the tutorials, I've restarted frequently, but that didnt work either.  Also I'm not quite sure if Intel IWLWIFI Backport driver supports AX201 in the first place.  WiFi works while I'm booted in Windows.  What should I do?  Thanks in advance!  UPDATE  I tried out @Pilot6's answer, and it worked. Thanks!  I have one last question: I've read that if you upgrade the Kernel beyond what Ubuntu 18.4 supports, its kinda unsafe (which I read as prone to system crashes).  I dont want system crashes because I have only one partition (root) for Ubuntu, and any crash would likely mean all my data is lost. One method forward would be to split my Ubuntu partition into root and home.  So if I want to access WiFi on my device safely without risking any crashes, what should I do?  My understanding of Ubuntu and Linux may be wrong as they are built on forum answers only. Please correct me if Im wrong anywhere. How to create my own list of things