tttjjj/elt_bench huggingface dataset:
$R^2$ tells you the fraction of the variation in $y$ that can be predicted using $x$. That seems to be the statistic that you're looking for. Run a regression of $y$ on $x$ and $x$ multiplied by a dummy indicating whether you are in time period 1 or not, plus the period 1 dummy itself. Technically, this would measure how well knowing $x$ and the time period improve your prediction of $y$. For just the impact of $x$, regress $y$ on an intercept and the time period dummy. Then, regress the residuals from that regression on $x$ and $x$ times the time period dummy.
@ Joel Thank you .proc sql;CREATE TABLE PROCCD AS 
select provid,proccd, sum(reimbamt) as total,when proccd between '90801' and '90804' then 'proc61'when proccd between '90806' and '90809' then total is the total reimbursement amount for a provider. I am determining what percentage of total for a provider is on a certain procedure code group.  My groupings did not show any pattern.  I was thinking as the percentage (predictor) increases the total (response) would also increase.  This way I can find the outliers. I think the grouping should be based on the expensive and cheap procedure codes.
Thanks Andre Silva for your response. Here is the link [link] (http://postimg.org/image/vd6ltakm9/) Thank you very much!
Couldn't you just have deeper trees to minimise the poor fit to the tails?
How can _ordinal_ scale (which is categorical, not just discretized) can ever have a specific mean?
(+1) Clear explanation. Although I was asking something little different, your answer covers above 70% of my question.
Actually, looks like something like this already exists: the minimum hypergeometric test: http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.0030039#s4
Good explanation (+1). I would add, however, that the sample size needed for the distribution of means to approximate normality depnds on the degree of non-normalness of the population. For large samples there is no reason to prefer a t-test over a permutations test that makes no assumptions about the distributions.
What do you mean for pz(z|Y=i) in the summation? is it conditioning Pdf?
can you add an example of your data?
If the issue is the fact that your data can have negative values, well can't just shift it to the right? It seems like that your function has compact support on the left, this facilitate your work.
Thanks very much. Yes I thought having multiple values for each x value was the point of regression. But then I was getting confused because of my deeply ingrained notions of functions and all that. But you're post removes any doubt. I'll tinker with R and figure out just how to do this, but I've got some ideas and you're link will help on that end as well. I can't upvote b/c of reputation, but I'll make a mental note to come back to this page once my rep goes up. Thanks again.
If you eat Hamburgers _every_ Tuesday, the probability of you eating a hamburger in any given week is 1.
I think that the code should be `model=lmer(...)` (or `mod <- lmer(...)`).
I think you should probably submit the "how do I specify crossed random effects" as a separate question on StackOverflow, if http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg10849.html doesn't answer your question.
Small correction: 1.6^5 should be (3*1.6) ^5. Thanks!
@JohnA.Ramey: What is the difference? Once it's all numbers, aren't "male" and "female" just labels for samples?
Even if the individual questions are different across sessions, there's some benefit to getting familiar with the format and the type of questions. If you take the SAT twice, you're likely to better the second time around. In theory, one could model this out, but I'd be surprised if anyone actually does....
(+1) All three of those papers are worth a careful reading for those interested in this subject. The Dantzig selector paper has some very nice math; however, I have not seen it get much traction in applications, nor do I expect it to. I think, among other things, the very noisy regularization paths make people nervous and so, with no obvious benefit over the lasso, make it a hard sell.
I have added some explanations.
@MYaseen208 I edited my answer to show the eigenvectors as the ellipse's axes. Half the axes' length equals the square-root of the corresponding eigenvectors.
Thank you for the reply, this is helpful. I am just not sure which model is the correct model and whether I should inlcude | NOINT or not. I don't have any expectations that one species has a larger pupil-size than the other. That is not of interest. I am interested in the three-way interaction between species_subject, same_different, stimuluscondition, to see if the mean pupil size is different, but also if the slope is different.
For testing the independence of the two variables, the summation in your formula should be over the number of observed cells, and not only the number of rows. What you describe corresponds to a [GOF test](http://bit.ly/nyUzys), which is not obvious from the question. As we are about to speculate about that, we could imagine variation around RxC tables whereby one of the the variable might be treated as an ordinal outcome, like in [this question](http://bit.ly/ol8NkG), but I believe we have to wait for further clarifications :)
I tried to resist but could not.  Have you read Arthur Goldberger's wonderful chapter on micronumerosity?  It's quoted in full in this blog post:  http://davegiles.blogspot.com/2011/09/micronumerosity.html
For extending the line, would there be data points in this area? Or are you talking about extending the line past your data points?
@rolando2 thank you!
@MarcClaesen and what should be I learning: AR model or distribution of parameters of AR models?
At the risk of sounding a bit silly... where on the SPSS output would I find the delta R^2?
In the package arm there is the fucntion bugs, which allows you to call bugs from R. That's what I use in my reasearch. In the Gelman's blog there is an example of caling winbugs by R.
Are you interested in assessing linear trend only (my response citing $M^2$ association test [here](http://stats.stackexchange.com/a/9096/930) would apply equally well), or possibly symmetry in the two-way table (e.g. quasi-symmetry for square table or quasi-uniform association, as described on this [thread](http://stats.stackexchange.com/a/5258/930))?
I'm wondering why you don't use numpy (which is simpler to understand if you are not coming from an R background) http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.lstsq.html
Wow I largely overlooked the _replicate_ function but the code John suggested acts in exactly the same way as the one above. Sure there is a problem with V/CV matrices but I don`t know how to compare covariance patterns if not through V/CV matrices comparison...
Can you write in the question what did you try with the package GAM. Maybe I can help you
Could you put $ signs around the LaTex? It now will be rendered.
10 variables and every variable have two levels. (20,20)
I am not super familiar with Statistics, so I don't know the correct terms for describing the data. But I will try and describe it:

I am looking at the page length of letters. The 7 groups are different 'themes'. If a letter includes information on one of the 7 themes, then I include that letters page length under that theme group.

For example, one letter is 8 pages, and includes information on Theme 1, 3 and 4. So under 1, 3 and 4 I would have '8' as a data entry.
Therefore the sample is not perfectly matched.

I hope that is kind of clear.
A,B,C are three players, A,B=1200 and C=1400, Then probability of A winning a game with B is 50% i.e `P(A/B')=0.5`. Similarly `P(B/A')=0.5` and the probability of C winning is `P(C/A'&B')=0.76` where `A'` (for example) is the complement of `A`. That is your question?
Hint: To obtain an answer, think about what happens to each correlation measure under an arbitrary strictly monotonic transformation.
It looks more like SPSS code to me
You are abusing terminology here.  Excel is not statistical software.
Not really a solution, but why not simply email the authors with your question?  Most academics are more than happy to answer questions/emails about the work they have published.
Uhm, not enough information. If you really only have feature vector, you won't get much of a prediction. Unless the later input to the classifier is *exactly* what you trained it with. In this case an SVM is overkill, just check for the known sequence. In any other case you'll at least want some negative examples. And why an SVM? It seems you want to map to multidimensional data. I'm not aware of a proven method to even do that with an SVM. What data do have and what do you expect?
Afterwards, I noticed that the problem is much easier if I define $Z = f(X)$ so that the (Z,Y) distribution has only one more dimension than $Y$.  Then, at least for gaussian kernels (and others that satisfy a few conditions), the formula I provide for $\\widehat{g}(y)$ is equal to the plug in estimator from the kernel density estimate of the joint density of (Z,Y).  This probably solves my problem unless someone has a better idea.
@Christopher Aden: that is true, thank you for pointing out the error! I corrected in the answer.
Hi @KathrynCoster, welcome to CV. If your question really is 'what does SPSS do when I click the Bonferroni button?' then it's not a statistical question, but a question about what steps program does in response to a command, which is a computing question, and would belong on Stackoverflow. However, I think there's potentially a real statistics question here. Could see if there's a way to rephrase or extend the question, to make it more clearly a question related to statistical issues?
... and then of course there's Metropolis-Hastings, with the original Metropolis paper back in 1953 and the Hastings 'update' in 1970...
eg ["global optimization for neural network training"](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.189) by shang & wah
@cardinal, what sort of misinterpretation do you mean? As for y-axis labels, the 3rd graph to me is "log(price) detrended" while the 2nd graph is simply "residuals".
A difficulty expressing whether arithmetic/multiplicative scales are preferable, is that the very word "difference" strongly suggests subtraction and the arithmetic scale (if read too literally, the difference between 10 and 20, or 1000 and 1010, _is_ 10). I suppose another way to express the distinction, is that if a "_proportional_ difference" is more appropriate then a multiplicative scale is preferred. Let's say sex is one of the binary IVs: is (1) "on average women give 18 dollars more than men" more appropriate than (2) "on average women give 23% more than men"?
Thanks for your answer, It is useful but still something is not clear to me. I updated my post adding a new question.
I wonder about this use of "response." Our intended audience would likely understand that to mean the *observed* response: yes or no, 0 or 1, etc. In logistic regression we model something *unobserved* (and never directly observable); namely, the hypothetical chance of the response. The "link" merely is a matter of expressing those chances as log odds rather than as probabilities. Logistic regression assumes the log odds vary linearly with the IVs. (My use of "model," "assume," and "hypothetical," rather than "is" and "predict," indicates a different cognitive and ontological viewpoint, too.)
Thanks Dan - I understand polynomial features for numerical values e.g. let input X matrix contain columns(numerical) x1, x2, x3. poly(X,degree=2) would return polynomials combinations of input variables. However I do not understand creating polynomial features out of factors.
My endogenous and treatment var's change over time, but my treatment is an ordered variable.  Is it possible to use the DiD method with a non-binary treatment (ie a 'dose' treatment)?  I know I could choose a value of my ordered treatment and generate a 1/0 var, but then I lose information.
(5) "An Introduction to Bootstrap Methods with Applications to R." M. R. Chernick and R. A. LaBudde (2011) Wiley.  For articles related to time series methods try to Google key words like circular block bootstrap, moving block bootstrap, wild bootstrap, stationary bootstrap and authors such as S. N. Lahiri, J. Romano, T. DiCiccio and D. Freedman.
95% of 40 is 38, so no more than 38 should fall outside :)
Thanks for the answer! (1) "if a function of T has mean value not dependent on θ, that mean value is not informative about θ", how could we "get rid of it to obtain a sufficient statistic  simpler"? (2) Why does   completeness ["ensures that the parameters of the probability distribution representing the model can all be estimated on the basis of the statistic: it ensures that the distributions corresponding to different values of the parameters are distinct"](http://en.wikipedia.org/wiki/Completeness_(statistics))? please also see my question here http://stats.stackexchange.com/q/53107/1005.
It might help if you showed us some data (invented if necessary) which illustrates your question.
Could you please be a bit more detailed? As in -- what is your response, your explanatory variables, and what correlations are you interested in? You might not Fisher's transform for testing correlation, a simple t-test may be sufficient.
Nice comment but standard np tests do not compare medians.  They relate to the Hodges-Lehmann estimator and pseudomedians (median of all possible pairwise differences).
Check if the *p*-values from pearsonr() and the z-transformed approach are similar!
+1. That demonstrates that the probability for a given card to end up in a given position approximates the expected ratio as the number of shuffles increases. However, the same would also be true of an algorithm that just rotates the array once by a random amount: All cards have an equal probability to end up in all positions, but there is still no randomness at all (the array remains sorted).
No, I'm sure I don't have missing values. Both the models are trained on the same dataset and prediction is done on identical test datasets.
Furthermore, can you show what you've tried?
many thanks for your comments. My data has been added to the question above.
Thanks. I was thinking about increasing weight for minor class. However, I can not see anything in RandomForest classifier (there is in SGDclassifier)
There's also a discussion of a two-sample t-test with n=1 vs n=3 [here](http://stats.stackexchange.com/questions/44475/is-there-a-statistical-test-to-compare-two-samples-of-size-1-and-3/44476#44476); caveats are discussed. So not only is it possible, it's been discussed multiple times here on CV. With an ordinary ANOVA with 3 groups I think your smallest feasible n's would be 1,1 and 2 (in any order) - one of them needs 2 to calculate a standard deviation; any fewer - (1,1,1) - would require nifty tricks like those mentioned in comments under one of @whuber's links which make it not ordinary.
This is a well-studied issue. You are asking about estimability of parameters in regression, specifically about interaction parameters. This question is usually taken up in the study of experimental design, where the objective is to make sure the data will support the intended inferences. If you want a full assessment of all possible interactions, then you must also have a case where a, b, and c are all present--and preferably more cases than that. And yes, three-way (and higher) interactions are possible.
I was hoping to get some p-values and pvals.fnc() will only work with the most simple random effects structure.
Ok, this makes sense. Thanks for the input!

I notice that the Wikipedia page for the median test says the non-paired Mann-Whitney-U test is preferred. This immediately makes me think that I'm sort of back where I started, thinking that the paired Wilcoxon test somehow uses more of the information.  

Perhaps what I am really trying to think through is what you mean when you say "care specifically about the median ...or about the entire distribution."  I care about the entire distribution, but am characterizing it through the median..
Hi, James, and welcome to Cross Validated! Is there a particularly reason you don't want to use regression? It's a fairly large family containing some very powerful tools....
Small extension about plots: `plot.randomForest` shows how OOB error and in-class OOB error evolved with increasing number of trees; `varImpPlot` shows attribute importance measures for top attributes and `MDSplot` all objects plotted on the 2D projection of RF object proximity measure.
Sir, It may also be an interesting case, like, "Binning data has the advantages of simplicity and avoiding the need to make any particular explicit assumptions about the mathematical distribution (such as Gaussian or Poisson) of the data" in http://msdn.microsoft.com/en-us/magazine/jj891056.aspx. NLTK Google Group has no answer though. Regards, Subhabrata Banerjee.
Wow, awesome response! Just to let you know: in Stata there's a system macro (`c(alpha)`) that returns all the lowercase letters (a-z). So, instead of defining the local macro `letters` to loop over `a b c d`, you can loop directly over the first 4 elements of `c(alpha)`. (Sorry, I've noticed only now that this question is rather old).
(+1) I have implemented LDA and RDA in Matlab - most often this error arises when many of your features are highly mutually correlated.
there is a typo in your statistic, the square is on the top, not bottom
1) Of course you may use factor scores for future analysis if it is reasonable for you to do. 2) Computing the mean (or sum) of highly loaded variables is just another way to arrive at 'factor scores'. (The _true_ factor scores can never be computed, so alternative methods to approximate them are warranted and ultimately of equal worth.)
@Andre Silva http://en.wikipedia.org/wiki/Metric_%28mathematics%29.
Thanks a lot. That was a neat little trick :).
First, what's wrong with the full model? What's it for? Does it perform badly under cross-validation? If it ain't broke don't fix it.
The main difference is that my question concerns the multinomial case. Thanks for good reference anyway!
Could you please edit your question to reflect what you've tried so far, and the reasons why it won't work? (in other words, could you edit your question to add what you just said, instead of leaving those in comments?)
@Aniko - Yes, that would be the total sales for the yo-yo's only.
Thank you, somehow because $R$ is uniform, I thought simulating it once would be enough.
Because the tests depend on interdependencies among the correlation coefficients, please tell us more about where they come from. In the meantime, please review some of the questions here related to correlations. As a start, scan over [this series of questions](http://stats.stackexchange.com/users/6096/adhesh-josh?tab=questions) asked by a user with a very similar problem: you might find answers in those threads. Please note, especially, this community's cautions about using only correlation coefficients to investigate relationships among variables and the alternatives that were suggested.
+1 Good advice and good references.  It's difficult to think of what use a "random" model would have: no method is universal, so one needs to test it on data that are characteristic of the intended areas of application.
Strictly, PC2 is the linear combination *orthogonal to PC1* which describes the next most variance in the data.
How about for GLM and/or logit?
in a mathematical sense, @Glen_b is correct. In a practical sense, "acceptable" values of $R^2$ depend on the field. One of my psychology professor in grad school was married to a professor of physics. She said "if we get an $R^2$ of 0.9 we know something is wrong: It can't be that high" and he said "If we get an $R^2$ of 0.9 we know something is wrong: It can't be that low!" :-).
Let me know how does it go
It's a little unclear what you want. When you say you just want one result for cor(matrix1, matrix2), are you trying to correlate (all the numbers in matrix1) with (all the numbers in matrix2)? In that case, you could try cor(as.vector(matrix1), as.vector(matrix2))
@mpiktas Please see my update. But your interpretation is correct, except it's 0.3%
Thank you! You showed I should operate algebraically from $ E(\\hat\\theta)$ until I get $ E(X) $, and then compute $ E(X) $ which will eventually be a function of $ \\theta $. Once I understood that, I could move on with these exercises.
Oh, well in that case, glad I could help! ... Working with Time Series can get really confusing because there's a lot of stuff that is just like the basic regressions you've seen before but then there's also a lot of additional, time series-specific stuff to be mindful of. [Just sort of throwing that out there, I guess]. Anyway, a common approach to out-of-sample testing (if you have, say, two different models you want to compare) would be to calculate the **RMSE** for the two models (using that out-of-sample sample) and then choose the model with the lower **RMSE**...
The relationship between X and y has been established before in prior research and is a linear relation. With regard to z there is also evidence of a linear relationship. I was wondering if the problem was with the separation of positive and negative values.
Thank you aaron for the detailed answer. Indeed my uncertainties as I decided to call them are normally distributed as each of my data point comes from a different Monte-Carlo, my problem was/is that they come with very different orders of uncertainties $\\sigma_i$ and so I was looking at way of weighting them (as with the $\\frac{1}{\\sigma_i^2}$ weight in linear fit but tuned for power law fitting. It seems very wrong to me that they have the same influence in the power law coefficient when some are much more reliable than others. I will look into the binning method
@Peter See http://stats.stackexchange.com/a/1836/919 for why $N=1$ can work. $N=2$ is usually needed in order to estimate the variability. In applications where observations are sufficiently expensive, $N \\gt 2$ may be considered extremely *large*. (I work in a field where (a) private parties pay for observations which are (b) required by government regulations that (c) are viewed as a burden and, in the worst situations, (d) an observation (actually a monitoring station) can cost \\$100K or more. If you want to tell my clients they need a larger $N$, you had better have a *great* reason!)
There are 36 opportunities for the acf to go outside the lines. The probability it does so (for white noise) in each case is 5%. Now 36 $\\times$ 0.05 = 1.8. That is, you expect about 2 to go at least a little over the line *if it were truly white noise*. Even more telling, the probability you'll see *fewer* than 2 outside the limits is only 45.7%. You're more likely to see *at least 2* than *fewer than two*. So again, why are you concerned?
More details are needed here - "Monte Carlo simulation" is something of a catch-all phrase for repeated random draws from a distribution. It is not in an of itself a predictive technique.
The question is "is that distribution skewed toward small values?" (against the null of uniformity). The answer is "it sure is".
@AnthonyDamico and StasL: Added the data.
@cbeleites Hi cbeleites, Just let you know that Prof. Lin added this to their FQA. http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f425   Thanks
Thank you very much. Now it makes sense to me.
@el chief: On Stackexchange sites, it is allowed to copy and paste answers from other resources. I give the source link along with the answers. It's pointless to give -1 to a right answer. See meta for what is allowed here and what is not; and a big -1 from me to your behavior!
This question appears to be off-topic because it is about how to get some software to make your plot look the way you want.
@PraneethVepakomma: check out my answer at http://stats.stackexchange.com/questions/562/when-to-use-multiple-models-for-prediction/25127#25127
Then formulate your question in a way so that it is understandable what the problem is.
Please unfold abbreviations "LDA", "TF-IDF", "HDP" in yout question. Not everybody knows these acronyms.