I am reading about 'interaction effects on linear regression'  and came across 'stepwise linear regression'.   There are originally 5 predictors in the model. This means to say that by using the ordinary linear regression, we have $ Y = c + a_iX_i$ where $i = 1,...,5$.  Then it says here: For the initial model, use the full model with all terms and their pairwise interactions.  The succeeding steps involve what it calls 'stepwise linear regression'.  I am confused by this statement. Can anyone please give an insight on what 'stepwise linear regression' is all about? What are its advantages and why does it need to be done?
Although the merits of stepwise model selection has been discussed previously, it is becoming unclear to me what exactly is "stepwise model selection" or "stepwise regression". I thought I understood it, but not so sure anymore.  My understanding is that these two terms are synonymous (at least in a regression context), and that they refer to the selection of the best set of predictor variables in an "optimal" or "best" model, given the data. (You can find the Wikipedia page , and another potentially useful overview .)    Based on several previous threads (for example here: ), it appears that stepwise model selection is considered a cardinal sin. And yet, it seems to be used all the time, including by what seem to be well respected statisticians. Or am I mixing up the terminology?  My main questions are:   By "stepwise model selection" or "stepwise regression", do we mean: A) doing sequential hypothesis testing such as likelihood ratio tests or looking at p-values? (There is a related post here: ) Is this what is meant by it and why it is bad? Or B) do we also consider selection based on AIC (or similar information criterion) to be equally bad? From the answer at , it appears that this too is criticized. On the other hand, Whittingham et al. (2006; )1 seems to suggest that variable selection based on information-theoretic (IT) approach is different from stepwise selection (and seems to be a valid approach)...?  And this is the source of all my confusion.  To follow up, if AIC based selection does fall under "stepwise" and is considered inappropriate, then here are additional questions: If this approach is wrong, why is it taught in textbooks, university courses, etc.? Is all that plain wrong? What are good alternatives for selecting which variables should remain in the model? I have come across recommendations to use cross-validation and training-test datasets, and LASSO.   I think everyone can agree that indiscriminately throwing all possible variables into a model and then doing stepwise selection is problematic. Of course, some sane judgement should guide what goes in initially. But what if we already start with a limited number of possible predictor variables based on some (say biological) knowledge, and all these predictors may well be explaining our response? Would this approach of model selection still be flawed? I also acknowledge that selection of the "best" model might not be appropriate if AIC values among different models are very similar (and multi-model inference may be applied in such cases). But is the underlying issue of using AIC-based stepwise selection still problematic?  If we are looking to see which variables seem to explain the response and in what way, why is  this approach wrong, since we know "all models are wrong, but some are useful"?   1. Whittingham, M.J., Stephens, P.A., Bradbury, R.B., &amp; Freckleton, R.P. (2006). Why do we still use stepwise modelling in ecology and behaviour? Journal of Animal Ecology, 75, pp. 1182–1189.
I'm trying to have a surface with soft body hold obects that are falling on it with rigid body physics, but for some reason, no what matter what mass I give it, the objects just fall trough the softbody enabled surface.  Is there a toggle or a value I need to change to make them stay there? I have created a VF page and used "render as pdf"  &lt;apex:commandButton value="Save to Opportunity" action="{!savePdf}"  /&gt;   Its working fine when i am using above line without rerender and oncomplete but when i am adding rerender or oncomplete it is not working.I am able to save the PDF in attachment folder but when i am trying to open its showing  "Unable to load document"  Even if i remove oncomplete and use Rerender then also its saving the attachment in Attachment object and when i view ,it is not loading and says "Unable to load document"      &lt;apex:commandButton value="Save to Opportunity" action="{!savePdf}"  oncomplete="myClose();"/&gt;   Javascript Code  function myClose(){      self.close();     window.opener.location.href="/{!$CurrentPage.parameters.Id}";  }   Class Code  public void savePdf() {      PageReference pdf = Page.GenerateQuotePDF;     pdf.getParameters().put('id',parentId);      Attachment attach = new Attachment();      Blob body;     body = pdf.getContent();     attach.Body = body;     attach.Name = 'Opportunity'+ '.pdf';       attach.IsPrivate = false;     attach.ParentId = parentId;     attach.ContentType = 'application/pdf';     insert attach;     }     Please help.. How to prove that a nilpotent operator has a basis representation that is strictly upper triangular? Making data points different sizes based on data using QGIS? I am trying to plot sales data on a map using QGIS. I will add the disclaimer that I am a rookie at using the program. I added the different sales types by adding delimited text layers (utf16). The data included Longitude, Latitude, and Amount. I want to make the dots on the map scale with the value of the sale. Ive had no luck with trying to use Simple Marker->Data defined properties-> size and writing case functions. Some data points show up at different sizes while others show up at all data points. Here are my functions under different simple markers:   CASE WHEN Amount &lt;= 10000 THEN '.2' END CASE WHEN 10000 &lt; Amount &lt; 75000 THEN '.4' END CASE WHEN 75000 &lt; Amount &lt;= 250000 THEN '.6' END CASE WHEN Amount &gt;= 250000 THEN '1' END   The majority of my data set falls into the 10-75k range. However the .4 and .6 size circles show up at every data point on the map, while the .2 and 1 sizes only show up where the data specifies (along with the .4 and .6 sizes). At this point I am trying to figure out what is wrong with the equations, however I am stuck.   Is there a better way to go about this or am I just simply messing up the equations?   I wish I could share my whole map with you but it is looking great. I went with U/Joseph 's solution and here is an excerpt of the results for those interested. How to rename the User folder in Windows 10? Will be glad for a little hint: let x and n be positive integer such that $1+x+x^2+\dots+x^{n-1}$ is a prime number then show that n is prime Lie Algebra of U(N) and SO(N) I'm no expert in darkroom photography, but it seems a little odd that there is a type of light that doesn't affect film or developing paper etc. The only way that I could think to explain it is:   The low frequency red photons don't have enough energy to raise electron states in the film/paper, or Magic   either way, I'm curious to know how this handy tool is, as per title, safe. How do you prove that $\sum\limits_{n=0}^{\infty}{2n \choose n}x^n=(1-4x)^{-1/2}$? I tried to identify the sum as a binomial series, but the $4$ and the $-1/2$ puzzle me. (This series arises in studying the first passage time of a simple random walk.) Macro for figure position? Why is the following minimal example not working?  I.e., what do I need to do, in order to define the float placement specifier of a figure within a macro? (I know that I should use \newcommand, but in the "full" example the error is part of an involved "superfigure" command. \newcommand is not working too btw.)  \documentclass{scrreprt} \usepackage{blindtext}  \def\PosNotWorking{h} \def\FramboxNotWorking{5cm} \def\CaptionWorking{Caption is working.}  \begin{document}  \Blindtext[1]  \begin{figure}[\PosNotWorking]   \centering     \framebox[5cm]{My special figure. (Pos: \PosNotWorking)}             \caption{\CaptionWorking} \end{figure}  \Blindtext[1]  \end{document}   If I compile this, the figure is at the top (default behaviour). If I enter \figure[h] instead of \figure[\PosNotWorking], the figure is of course between the two paragraphs. Retail boxed Steam activated games: can they be resold? I recently purchased retail boxed versions of   Dead Island (which is awesome) Warhammer 40k: Space Marine (not so much)   I finished both games and I was thinking of reselling them or giving them to a friend to play. However, these are both Steam activated games that had a required Steam registration code I had to enter -- and validate on Steam -- as part of the installation.  If I give these games to a friend or resell them, will they even work? Is the registration code single use and tied to a single person / computer / Steam account? Given 4 integers, $a, b, c, d > 0$, does $\frac{a}{b} < \frac{c}{d}$ imply $\frac{a}{b} < \frac{a+c}{b+d} < \frac{c}{d}$? After installing Windows 10 on my  it took my user name 'Jeremy' and created a user folder named C:\Users\jerem.  I want to rename the folder C:\Users\Jeremy.  does not work. There are a couple of reasons.   OneDrive is now a fully integrated part of the OS, and it completely breaks.  A find/replace in the registry seems to work, but it's hard to be confident in that approach. When the computer is rebooted, the TabletInputService writes a TextHarvester.dat file to the old user profile location (creating it if needed). This makes it impossible to keep the folder deleted. An old  doesn't work. This issue also causes an error message to pop up every time the computer boots. "Welcome to the Jones__": Plural or Plural Possessive? When making a welcome sign, what form of the name Jones would you use?  ("Welcome to the Jones__") How do I compile a C# script at runtime and attach it as a component to a game object The idea here is to let users program the behaviour of an agent in a way that reminds of the "Screeps" game, where you get to develop code which later runs and dictates the behaviour of your units.  My idea is to let users develop the behaviour or their units with C# code, compile that code at runtime and attach it as a MonoBehavior to an existing game object.  How can I achieve this? Calculate daily sums using python pandas Driver for Validity Sensors Fingerprint scanner prakhar@pr3d4tOr:~$ lsusb -s 001:003 -v  Bus 001 Device 003: ID 138a:0018 Validity Sensors, Inc. Fingerprint scanner Couldn't open device, some information will be missing Device Descriptor:   bLength                18   bDescriptorType         1   bcdUSB               1.10   bDeviceClass          255 Vendor Specific Class   bDeviceSubClass        17    bDeviceProtocol       255    bMaxPacketSize0         8   idVendor           0x138a Validity Sensors, Inc.   idProduct          0x0018 Fingerprint scanner   bcdDevice            0.78   iManufacturer           0    iProduct                0    iSerial                 1    bNumConfigurations      1   Configuration Descriptor:     bLength                 9     bDescriptorType         2     wTotalLength           46     bNumInterfaces          1     bConfigurationValue     1     iConfiguration          0      bmAttributes         0xa0       (Bus Powered)       Remote Wakeup     MaxPower              100mA     Interface Descriptor:       bLength                 9       bDescriptorType         4       bInterfaceNumber        0       bAlternateSetting       0       bNumEndpoints           4       bInterfaceClass       255 Vendor Specific Class       bInterfaceSubClass      0        bInterfaceProtocol      0        iInterface              0        Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x01  EP 1 OUT         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x81  EP 1 IN         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x82  EP 2 IN         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x83  EP 3 IN         bmAttributes            3           Transfer Type            Interrupt           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0008  1x 8 bytes         bInterval               4   I have searched high and low but I cannot get this to work. All questions related to 138a:0018 are either unanswered or old. Any help guys? How to show $\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}=2^{n}$ What's the difference between the snap folder in /home/&lt;UserName&gt; and the snap folder in root (/)?  I'm trying to get a grasp on where programs and their files are stored when you install them.  The first and only program I have installed on my machine is Spotify.    I noticed that there were two spotify folders within two separate snap folders.  One in the home directory and one in the root directory.    Questions   Why are there two snap folders? Why are there two spotify folders? Are they different in any way (the snap and spotify folders)?     NOTE: I installed Spotify via the Ubuntu Software application, not via the Terminal. Experimental data for asymmetric Newton cradle Using a "successive impact model" (as if each ball were seperated from the other ones), I produced the following animations:    You can see any combination of balls with masses of 1 or 2 (left) or 1 and 4 (right).  Unfortunately, I do not have any Newton cradle to make some experiments, and I'd like to compare my results with observations. I contacted the author of , which is the most instructive one I found about asymmetric Newton cradle. In particular, he writes that the "OoO" configuration behaves as the "ooo" one, which is not what I simulate. But the author is not sure whether who is wrong because he did the experiments a long time ago.  I am especially interested in asymmetric Newton cradle with simultaneous impacts: left and right balls collinding at the same time.   Please let me know if you have any idea on where to find such experimental data.  Edit Just of few general remarks to avoid extending the comments.    Energy and momentum are conserved. However, they are sufficient to ensure uniqueness of the post-impact velocities only when there are 2 balls. The successive impact model precisely consists in propagating the impact ball after ball, and therefore leads to a unique solution (which conserves momentum and energy globally). From the waves point of view, changing the mass of a ball can be done by increasing the diameter, or the density (or a combination of both). This simple model cannot account for such subtleties of course, but maybe it does not matter when the balls are "small enough". Even if I think it's quite basic, following WetSavannaAnimalakaRodVance's comment, I am ready to hand out my Mathematica code to anybody who wants it. I'll check for good ways to share it.