tttjjj/elt_bench huggingface dataset:
@user1106711 I am glad this helped. I have been a little cryptic on the construction of the test: please consider that as each $2\\sqrt{X_{1i}} - 2\\sqrt{X_{2i}} \\sim \\mathcal N (0, 2)$, the sum $2\\sum_i \\sqrt{X_{1i}} - \\sqrt{X_{2i}} \\sim \\mathcal N (0, 2n)$ and you can do a $z$-test *with known variance* $2n$, you don’t need to estimate the variance from the data! In my opinion, this is the main strength of this *variance stabilizing transformation*.
the ME should be $1.645$ and not $0.82$
As far as I understand, h2o uses the map-reduce paradigm for minibatch-training. Single (CART) trees are not implemented as such in h2o (but I suppose an unpruned tree is a special case of random forest with just one tree and maximum choice of predictors?).
It is apparent that all four variables are residuals with respect to their location means (up to a tiny bit of rounding error in the least significant digits).  These data are worthless for testing differences in means.
I took the liberty of editing your question to make it easier to read. Please ensure that it still says what you want it to say.
The quoted reference is: Biswas AK, [Reliability of Total Test Scores When Considered as Ordinal Measurements](http://apm.sagepub.com/content/30/1/43.abstract). Applied Psychological Measurement (2006) 30(1): 43-55, p. 44.
Check out the `symnum` function - it can save a lot of `ifelse`s.
str(variable) is your best friend.
You need to differentiate *study design* (the logic guiding how you get your data) from *statistical analysis* (what inferences you make based on your observed data and study design).
Here is a good definition of a [primary sampling unit](http://srmo.sagepub.com/view/encyclopedia-of-survey-research-methods/n398.xml). An example could be if I were doing a citywide inspection of street sanitary conditions per street segment in D.C. I'm too lazy to walk around the whole city though. So what I do is take a random sample of a limited number of census tracts, and then take a random sample of street segments within those census tracts. Here the census tract would be the PSU.
Thanks, now this is quite clear to me!
Thanks whuber. Make some clarifications. Hope its cleared now
Caerolus, could you please clarify whether (a) these random variables have a *common* distribution; (b) *how* you know their expected values and variances, and (c) why you would want to test this hypothesis when you already know the expectations?
I was thinking that since the coefficients indicate how much the odds ratio changes when the different variables are increased by 1 I should be able to use this to calculate some sort of percentage comparison between them. Say: If we have two variables we calculated that the probability of getting 1 increase from 0.64 to 0.70 if variable 1 is increased by one, and from 0.64 to 0.76 if variable 2 is increased. Then in a sense variable 2 has double the effect as variable 1 (0.12 compared to 0.06) and I'd like to say that it determines 66% of the probability and variable 1 33% of it...
Thanks! I noticed you do princomp(yy'). Taking the transpose of the B matrix in my code fixed everything.
It's unclear how "regression" could be invoked in a *univariate* dataset.  Also, exactly what distinction are you suggesting between the two bulleted methods?
I guess perhaps my question wasn't clear. Given a statistic (as a measurable mapping, a statistic doesn't explicitly depend on the distribution of the sample), if it is distribution-free, is it  ancillary? Note a statistic is called ancillary, if it is a pivot quantity.
Don't the probabilities have to have a normal distribution with mean 0 and variance=1 for this to hold? I'd be very interested to know what anyone thinks here.
And, if $Y$ is sufficient, then $I_X(\\theta)=I_Y(\\theta)$.
@ skunk -- quite possible. Please remember that PCA is not prescribed for increasing the predictive power but as a variable reduction technique. For increasing the predicting power, you would need variables that drive the percent change in presidential polls. I suggest you'd also try to look for some interaction effects and create some derived variables.
The OP might be best served by asking on the theoretical computer science stackexchange.  This question in particular concerns constructing a total order given a directed acyclic graph, and is well-studied in the computer science literature.
Unfortunately, the feature generation step is both the hardest and most important one :(.
Search for "importance sampling"
If you define the "error" as $U = Y - f(x)$ for the (correct but unknown) model $f$, how do you suppose the variance of $Y|X$ could differ from that of $U|X$?  Is this indeed what you mean by "error"?
ah yes, that's currently a limitation for me as well. I believe the method actually can be done on any arbitrary distance, but I haven't bothered to look through the source code yet to see if it can be changed.
@grubera7 I've merged your two accounts. However, you'll need to register this one.
Welcome to our site, @Dominik!  Even when references are in English, we prefer that you summarize their contents in your reply: this makes the thread self-contained and long lasting.  Perhaps you could edit your reply to provide this information. :-)
@MichaelBishop if you look at my answer, you see that I simulated data to try out my story to see if it would look like the posted plot.  My code and plots are presented.  Since I specified the seed, it is reproducible by anyone with access to R.
That's aslo interesting approach.Thank you.
And what happens than if all panel averages have the same average x (in this case, everybody has the same average experience)? Then it is impossible to draw a regression line?
Semantic similarity does not seem to be a very well defined technical concept, more a loose general term, so I would not worry about 'doing it correctly'. The most important thing is what you want to get from your data. Certainly, WordNet is a highly useful resource and will help you with *meaning* of words. It is a good place to start. Regarding 'Semantic similarity' (e.g. the wikipedia page), I would just use it to gain some background knowledge and/or ideas for future reference. The crucial aspect to all this is your data and what you hope to get from it though.
Really nice, too bad I'm working with medical journals that are stuck in the paper format. +1 for inspiration
Does the closely related thread at [CDF raised to a power](http://stats.stackexchange.com/questions/10768/cdf-raised-to-a-power) help?  And what specifically is your question?  The function $F(z)^\\kappa$ is not, in general, the CDF of a power of $Z$, so which construction is the one that really interests you?
@chl: sorry, I guess I was missing some english words, when I typed this. I tried to edit to make this a little clearer. I am not sure about a correlation between variable A and gender. The interaction was tested using an ANOVA. The ANOVA of A and B was significant and the ANOVA between gender and B was significant. For an ANOVA with A, gender and B only the relationship between gender and B were significant, so the presence of gender in the analysis destroyed the significance for A and B. I hope it is more clear this way.
I'm not clear on how this would shed light about inclusion since it should be included anyway.  But it is good to model continuous variables continuously and flexibly.
@MichaelChernick: [*Vanilla*](http://dictionary.reference.com/browse/plain-vanilla) is a colloquial term for the "regular", "usual", or "simple" version of something.
Plugging in 3 into n - 1 yields something not equal to d *2sqrt(2) / sqrt(pi).  Can we reopen this?  I think there is a subtle difference here.
Thanks for the comments. From what I could gather reading your links (and googling a bit around), using inverse sampling I would fix the target number of successes (I guess that's the $K$ w.r.t. the names I used above), and then run the experiments until $K$ successes are seen. But this does not seem to address my problem. If $p$ is very low, the time until I see those $K$ successes is going to be very large (and maybe require more than my usual 100 samples!). What I want is to be able to decide when to stop *sooner* because, given what I've seen, there is little hope of having $p > 0.1$.
Also related: [Given the power of computers these days, is there ever a reason to do a chi-squared test rather than Fisher's exact test?](http://stats.stackexchange.com/q/14226/7290)
As an aside, if you are using this test in a time series context please be aware that if the errors are not i.i.d. due to outliers or level shifts or time trends or ARIMA structure or parameter changes over time or points in time where the variance of the errors change deterministically or incorrect specification of the transfer between y and x this test yields false positives.
Thanks, @whuber, this is the answer to the question I'd been trying to ask :).
The "related" links to the right of this page answer your question.
Wish I could vote up more than once. Great idea in the link!
This question was marked as homework. In such cases, it is discouraged to give a full, self-contained answered that leaves no work to the person asking.
Yes, that helps, thanks.
In my problem I have an array of real valued data which I am modeling as a HMM (speficially a mixture of multiple density functions each with unknown parameters).   For now I assume that I know the state transition probabilites.   What I mean by Viterbi Trainig is the following algorithm.

1) Arbitrarily assign a state to each data point ( initialization)
2) Perform MLE of the density function parameters.
3) Re-estimate state for each point ( can be done with Viterbi Alg).
4) Goto step 2 and repeat unless stopping criteria is met.
@gung sure thing. I'll do a little more "marketing" for it, although following the link and seeing it will speak for itself.
I follow the debate around this method and it seems endless (up to now). While some studies point out the inadequacy of GEE in handling observational network data (Lyons, Szabo), others support its utilization in certain conditions (VanderWeele). Alternative strategies exist (e.g., actor-based stochastic model) but not without assumptions, sometimes considerably strong. The problem is I'm not a hardcore methodologist by any definition, nor am I equipped with tools to tease these to their flesh and bones. So I think I will adapt this method, as this is what I'm the least unfamiliar with.
The correctness of this reply depends on the application.  For a concrete example (large dataset, expensive parameter to evaluate) see http://mathematica.stackexchange.com/questions/2889/randomvariate-with-a-discrete-distributions.  A solution was available there *solely* because the bootstrap samples could be efficiently calculated.
Try on tex.stackexchange.com.
@Stefano I don't see how contingency table would apply but computing two variables, one for each scale, is indeed what I suggested (with all the caveats I detailed in my answer). For the rest, you now seem to be asking a new and completely different question. The best thing to do is (1) use the search function to find previous questions on correlation and (2) *if needed* ask another question, providing more details on your study and your objectives.
I'm afraid I don't quite understand how I would do that. Can you elaborate on how to proceed in practice? Note that I have univariate observations from a discrete set $X_t\\in\\{1,...,n\\}$ for all $t$. Exactly which distribution has to be multivariate gaussian?
+1 Note that one can dispense with all the "$n-1$" terms: they will cancel out. For that reason it does not seem very instructive to try to relate these formulas to sample estimates. It is rather more illuminating to rewrite the formula as the average product of the *standardized* versions of $(x_i)$ and $(y_i)$.
The proposed statistic may have very low power against many kinds of natural alternatives.  The problem is that we *don't* expect most of the cells to have exactly 2 occupants: only about a quarter of them should have 2.  About 40% will have fewer than 2 and the rest will have more than 2.  What is needed here, then, is *theoretical* justification for the proposed statistic.  It isn't enough just to pull one out of a hat (even though it seems natural and appropriate) and suppose it will work well!
This has already been asked and answered [here](http://math.stackexchange.com/questions/567138/how-to-show-p-hat-x-p-x-where-p-x-is-distribution).
Kurtosis is defined in various ways. On another (simpler) definition, a normal (Gaussian) has kurtosis 3. You need to check which definition your software uses if you are computing it in practice.
I came here to say that. Have an upvote.
Did you try the `lsmeans` and `multcomp` packages ?
" "Wigan scores after 30 mi ... "  Could you please elaborate a bit more? which sport is this, for instance? What is the time for a full match.  If this is football, for instance, I guess I would like to assume something about rate of scorings, too ... Then the pre-match odds could be related to the different teams different scorings intensitys, and your problem woulod be an updating using bayes.
For what it is worth, I like plotting with `xts` and `zoo` objects where different series can be merged easily.
that doesn't sound like it's gonna scale to high dimension easily.
Ah, if it isn't the creator himself. Big fan of your work
+1 for the explanation as to why Cauchy does not make sense in this case. That would have been my next question if it were right :) If you get some time, could you kindly take a look at my comment above? In short, because my data need not come from a specific distribution, my readings yesterday revealed that a kernel density estimation technique can be used but am not really sure if this is the right approach and if it is, how one goes about doing it.
"Net" increase is just the *difference* between the mean at time $t_2$ and the mean at time $t_1$.
+1. Observing that the answer is invariant under changes of scale and location allows a simpler expression for the formulas because you may assume $\\sigma_A=\\sigma_B=\\sigma_C$ (as stated in the problem) $=1$ and (say) $\\mu_A=0$. That makes the solution a function of the two variables $\\mu_B=139/17.526$ and $\\mu_C=129/17.526$.
Skumin - When you say "I think this response should be formal enough" --- formal enough for *what* exactly? What thing do you need a formal response to?
Is that Matlab code?
Number of M&M's is a ratio scale, so ANOVA is tenable as to scale.  Are you asking if you can add handedness as a factor to the ANOVA?  If so, I think it might not be tenable with N of 20.  If you are assuming all kids are right handed and you want to see how much difference it makes if the left hand is used, you might have difficulty as the number of cases in each cell will be up to the choices made by the kids, so you will have different N's in the cells and perhaps some empty cells.  If you have not collected the data yet, perhaps you can give the kids the spoon in their right or left hand.
This question appears to be off-topic because it is about specific software.
I looked through the examples, but I haven't learned anything about hypothesis testing or two-sided test yet, so I don't think that's how I should approach the problem
I think your question is answered in this thread: http://stats.stackexchange.com/questions/31/what-is-the-meaning-of-p-values-and-t-values-in-statistical-tests  (apologies, can't seem to get links to look nice in comments)
this sounds logical to me
I'll have to check on the unbiasedness part.
I am using the Arima function (forecast package) which is largly a wrapper for the arima function (stats package) to fit the model. From the description in R: "The exact likelihood is computed via a state-space representation of the ARIMA process, and the innovations and their variance found by a Kalman filter." I am not sure how this compares to your formula.
The R forecast package is rather limited as it assumes no Pulses, Level Shifts, Seasonal Pulses and/or Local Time Trends which yields very poor results. The impact of not dealing with these four kinds of interventions is dramatic.
non-significant coefficients still mean that a model exists. the model simply states that the dependent variables is just equal to the error term. hence all the model building procedures should ideally be followed. also in view of a larger picture, generally to document the results, all the procedures should be done so that if at a later stage you test the same set of variables and a dependency comes out, you can make a comparative study.
There are still two correct answers to the rewritten question: no, the distribution of the percentile score of $Y$ is not uniform, because it depends on the values of the $X_i$; yes, the *marginal* distribution of the percentile score for the *joint multivariate distribution* of $(X_1, \\ldots, X_{100},Y)$ is uniform (assuming all $101$ variables are exchangeable.) Perhaps that's why the answer is unclear to you?
The symbol $\\mu$ is widely used in statistics to refer to a mean, but the symbol $x$ does not have that connotation. I've simplified your notation to refer to $\\mu$ alone by an edit; I don't think you were trying to make a distinction with your notation. On a different note, "expectation" in statistics does have the specific sense of what you expect on average and mentioning an expectation is entirely consistent with expecting variations around it.
would you calculate the probabilities and then use these expected probabilities in McNemar's test? How would you calculate the probability of frog conditioned on fly A to select fly A and probability of frog to select fly B?
It is easy to show that, except for that "small correction to rho" (whose purpose in this context eludes me), this is *exactly* the same as what ttnphns suggested earlier. The method is simply based on the Choleski decomposition of the correlation matrix to obtain the desired transformation matrix. See, for example: http://en.wikipedia.org/wiki/Cholesky_decomposition#Monte_Carlo_simulation. And yes, this will only give you two vectors whose *population* correlation is equal to `rho`.
@whuber: Pay no attention to the man behind the curtain! (I'll edit my response. On further examination, it does match one of R's other definitions, which is evidently what Minitab and SPSS use. Thanks!)
Amazing answer :-), thanks a lot cardinal for the suggestions AND the answer.
Thank you Peter for your answer, it is very much appreciated. I am reassured that I've worked through the problem correctly and understand what the differences are. If I get published I'll ensure to state clearly how the scores were calculated.
I think providing a description of the table by Bracikowski, along with a reference and possibly a link, would be quite useful.
1 point for pointing out that what kind of model you try to make is important in doing your aim.
@whuber, I think you’re right. I tried with a variety of distributions, and in many cases a $t$ distribution is better than anormal distribution. Note however that with skewed distributions like an Exp(λ=0.1) both are terrible.
@gung, OK, I've edited the question (but, what about another [5,688 R questions?](http://stats.stackexchange.com/questions/tagged/r)). This question definitely needs a statistician, not a pure R programmer. Only statistician would know if for example PESTS models can be used to fit this. You need to understand those models very well.
@user25925, The randomized block method should work for you.  The given formula is for a different type of dependence.
I don't know what the etiquette is for accepting your own answer but since this is the instructor's solution it seems appropriate.
Ditto with your second paragraph. If you know 2 infections is too low to be bothered with you can probably reasonably form a minimum estimate in which you want an alert raised.
What exactly do you mean by a "large" coefficient? After all, if we merely change the units in which we express the dependent variable (such as from parsecs to femtometers) we can make the coefficients arbitrarily large or small in value.
Please, could you provide a link for Hyndman (2011)'s research, or at least provide its full reference. What is a tbats model? Thank's
@mbq, can you be more specific? The input to the learning machine is a feature vector, and the output is the (x,y,z) coordinates of the cutting point, is this what you mean?
Can you explain what you mean by multiplicity-adjusted contrasts? What kind of contrast is needed to address my issue?

I have been impressed by R and always want to learn more but most importantly I need to know more about the way to structure the analysis.
Michael, are you perhaps misreading 100% *power* as 100% confidence?
I think hierNet also works for the elastic net. (By default, it uses lots of L1 penalty and just a little bit of L2.)
Ok, sorry. I have added some more details above.
That if should be "if x covers an integer multiple of periods beginning at a peak or trough", or more generally: "If x covers an interval on which y is symmetric"
I want to use effect size to calculate the change of customer lifetime value. If our discount increases median purchase rate by large enough % we could possibly extend this campaign
I thought only Cox can give me such information more or less precisely, but may be wrong
+1 This is a real pain.
I especially like the second last dot point comment.
@mikepk How do you come to know $\\mu_X$ and $\\sigma_X$? If you do know them and can assume independence, then I don't see any difficulty with doing what you suggest.
I agree that legitimacy depends on whether the 'questions are reasonable and interesting' but it also depends on the sampling scheme, e.g. if Y was generated by fixing (or sampling with fixed proportions) X and observing (or randomly sampling) Z and then observing Y, then regressing Y on X makes sense but regressing Y on Z doesn't, in the sense that the parameter in the first case tracks an actual effect but in the second case tracks some sampling scheme-specific average that generally won't make sense outside the analysis.
When you say "exponential moving average" are you referring to exponential smoothing forecasting method?
It is good that you have used a reproducible example. You could make the example even better by including `set.seed(1)` (or whatever number you like) before running random number generation, so that everybody gets exactly the same results as you (not that it matters much in this case, though).
I am developing a logistic model.
Great. What do you think about ordination? Maybe something like  principal components analysis? I've never used it before, but it sounds like it might be applicable.
@Glen_b sorry, not the best with wording.. I've changed the title to match
I may have prematurely edited your question. Were participants randomly assigned to treatment or control?
I think what is acceptable depends on the problem and how costly the errors are.
Standard deviation uses a square-root of the average squared deviation.
I see where you are coming from, but if the underlying correlation were exactly 1, that implies exact linear relationship and it's hard for me to see how there is an associated sampling distribution for sample correlation. That case is not parallel to there being a bivariate Gaussian for which the real correlation is exactly 0 but sample correlations will vary. For your results I get  95% confidence limits of 0.880 and 0.936 (Fisher z method). FWIW, I advise against quoting correlations to 9 d.p.
@Dail, I've checked the original article. There T is the number of observation in the initial regression. I've changed the code accordingly.
I did not say it is a duplicate :). _"I want to know how to calculate without any approach."_ What you do mean ? As far as I understand your question, a layman explanation of LDA would be fine. Or not ?
-1, the same reason as for another poster. The answer implies that it is easy to check the cited Markov property. It is not, unless demonstrated otherwise. Note also that AR(1) processes can be defined with $\\varepsilon_t$ being non-iid, so this should be adressed also.