I have a set of data which is has a very large positive skew, and has been transformed using a logarithm. I wish to predict one variable from another using the lm function in R. Since both variables have been transformed, I am well aware that my regression will output the equation:  ln(y) = b*ln(x) + a, where a and b are the coefficients.  The model fit is good, with an R squared of almost 0.6, producing a range of predicted y values.  Now, i have 'back-transformed' the variables using the following equation:  y_predicted = exp(a)*x^b   However, the predicted values for the larger x and y are significantly lower than they should be. Since I am going to be using the mean and sum of all of the y_predicted values in comparison with the y_actual values, this makes my model under predict by around 75%.  Due to the logarithmic scale, a small deviation from the line of best fit in the log domain, has resulted in a very large deviation when back-transformed.  My question, is how to adequately deal with this? I can come up with my own regression coefficients, which ensures that the line of best fit over-predicts some of these larger values, and makes the sum more aligned. However, this would  go against the point of using a linear model in the first place, which optimises the model.  Also, i am not sure how 'statistically' valid this would be, as the method could not be replicated, as the coefficients were determined by eye.  Thoughts welcome!
I'm fitting a regression on the $\log(y)$.  Is it valid to back transform point estimates (and confidence/prediction intervals) by exponentiation?  I don't believe so, since $E[f(X)] \ne f(E[X])$ but wanted other's opinions.  My example below shows conflicts with back transforming (.239 vs .219).  set.seed(123)  a=-5 b=2  x=runif(100,0,1) y=exp(a*x+b+rnorm(100,0,.2)) # plot(x,y)  ### NLS Fit f &lt;- function(x,a,b) {exp(a*x+b)}  fit &lt;- nls(y ~ exp(a*x+b),  start = c(a=-10, b=15))  co=coef(fit) # curve(f(x=x, a=co[1], b=co[2]), add = TRUE,col=2,lwd=1.2)  predict(fit,newdata=data.frame(x=.7)) [1] 0.2393773  ### LM Fit # plot(x,log(y)) # abline(lm(log(y)~x),col=2) fit=lm(log(y)~x) temp=predict(fit,newdata=data.frame(x=.7),interval='prediction') exp(temp)         fit       lwr       upr 1 0.2199471 0.1492762 0.3240752
Gauge symmetries and elementary particles The  (disclaimer: I don't know this wikipedia entry) is usually mentioned as the reason why gravitons may not be composite particles. I do understand the proof of the theorem, but not the previous conclusion.   The theorem states that in an interacting and Poincare invariant quantum field theory, there are not massless, spin-2 particles unless there exists a gauge symmetry — which makes the energy-momentum tensor non-covariant (actually covariant up to a gauge transformation) under Lorentz transformations in the Fock space. So the immediate conclusion of the theorem is that the existence of a massless, spin-2 particle (like a graviton) requires linearized diffeomorphisms.  My question is: why do linearized diffeomorphisms imply that gravitons are elementary particles? Or, more in general, why  the particle corresponding to a gauge field must be elementary (I know that a gauge symmetry must be exact, but why this implies that the corresponding particle must be elementary?). What is the relationship between UV image and material texture? I am struggling to understand perhaps a very simple concept in Blender. There are materials which might have some diffuse coloring and a texture image, and there are also UV maps with their own images. Both can be applied to meshes or faces, but it seems that if a face has UV map then the material's texture is ignored and an image for UV map is picked.   If so, what is the use for a texture in a material if it is replaced by UV map's image?   EDIT: I've added some images to clarify the issue I have.   Case 1: a basic plane with material which has a texture, and no UV map. Diffuse color is applied, but material's texture is not.   Case 2: like above, but with reduced intensity of texture.   Case 3: Added UVmap and added image to the UVmap. Now I have texture, but not the diffuse color, and if UVmap was a different image, it would be picked regardless of texture set in the material.   So if I have UVmap image, what is the material texture for? How do I programmatically determine operating system in Java? Get name of caller function in PHP? Is there a PHP function to find out the name of the caller function in a given function? I am running Ubuntu 14.04.2 and I want to format my disk for another operating system (Windows 10).  My desire to do this stems from a recent problem I have been having with installing the new OS. I try to boot from a live DVD (which I have confirmed is working), but my computer does enter the Windows 10 installation setup.  So, I am hoping that completely wiping the disk will solve this issue. Ideally, I want to do this with my only resources being Ubuntu and an internet connection. I can't connect the hard drive to another computer, and it would be difficult for me to have to burn a disc for any reason.  Thank you. states:  "In practice, explicit right outer joins are rarely used, since they can always be replaced with left outer joins and provide no additional functionality."  Can anyone provide a situation where they have preferred to use the RIGHT notation, and why? I can't think of a reason to ever use it. To me, it wouldn't ever make things more clear.  Edit: I'm an Oracle veteran making the New Year's Resolution to wean myself from the (+) syntax. I want to do it right Annoying Viber notification Is the harmonic oscillator potential unique in having equally spaced discrete energy levels? Timeout on a function call I'm calling a function in Python which I know may stall and force me to restart the script.   How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script cancels it and does something else? Integral of $\sqrt{1-x^2}$ using integration by parts This question is in the spirit of , an example of an apparently non-deterministic system in Newtonian mechanics. Under certain restrictions, the  guarantees the existence and uniqueness of solutions to differential equations with initial conditions. However, Norton's dome does not satisfy these restrictions. The ball may sit on top of the dome for an arbitrary period of time before sliding down in a particular trajectory, without violating Newton's laws of motion.    Is there a plausible example of a system of interacting point-particles such that the equations of a point-particle are continuous but not , and therefore fail to have a unique solution? How is it, that $\sqrt{x^2}$ is not $ x$, but $|x|$? How to disable command-Q for Quit? Is there any way to disable command+Q for quitting apps?  I tried adding this menuitem to the "Keyboard Shortcuts" preference pane (as ), and remapping it to command+option+Q (slightly harder to hit), and the menu item changed to show this, but command+Q still causes the app to quit.  I'm using OS X 10.7, but I'd happily upgrade to 10.8 if it fixed this.  The app I really want this for is Firefox, but if there was a solution that disabled command+Q for every app, that would be fine, too. Modifying C string constants? how much money it takes for a day without including accommodation In Uk "not a valid identifier" when I do "export $PATH" When I run export $PATH in bash, I get the error not a valid identifier. Why? I understood the very basic concept of how to use /etc/network/interfaces, but all I find online are examples, example after example, which I can copy-paste from. What I miss is an explanation of the syntax, an explanation of the meaning of the commands and which order the commands require. I want to understand, because most of the time copy-paste is not enough, because I'm not working on a fresh machine, so I can't just overwrite existing configurations because it would break a lot of stuff. man interfaces was not very helpful since it is written very complicated.  Example questions I have: what does inet in an iface line mean exactly (I could not even find it in the manpage), what does manual in an iface line mean exactly (many examples use it, but according to manpage it needs an extra config file then, which the examples don't present), when do I use or need them? When not? When I create a bridge, what exactly happens to the interfaces? How to draw Venn diagrams (especially: complements) in LaTeX What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising! If space of bounded operators L(V,W) is Banach, V nonzero, then W is Banach (note direction of implication) Let $V,W$ be normed vector spaces, and $L(V,W)$ be the space of bounded linear operators. Usually I would only see the statement "If $W$ is Banach, then $L(V,W)$ is Banach.". But  writes that there is a converse: "If $L(V,W)$ is Banach, and if $V$ is non-trivial, then $W$ is Banach". This is pretty interesting since I never seen a converse before. I was wondering if anyone has a nice proof.  I tried reversing the proof for the usual direction, but the inequalities can't be reversed. I also tried to start with a Cauchy sequence in $W$, and construct linear operators (using Hahn-Banach to control the operator norms), but alas I cannot say much about the distance between these operators (much less say that it is Cauchy) "Naturally occurring" non-Hausdorff spaces?