Please pardon me if you find this question very silly but this doubt has been troubling me for some time now whenever I want to run a regression.  I am working on SAS. I have a dataset which has 24,000 observations, and there are about 50 independent variables. There are no missing values and/or outliers. Dummy coding for categorical variables is also done. So, data preparation is complete. Now, when I run a regression model on this dataset, there are a few variables (8 variables) for which p-value is > 0.05 i.e. these variables are insignificant.  My question is what next? Do we remove these variables from the final regression equation? So, instead of having 50 independent variables, we'll have 42 independent variables (42 Beta coefficients + 1 for constant). Or do we need to remove one of these insignificant variables and re-run the regression model to see if there's any previously insignificant variable becomes significant now?
I have several covariates in my calculation for a model, and not all of them are statistically significant.  Should I remove those that are not?  This question discusses the phenomenon, but does not answer my question:   There is nothing in the answer to that question that suggests that non-significant covariates be taken out, though, so right now I am inclined to believe that they should stay in.  Before even reading that answer, I was thinking the same since a covariate can still explain some of the variance (and thus help the model) without necessarily explaining an amount beyond some threshold (the significance threshold, which I see as not applicable to covariates).  There is another question somewhere on CV for which the answer seems to imply that covariates should be kept in regardless of significance, but it is not clear on that.  (I want to link to that question, but I was not able to track it down again just now.)  So...   Should covariates that do not show as statistically significant be kept in the calculation for the model?  (I have edited this question to clarify that covariates are never in the model output by the calculation anyway.)  To add complication, what if the covariates are statistically significant for some subsets of the data (subsets which have to be processed separately).  I would default to keeping such a covariate, otherwise either different models would have to be used or you would have a statistically significant covariate missing in one of the cases.  If you also have an answer for this split case, though, please mention it.
First of all, I swear this is not homework, it's a question I was asked in an interview. I think I made a mess of it (though I did realise the solution requires recursion). Here is the question:  Implement the count() method which returns the number of nodes in a tree. If a node doesn't have either a left or right child, the relevant getXXChild() method will return null  class Tree {    Tree getRightChild() {     // Assume this is already implemented   }    Tree getLeftChild() {     // Assume this is already implemented   }    int count() {     // Implement me   } }   My reason for asking the question is simply curious to see the correct solution, and thereby measure how bad mine was.  Cheers, Tony If router is off for a few days, do you have an ip address as far as ISP is concerned? I have an ISP which assigns IP addresses dynamically. If I go out and turn my router off I am always assigned a new one once I turn it back on. Does that mean that...  1) my previous IP goes elsewhere when my router is turned off?  2) i dont actually have an IP address if my router is off for a day or more? How do I play Minecraft with people online, besides using a server? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ I am looking for      an example of a ring where unique factorization does not hold. However the ring is supposed to have the property that every irreducible is already a prime.    So unique factorization should fail because one cannot decompose every element into a finite product of irreducibles. In particular the ring must not be Noetherian. What is an example of such a ring? How to appeal to undelete an answer deleted by moderator? How can someone make an appeal to un-delete an answer that was deleted by a moderator?    There should at least be an appeal/vote process, if the deletion was unfair. Moderators are humans like rest of us, and they can be unjust. The reciprocal of many prime numbers p in base 10 have a set of repeating digits p-1. Why? I've noticed that the reciprocal of many prime numbers have a curious number of digits. For example. 1/7 has 6 repeating digits, 1/17 has 16 repeating digits, and 1/47 has 46. There's a rule here that makes this pattern, and I haven't quite figured it out. Does anyone have some insight on this?  There are a few other numbers that follow the pattern subversively. For example, 1/3 has two repeating digits: 33. 1/11 has ten repeating digits: 0909090909. The number 1/13 has a set of six that repeats twice, which makes a set that's 12 digits long.  For reference, here is a website that lists reciprocals of numbers 2 through 70, including non-primes.   The ones that break the rule are 1/2 and 1/5, but they seem to be a matched pair, where the 2 and 5 switch places in the equation 1/X = Y/10  What is the rule that makes this pattern? I'm very curious. I recently ran across elliptic curve crypto-systems:    (Brown University)  (Wikipedia)  (IEEE)  (RSA.com)   It seemed to me to be great alternative to RSA as the de-facto cryptosystems to be used in banking and financial systems and in the public key infrastructure for certificates, but is not used! If someone can explain why this is not done, it would be very helpful. A comparison between traditional RSA and an elliptic curve cryptology would be helpful.  To begin with:  Advantage of RSA:   Well established.   Advantages of elliptic curve:   Shorter keys are as strong as long key for RSA (see the IEEE paper) Low on CPU consumption. Low on memory usage. Passing functions to setTimeout in a loop: always the last value? Okay, this should be super easy to do but I just can't find the way.  I have a background image with a solid colour layer on top of it, and I would like to add text on top of everything in such a way that the filling of the text is the image in the background. I have tried selecting the text shape and deleting that selection shape in the solid colour layer, but it just looks wrong.   Can anyone help me with this? Many thanks in advance. "May I have a glass of water" vs. "Can I have a glass of water": which is better, "may I" or "can I", when asking for something? What is the correct sentence when asking for something like while flying asking for a glass of water :     May I have a glass of water     or      Can I have a glass of water I need to do a polynomial interpolation of a set $N$ of experimental points; the functional form I have to use to interpolate is this:  $$ f(x) = a + bx^2 + cx^4,$$ as you can see the coefficient that I need to find are just 3: $a, b, c$; however the points I have are $\#N&gt;3$ and so it looks like the determination of the coefficients is impossible because is over-determined. Does anyone have an idea of what should be done in such case (supposing it is even possible)? Why can't I associate files with Excel after upgrading to 2010? Can I have too many mods? I found a lot of mods that make thinks lighter, and add mark and recall, and a basement I like. They are all on Steam, and what I want to know is if I can have too many? Will they all work together? Or should I just leave them alone? Can I transfer saved data from my old PS3 hard drive to my new PS3? A while ago, my PS3 completely broke. Every time I turn it on, it just completely shuts down a few seconds later. I decided to buy a new ps3 to play my old games. The problem is that I don't have my saved data, but I still have the original hard drive. Is it possible to somehow transfer the saved data from the old hard drive to my new PS3? I was thinking maybe I could clone the hard drive, but I don't have a spare hard drive to do it on. I do however have a 2 TB external hard drive. Would it be possible to clone it on the external? Are there any alternative methods? How to place the intercept of x and y axes at (0 , 0) and extend the x and y axes to the edge of the plot There is a command l available on my machine which appears to do nothing.  which l also produces no output. Is this a real command, and does it actually do anything? These questions are really bothering me. Any help would be much appreciated.  Let $p$ be prime  a) If $(G, \oplus)$ has order $2p$, prove that every proper subgroup of $(G, \oplus)$ is cyclic  b) If $(G, \oplus)$ has order $p^2$, prove that $(G, \oplus)$ has a subgroup of order $p$ Where should looking-for-resources questions go? Questions like looking for css templates, blog templates, icons ... In general, resources (let's leave the licensing terms aside for now) which you might need when building a project of your own. Where should those questions go?  They're definitely not on-topic on Stack', SuperUser maybe although I doubt it. Webapps? Hmm, probably not.  Is there a place where they would be on-topic on the SE network? $V$ be a vector space , $T:V \to V$ be a linear operator , then is $\ker (T) \cap R(T) \cong R(T)/R(T^2) $? Let $V$ be a vector space , $T:V \to V$ be a linear operator , then is it true that   $\ker (T) \cap R(T) \cong R(T)/R(T^2) $ ( where $R(T)$ denotes the range of $T$ ) ?    I know that the statement is true when $V$ is finite dimensional as I can show that if $V$ is finite   dimensional , then $\dim (\ker (T) \cap R(T))=rank (T) - rank (T^2)=\dim R(T)/R(T^2)$ ,   but I don't know what happens in general . Please help . Thanks in advance