I have $x$- and $y$-data, and I want a power-law fit ($y=ax^b$). I always fit $\log(x)$ and $\log(y)$ by $p_1x+p_2$ (Matlab poly1), but when I fit $x$ and $y$ with $p_1x^{p_2}$, I did not get exactly the same result. Why?!  And what is the best way for doing this? First take logs then linear fit??
I have a set of values $x$ and $y$ which are theoretically related exponentially:  $y = ax^b$  One way to obtain the coefficients is by applying natural logarithms in both sides and fitting a linear model:  &gt; fit &lt;- lm(log(y)~log(x)) &gt; a &lt;- exp(fit$coefficients[1]) &gt; b &lt;- fit$coefficients[2]   Another way to obtain this is using a nonlinear regression, given a theoretical set of start values:  &gt; fit &lt;- nls(y~a*x^b, start=c(a=50, b=1.3))   My tests show better and more theory-related results if I apply the second algorithm. However, I would like to know the statistical meaning and implications of each method.  Which of them is better?
Why does latex stretch small sections across the whole page vertically? Find and remove large files that are open but have been deleted How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open?  The situation is that we are running a process that is filling up a log file at a terrific rate. I know the reason, and I can fix it. Until then, I would like to rm or empty the log file without shutting down the process.   Simply doing rm output.log removes only references to the file, but it continues to occupy space on disk until the process is terminated. Worse: after rming I now have no way to find where the file is or how big it is! Is there any way to find the file, and possibly empty it, even though it is still open in another process?  I specifically refer to Linux-based operating systems such as Debian or RHEL. Here are some examples.  "Until the Son of God appear" What I was taught: Subjunctive of indefinite future.  "It is required that the applicant be 18 years old and possess a valid driver's license." What I was taught: mandative subjunctive.  "Where be ye going," said the false knight on the road?" What I was taught: subjunctive of direct discourse.  "If I were you, which we both are thankful I am not, I wouldn't do that. What I was taught: The subjunctive mood is used for supposition contrary to fact.  "I dreamed I were a fireman in my Maidenform bra." What I was taught: The subjunctive mood can be used with words like dream.  "God bless you." I don't remember, so obviously I wasn't taught.  I can live with Pluto's not being a planet, but I must say it's irksome to find that so much of what I was told about English turns out to be nonsense. comma delineation of consecutive endnotes Consecutive footnotes can be separated by commas by invocation of the multiple option of the  package:    \documentclass{article} \usepackage[multiple]{footmisc} \begin{document} Comma delineation of consecutive footnotes fails upon conversion to endnotes% \footnote{First note.}% \footnote{Second note.}.% \end{document}   This comma delineation fails, however, if footnotes are converted to endnotes using the  package:    \documentclass{article} \usepackage{endnotes} \let\footnote=\endnote \usepackage[multiple]{footmisc} \begin{document} Comma delineation of consecutive footnotes fails upon conversion to endnotes% \footnote{First note.}% \footnote{Second note.}.% \theendnotes \end{document}   How can one preserve automated comma delineation of consecutive endnotes? The book says:     Concentration. Some spells require you to maintain concentration in order to keep   their magic active. If you lose concentration, such a spell ends.   So what happens if, for example, you are already concentrating on a spell, and cast Witch Bolt without concentrating. Would you get the initial arc of blue energy, or would it not even go off?  I am asking if you can cast a spell that says concentration without concentrating for an immediate effect. This would be useful to avoid interrupting your existing concentration. In essence, if you are concentrating on thing A (doesn't have to be a spell since other things need concentration), can you cast a concentration spell getting an immediate effect without losing concentration on thing A?  Since the definition of concentration is to keep the spell active (meaning it is already active) I would think that you would get the initial effect (if it had one) without the need to concentrate on it. Why can charges outside be ignored in Gauss's Law? In MIT's 8.02 course, it is shown in lecture 3 that we can derive Gauss's Law from Coulomb's to get  $ \phi = \oint \vec{E} \cdot \vec{dA} = \frac{Q_{enc}}{\epsilon_{0}} $  However, in the lecture, it was assumed that there were no charges outside the surface. Later, Gauss's Law was used and the charges outside the sphere were ignored.  I've been thinking about it and came across .  The first answer by user levitopher helped a bit. I think that the lecture's argument still holds when there are charges outside because $ \vec{E} $ is added vectorially.  Suppose we have $ Q_{enc} $ in a sphere and $ Q_{out} $ outside the sphere. Then,  By definition, $ \phi = \oint (\vec{E_{Q_{enc}}} + \vec{E_{Q_{out}}}) \cdot \vec{dA} $ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + \oint \vec{E_{Q_{out}}} \cdot \vec{dA}$ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + 0 $ $ = \frac{Q_{enc}}{\epsilon_{0}} $  This assumes that $ \oint \vec{E_{Q_{out}}} \cdot \vec{dA} = 0 $ because any field lines that go in must come out (hand wavy but I'm just going to accept it for now).  I'd just like to know if this argument is sound. A machine is described as being "really slow" or "freezing". How can I troubleshoot/resolve this issue? What should be the first steps to take? Referencing to "above" or "below"? I'd like to install both Ubuntu 12.04 and Windows XP on a Dell laptop, and I was thinking about using a dual boot structure, and using the bulk of my hard drive as empty hard drive space to share files between the two operating systems (so choice of file system type is very important in this set-up).     The kind of partitioning structure I would like to use is  Partition 1 - Ubuntu 12.04 (root) (20GB)  Partition 2 - Ubuntu /home        (20GB)  Partition 3 : Free Space          (560GB)  Partition 4 : Windows XP          (35GB)  Partition 5 : SWAP                (3GB)  (Total Hardrive Capacity is ~640GB)    My question is; what is the best way to go about setting up this kind this system?   Should I install Windows XP first and setup the partitions, and then install Ubuntu which I believe will install the GRUB bootloader for OS booting choice   or   Do I install Ubuntu first, setting up the available partitions and then perform a WIndows install?  Please let me know if there is anything in this setup that I have left out and should know about, including things related to setting particular partitions as logical or primary, and whether the boot partition and the filesystem partition should actually be two separate partitions. Static nested class in Java, why? I want to convert .mov to .mp4! I saved the video from iMovie but it is in .mov format! How do I convert it to .mp4?  I'm using a MacBook and I want to share it to my phone, but my phone can't open .mov format video. Same e-mail user, different address? How to fix pagination for custom loops? Why is there an "electric" potential drop across the resistor? An electric potential difference is created when two charges are separated. In a capacitor, there is a clear accumulation of opposite charges on the two separated plates, therefore work has to be done in moving an unit charge from one plate to another, against the electric field.   But, , a potential difference is created in a resistor due to the heat produced by the collision and increased lattice vibrations. So there is an energy loss across the resistor, yes, but how does this energy loss due to heat create an electric potential difference. In other words, do electrons accumulate on one or both sides of the resistor? If not, why should we do electric work in moving from one end of the resistor to another. If the difference in energy is not due to electric work, then that's not electric potential, is it? Consider these two sentences: "I gave him a pencil," and, "I gave a pencil to him."  Is it correct that the important part of the sentence is placed at the end? When we want to emphasize the pencil that I gave him, must we say, "I gave him a pencil?" When we want to emphasize that it is him to whom I gave a pencil, must we say, "I gave a pencil to him?" If I recall it correctly, this book has two main characters, both male, one of them big and well muscled. During the novel, they found evidence that the current human race descends from ancient Martian astronauts who traveled to Earth in prehistory, causing the extinction of prehistoric Earth humans, (which explains the Missing Link in human evolution).  Later in the novel the big guy travels back in time (no idea of how or why) to Prehistory.  And near the end of the book, the other main character, during an archaeological field research, finds remains of a human being who lived thousand of years ago, a human with large bones, and who holds an item that could not be made in that era (a gold plaque? A metal rod?)  That's all I can remember. I know it is not from the ABC, Asimov, Bradbury or Clarke.  Thanks in advance. Using one group separator for integer part and another for decimal part (siunitx) I thought I was able to do something like this before, but I can't find my solution.  I would like to format my large numbers as follows:   12,504.3124 2359 3   I know I can use siunitx to partially set this up, but I'm not getting the results I want:  \documentclass{article} \usepackage{siunitx}  \newcommand\aenumA[1][4]{%%   \num[group-separator={,},        group-digits=integer,        ]}  \newcommand\aenumB[1][4]{%%   \num[group-digits=decimal,        ]}  \pagestyle{empty} \begin{document}    \aenumA{12504.312423593}    \aenumB{12504.312423593}  \end{document}   I would like a hybrid solution (commas in the integer part and spaces in the decimal).  I would actually also like to be able to group differently between the two: every three digits in the integer part, every four digits in the decimal part.  Is there a straight-forward way to do this with siunitx?  Or, do I need to split the number at the decimal and treat the two parts separately and then glue them back together? jQuery get the rendered height of an element? Flag apron shows superfluous closing anchor tag I awoke this morning to a spam flag on a site I moderate, and noticed this when I went to read the post.    Notice answered&lt;/a&gt;, which I imagine isn't meant to have the &lt;/a&gt; there.  I also confirmed that this displays asked&lt;/a&gt; for other types of flags (namely, closed without comment).   I looked around for a duplicate of this but can't seem to find it, so maybe it's a recent change? command to display time (duration) in human readable form I spent 3 hours trying to write a command to format a time (duration) expressed as a floating number (in seconds) in a nice form as follows:  if the time is &lt; 60 write as a float with 3 decimals (i.e. milliseconds)  else let h,m,s be the hours, minutes and seconds corresponding to the time      if h=0 then write as m:ss (ss always with 2 digits, m can have only 1)      else write h:mm:ss (mm and ss with 2 digits, h can have only 1)   So 1.25678 gives 1.256, 125.35 gives 2:05, 18249 (which equals to 5*3600+4*60+9) gives 5:04:09.  I tried several packages for the comparison/formatting. No success. Can someone help me ? Thanks !