Power calculations, logistic regression with continuous exposure--cohort I'm trying to estimate power in a logistic regression with a continuous exposure in a cohort study (ie, the ratio of the sampling probabilities is 1). I have population cumulative incidence (probability) and population exposure variability and exposure mean and an expected odds ratio. I also have a total sample size.  I'm using R and it seems like Hmisc::bpower is only for logistic regression with binary exposure and I can't seem to find any packages that estimate binomial power with continuous exposure.  I've attempted the following simulation but it's quite slow given my total sample size and I'm not sure if it's right:  p &lt;- vector() betahat &lt;- vector() for(i in 1:1000){ n &lt;- 40000  #total sample size intercept = log(0.008662265)  #where exp(intercept) = P(D=1) beta &lt;- log(1.4) #where exp(beta)=OR corresponding to a one unit change in xtest xtest &lt;- rnorm(n,1.2,.31)  #xtest is vector length 40,000 with mean 1.2 and sd .31 linpred &lt;- intercept + xtest*beta #linear predictor prob &lt;- exp(linpred)/(1 + exp(linpred)) #link function runis &lt;- runif(n,0,1) #generate a vector length n from a uniform distribution 0,1 ytest &lt;- ifelse(runis &lt; prob,1,0)  #if a random value from a uniform distribution 0,1 is less than prob, then the outcome is 1.  otherwise the outcome is 0 coefs &lt;- coef(summary(glm(ytest~xtest, family="binomial")))  #run a logistic regression p[i] &lt;- coefs[2,4] #store the p value betahat[i] &lt;- coefs[2,1] #store the unexponentiated betahat }  mean(p &lt; .05) #power  exp(mean(betahat)) #sanity check, should equal 1.4--it does   Is there anything wrong with this approach?  One concern of mine is that the cumulative incidence (ie, probability of event over the given time period) comes from a population that did not have 0 exposure.  In fact, it's reasonable to assume that the value i'm using for an intercept is actually from a population that has an exposure variability similar to mine. In that case, how would I estimate the unexposed probability given an odds ratio (and other information that I would find in say, a published paper) to use in my power calculation?
Multiple logistic regression power analysis I have a logistic regression model and output an $R^2$ value. I then go and add another predictor variable to fit a second model. I can output a new $R^2$ value associated with the second model. When I run an ANOVA test, I see no significant improvement in the second model, but I want to assess the power associated with including the additional variable in model 2.  I have found  for linear regression that uses an $F$-Test. I want to do something similar for a logistic regression using G*Power.   But there appears to be very little documentation on multiple logistic regression models like my situation. .  From what I understand, in G*Power I set Test Family == z tests and statistical test == logisitic regression. But I am not sure what to set R² other X equal to. Is that the improvement in $R^2$?  Reading the tutorial in 27.4 from the  makes no variation of $R^2$, whereas , does not discuss the improvements made from $R^2$.
Multivariable Delta Epsilon Proof $\lim_{(x,y)\to(0,0)}\frac{x^3y^2}{x^4+y^4}$ --- looking for a hint I have the limit $$\lim_{(x,y)\to(0,0)}\frac{x^3y^2}{x^4+y^4},$$ and would like to show with an $\epsilon-\delta$ proof that it is zero. I know with a situation like $$\left|\frac{x^4y}{x^4+y^4}\right|\leq y$$  or something similar, but I can't find a way to do the same thing here, as no single term in the numerator is of sufficient degree, although I think I could get this with a small hint. Search using symbols is broken How to adapt classicthesis layout to B5paper and Linux Libertine Question says it all: I am using classicthesis with XeTeX to typeset my PhD thesis. I want to use B5 paper size (176 × 250 mm) and the beautiful Linux Libertine font. I'm wondering how to    calculate the optimal page margins actually apply these settings to the document   Any help is greatly appreciated =)  EDIT: I should add that I need to generate two different PDF files from this:   a version with papersize A4 (210 × 297 mm), where the B5 layout is (approximately) centered, and crop marks are shown, to pass on to the printing company a version with papersize B5 for online distribution, having the same layout as the printed one.   I tried fiddling with using  and \areaset command, but to no avail. Integral Representation of the Zeta Function: $\zeta(s)=\frac1{\Gamma(s)}\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$ How does one get from this $$\zeta(s)=\sum_{k=1}^{\infty}\frac1{k^s}$$ to the integral representation $$\zeta(s)=\frac1{\Gamma(s)}\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$ of the Riemann Zeta function?  I can see that it can be rewritten as  $$\Gamma(s)\zeta(s)=\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$ and the Gamma function as an integral yields  $$\zeta(s)\int_{0}^\infty \frac{x^{s-1}}{e^x}dx=\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$  But this approach does not work as the right integral does not converge.  So how does one go from the summation to the integral representation? I have a background in QFT, GR and differential geometry at the level of a master student in theoretical physics. I would like to touch the area of CFT. I know the textbook of Philippe Di Francesco. It may be too big for the beginner like me. Are there some good introductory lectures or textbooks adapted to the needs of beginners? I need to run something as sudo without a password, so I used visudo and added this to my sudoers file:  MYUSERNAME ALL = NOPASSWD: /path/to/my/program   Then I tried it out:  $ sudo /path/to/my/program [sudo] password for MYUSERNAME:    Why does it ask for a password? How can I run/use commands as root with a non-root user, without asking for a password? Are all simple left modules over a simple left artinian ring isomorphic? I am considering to use iCloud Photo Library to store a growing number of family photo albums, shared to web or set of AppleIDs.  I dont need to keep original photos on iDevices for 99.9% of photos.  How much space will be used on the photo-originating set of devices (iOS, OS X, Windows)? I.e. what (roughly) is the function from the original size and number of photos, device storage space available, any other variables? How to calculate $f(x)$ in $f(f(x)) = e^x$? How would I calculate the power series of $f(x)$ if $f(f(x)) = e^x$?  Is there a faster-converging method than power series for fractional iteration/functional square roots? What is an adjective referring to “someone who puts people down”? I was just thinking about someone I went to school with who had a penchant for putting people down, and I was trying to think of a word that describes this, but couldn’t find it. It would be a synonym of caustic, abrasive, discouraging, and undermining, but these all have slightly different connotations (to wear away", cause discouragement or to make fall). I want an adjective that has the connotation of a hammer hitting you on the head. The word does not necessarily need to describe someone who does this on purpose, out of evil intent. Is there such a word?    The word should give you a mental picture of someone barraging you with negative comments, but it not necessarily affecting you. Think of someone who so often has something negative to “contribute” that many can just either ignore it or roll their eyes at it, and that is the extent of its effect. I keep getting the mental picture of the word buffet as in, how waves buffet the shore. A constant hitting, without the hitting necessarily being devastating in its destruction. Why $¬¬\bot \not\in PROP$? I'm reading Dalen's Logic and Structure.  He gives the definition of the set $PROP$:     Definition $\bf2.1.2$ The set $PROP$ of propositions is the smallest set $X$ with the properties       $\begin{array}{rl} \rm(i)&amp;p_i\in X(i\in N),\bot\in X,\\ \rm(ii)&amp;\varphi,\psi\in X\Rightarrow(\varphi\wedge\psi),(\varphi\vee\psi),(\varphi\to\psi),(\varphi\leftrightarrow\psi)\in X,\\ \rm(iii)&amp;\varphi\in X\Rightarrow(\neg\varphi)\in X.\\ \end{array}$   Then there are some examples:        And he says that $¬¬\bot \not\in PROP$, but I don't understand it. Isn't $¬¬  \bot=\bot$ due to the property of double negation? Considering this is true, $\bot\in PROP$. Of course, in this question, I'm pressuposing some kind of evaluation, that $¬¬ \bot$ becomes $\bot$ due to the law of the double negation, but perhaps it should be hold in an unevaluated form.  Ex:. $1+1=2$ because we presupose the $1$ merges with $1$ and then becomes two. If the merge (evaluation) does not happen, then I guess:  $$1+1=1+1$$ $$2=2$$ $$2\neq 1+1$$ $$1+1\neq 2$$  Perhaps it's something like that, I took the idea from Mathematica. Sometimes it does treats things as different in the absence of full evaluation. Use a specific forwarded key from SSH-agent? Let's say I have a key for Github, along with other keys. I've added lots of keys to my ssh agent (ssh-add -L returns lots of lines) at my home computer A. In my .ssh/config I have set up which key to use with which host, so e.g.  ssh -T -vvv git@github.com 2&gt;&amp;1 | grep Offering   gives  debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.github   Only one key is offered, as expected. But then ssh-ing to some host B with ForwardAgent yes and repeating the same command, I get  debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.linode2 debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.helium debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.github   meaning it tries all my keys. This is problematic since only a limited number of keys can be tried before servers return Too many authentication failures. So I tried editing .ssh/config on host B to include  Host github.com   IdentityFile /Users/doxna/.ssh/id_rsa.github   IdentitiesOnly yes   but then I get no key offerings, but rather  debug2: key: /Users/doxna/.ssh/id_rsa.github ((nil))   which I guess means that the key was not found(?) And after all, the key is located at my home computer A, not host B, so the question is how to refer to it at host B? Hope I managed to explain the question. Uses of the definite article (the) in generic noun phrases I was reading a paragraph about lions and I came up with a question about the definite article (the).  Let me tell you first what I know about it.     1->We use the before a singular noun (when we are sure about the noun.    And the listener and the speaker both know about it).      2->We use the before a plural noun (again when we are sure about the noun,   and we are not talking generally).   So, my question is why does the writer use the here as we are not talking about any specific lion or lions. We are talking generally.  The Paragraph:     Living in the grasslands, scrub, and open woodlands of sub-Saharan   Africa, the lion is the second largest cat in the world. It is dwarfed   slightly by the tiger, which is closely related and has a very similar   body type.    Can we re-write the paragraph something like this:     Living in grasslands, scrub, and open woodlands of sub-Saharan Africa,   lions are the second largest cat in the world. They are dwarfed   slightly by tigers, they are closely related and has a very similar   body type. Example of mailmerge package with an Excel spreadsheet I am looking for an example for using the  package to write a cover letter, with names and addresses on a spreadsheet. The package comes with an example, but you have to manually enter all the data. Is there a way of conditionally triggering a compile-time error in verilog? Is there a problem with Beamer in the latest MiKTeX update? How can I vertically align entries in my acronyms' list? I use the Glossaries package to generate it. Here is MWE:  % !TeX program = xelatex % !TeX encoding = utf-8 % !TeX spellcheck = ru_RU  \documentclass[12pt, a4paper]{article}  \usepackage{polyglossia} \setdefaultlanguage{russian} \setmainfont[Ligatures=TeX]{Times New Roman}  \usepackage[xindy={glsnumbers=false}, nonumberlist, nopostdot, nogroupskip]{glossaries} %\setglossarystyle{super} % uncomment for style "super" \makeglossaries  \begin{document}  \newacronym{bam}{ДАП}{Двунаправленная Ассоциативная Память} \newacronym{ai}{ИИ}{Искусственный Интеллект} \newacronym{am}{АП}{Ассоциативная Память} \newacronym{ann}{ИНС}{Искусственная Нейронная Сеть} \newacronym{an}{ИН}{Искусственный Нейрон} \newacronym{it}{ИТ}{Информационные Технологии} \glsaddall  \printglossaries  \end{document}   With the default style I have the following:  As you can see, the long names are not vertically aligned. What I want can be achieved with the    \setglossarystyle{super}   But it this case, short names lose the BOLDness, some small horizontal indent appears and the spacing between lines becomes smaller:  where RED is some extra indent, which I don't need. Thank you for your answers! How to get layer extent in OpenLayers or zoom to WMS layer extent? I have added WMS layers using follow:  basemap = new OpenLayers.Layer.WMS( "Layer Name1", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername'} );   utility = new OpenLayers.Layer.WMS( "Layer Name2", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername', transparent:"true"}, {isBaseLayer:false} );   Now I want to get zoom to my utility layer, How can I?  I have tried as following:  map.zoomToExtent(utility.getDataExtent()); Which is the rarest badge awarded/the least popular one/the one hardest to get? Transforming geometry PostGIS column with unknown geometry type? I run PostgreSQL 9.1 and PostGIS 2.0. I have a table that contains one geometry column.   But that column contains point, polygons lines, etc.   So I set it like so,   ALTER TABLE jake ADD COLUMN jake_geom geometry;  and then I setted some constraints to make it geometry enabled, but not limited on a single geometry type  ALTER TABLE jake   ADD CONSTRAINT enforce_dims_geom CHECK (st_ndims(jake_geom) = 2);  ALTER TABLE jake   ADD CONSTRAINT enforce_srid_geom CHECK (st_srid(jake_geom) = 900913);   Now, I want to reproject the geometries in that column to 4326.   According to , for the transform to work, I need to set a geometry type.  (the TYPE geometry(MultiPolygon,2163) part)  but my column does not have certain geometry type. How do I proceed?  Or I can simply do  ALTER COLUMN geom USING ST_Transform(geom,2163);  avoiding to set a type?