tttjjj/elt_bench huggingface dataset:
@ChrisStata, you could do that, too. I'm an economist and we do love our logs (and differencing, too). If you had a time series (i.e., multiple observations) for each person (making a panel data set), I could argue that my way is better, but that's not relevant here. Henrik, you're right; I added a bit about that to my answer.
Are you more interested in an omnibus test ("do at least some deviate from fairness?") or at identification ("which coins aren't fair?")
Re your 2nd paragraph, it's worth pointing out that in typical statistical situations (say, fitting a regression model), $X$ isn't considered a random variable either, but a set of known constants.
Eva, sounds like a cool problem!  Given your data, I'd modify the above code by starting with *week* rather than *time*, then defining season = week %/% 13.  Finally, I'd regress your sales data on the season variable (e.g. y ~ factor(season)), then similarly extract the p-values from the regression, and add an indicator for significance below a certain threshold.  Does this strategy make sense?
+1 Good general advice.
You need to clarify how the election works.  I think it is clear you say there just one winner for the whole country.  But are they decided by a majority of total votes; or a majority of states (each of which is decided by a majority of votes)?, with states operating like a UK electorate?  Or does each state get a certain number of votes, like in a USA electoral college?  Finally by "known biases" can you clarify that you mean "history of voting disproportionately for one of the parties."
@gung Although this is not a "self-study" question (it is not homework), it may look as such since I tried to be concise, I will leave this tag since I just need some hints to get a solution.
Yes, data adjusted for a particular kind of seasonality of a particular period can still have a seasonal pattern. But in any case, beware of over-interpreting every little spike in an ACF or PACF. After all, you except a fraction of those ACF values to exceed the bounds *even when nothing but noise is going on*. Don't keep trying to adjust for what is probably just noise, you'll drive yourself mad as one thing after another moves to sit around the 95% (or whatever) marks.
Maybe this helps you: http://stats.stackexchange.com/questions/59712/the-way-an-maq-model-works
What determines the moments in time? Of concern is whether those moments are at all associated with the process value. If they are, we need to know *how* they are.
@Glen_b I am not saying they came from actuarial science, but they are standard in actuarial science.  You need to learn these topics for Exams MLC/3L and C/4 (in the U.S.).  And, that is how I know them.  But, I do appreciate the lesson!
This absolutely makes sense. I must say I got confused as I ran the GARCH equations for these shorter, homoscedastic periods, it printed the results complete with coefficients - even though it should've been zero as you said. Thank you very much for clarifying this.
+1. In `R` we can compute `x <- matrix(c(-954234, 3589,
43243455, 2521,
149940475, 3939,
243853640, 3936, 
262995399, 3025, 
751195421, 5333, 
10677437299, 7477), ncol=2, byrow=TRUE);
y <- apply(x, 2, sum);
y[1] / y[2]`, producing $406,697 for the average (only 3.2% higher than expected).
@f1r3br4and It may help if you add some details about  exactly what is your data? I.e., how many cases measured at how many time points? Are the cases in different conditions? or something different?
It seems to me that your code performs  a regression for each dependent variable separately. What I want to run it's a model that account for both outcomes.
@January Thanks for this comment. I agree. Technically, the p values are always based on a precise $H_0$. I removed the second part of my answer.
I have updated the question and hope that clarifies the difference!
I am not sure whether this answer adds value to @Peter Flom's answer. In an infinitely large sample, randomization in fact guarantees the independence of the treatment of any other confounding factor. Of course, in any finite sample, it might well be the case that the treatment will be correlated with some other observed or unobserved factor. See Imai et al., "Misunderstandings between experimentalists and observationalists about causal inference." Journal of the royal statistical society: series A, 171.2, especially section 5, for a nice discussion of this problem and what to do about it.
Reviewers are often people that don't know much more about statistics than those writing the paper, so it can often be easy to publish poor statistics.
Thanks @Wolfgang; your explanation helps a lot. A follow up question that I have then is this. I am indeed analyzing a repeated-measures model with a single treatment factor. Each subject is randomly assigned to either treatment A or B. Then they are measured at 0 mins, 15 mins, 30 mins, 60 mins, 120 mins and 180 mins. From my understanding, time should be a random factor because it is just samples from time 0 to 180 mins. So, should I do: lme(UOP.kg~time*treat, random=~time|id, raw3.42)?
Could you provide more information, including what is exactly the _balance score_? As it is not only statistics, maybe asking for help on http://cogsci.stackexchange.com/ can help.
Is it accurate to describe your data as essentially a 6-row by 3 column contingency table?
I believe the OP is asking about how to *interpret* logits, not how to perform logistic regression.
Since forecast.hts() calls forecast package's forecast() with '$mean' I think one needs to tailor an appropriate copy of forecast.hts to retrieve confidence intervals.
Ah, I misunderstood what you were doing and didn't check...  Because your weights are the inverse of the size of each sample, you get that result.
@user20650, the `glht` function would not generate the predicted probabilities, but rather can compute confidence intervals on combinations of parameters, which it seems is what you were asking how to do. Think about the formula when var1 is 1 and when it is 0, then subtract, is that not what your original question asked for?  (though this would be a difference on the logit scale, not the probability scale).
Also, does each working unit requires two slots, or it can fill only one slot?
@AntoineVernet, thank you very much - I'll look into the Poisson and NegBin methods.
I will edit my answer
Homework? Please add a tag if so.
Friedman test is not the extension of Wilcoxon test on several related samples (it is _closer_ to be the extension of sign test). So, it is very questionnable whether post-hoc pairwise comparisons corresponding to Friedman may be Wilcoxon tests.
Was just about to add this.  Thanks :)
Hola @Anony-Mousse I tried DBSCAN using both Bsim and Hellinger distances, neither gave good results, either all sites were classed as noise or in few  classes surrounded by "noise". Seeing that, now am not sure what is the appropriate approach to analyse the species patterns: some have wide distributions while others are restricted. A hierarchical clustering could be an option, except that cutting the tree at k usually renders some regions well defined (compared with empirical knowledge) while others are still too broad. Is there any valid way of picking the level at what to cut each branch?
The mean and/or variance don't exist when the limits implied by the improper integrals don't exist; e.g. for the mean, $\\lim_{a,b\\rightarrow\\infty}\\int_{-a}^b x\\, dF$ has to exist for the mean to exist (for a continuous density $dF = f(x)dx$). For a non-Cauchy example, consider the discrete distribution $P(X=x)= \\frac{6}{\\pi^2x^2};\\,x=1,2,3,...$, a particular case of the zeta distribution; in this case neither variance nor mean exist (it's the case that if the mean doesn't exist, the variance won't either, but the mean can exist when the variance doesn't).
@whuber: Can you at least simplify your samples into sufficient statistics so that the minimization is fast?
And no, b doesn't enter into the eigenvalue decomposition. It's not quite clear they minimise over $b$ - I've updated the answer to give one idea how. Perhaps you could email the authors?
Sorry for the layout. It's easier to get it with a little graph, but I hope you get it.
Thanks for adding the figure. I'm still not sure what's going on. Are these data time-series? Each point is connected by lines to a preceding point & a subsequent point, are those connections meaningful in your data? Eg, for some specific 3 points, maybe the preceding point was Mondays value, the middle point was Tuesday's value, & the subsequent point was Wednesday's value, is there something like that? Also, there may be some issue w/ the code used to generate the plot, can you paste the code you used into your question?
Thank you very much. I'm following the link. Excuse me, I could not vote you up, because I'm newbie.
I agree with @whuber here. In the (proper) sense of bias that the OP is asking about, it is *not* the scale that is biased or unbiased, but rather whatever estimate of your weight that you derive from its measurements!
You are assuming familiarity here with very particular software, or so it seems. What is the specific question you are asking?  I don't find this at all clear as it stands.
Thanks Max for the response and the great package.Your answer has started to make things a bit clearer for me. So I would assume that the x-axis is the difference between the 2 models?
Re the first point: Let vector $X_1$ have a range of values and let vector $e$ have small values completely uncorrelated with $X_1$ so that $X_2=X_1+e$ is highly correlated with $X_1$. Set $Y=e$. In the regression of $Y$ against either $X_1$ or $X_2$ you will see no significant or important results. In the regression of $Y$ against $X_1$ and $X_2$ you will get an *extremely* good fit, because $Y=X_2-X_1$. Thus, if you throw out either of $X_1$ or $X_2$, you will have lost essentially *all* information about $Y$. Whence, "highly correlated" does not mean "have equivalent information about $Y$".
Does this book provide the code to reproduce the graphics that it shows? (I think it's S that is used)
Two comments. P(A and B)=0, the question asks about P(A or B). In this [link](http://admin.net-texts.com/assetViewer.aspx?dl=no&id=5548) they make the same mistake you mention.
@CodeKingPlusPlus I've added an example to clarify things.
I was writing my answer at the same time as the other two.
.. without computing them by some other function.
I rule I use to remember: Use probabilities to predict frequencies.  Once the frequencies have been observed, use them to evaluate the probabilities you assigned.  The unfortunately confusing thing is that, often the *probability* you assign is equal to a *frequency* you have observed.  One thing I have always found odd is why do *frequentists* even use the word probability? wouldn't it make their concepts easier to understand if the phrase "the frequency of an event" was used instead of "the probability of an event"?
"With four parameters I can fit an elephant, and with five I can make him wiggle his trunk" is a quote by von Neumann.
Inappropriate in what sense? Which quantiles would you average and why would that be anything but a biased - indeed, inconsistent - estimate the mean of a skewed distribution?
This is very off-the-cuff as I haven't done any calculation. All of what you've written sounds good. The only question that initially comes up to me is that it seems the estimate of variance might be different from if you "threw away" the samples corresponding to the third outcome.
@Lucozade: I was confused about your description of your application:- How is PCA _recommending_ anything? How did you measure _performance_? Similarly for your last comment:- The _optimum_ for what?
Hi @Anne, what software are you using? My guess is **R**, but you should be specific. Also, including a [reproducible example](http://stackoverflow.com/questions/5963269) would be helpful.
I haven't read the sources you cite, but the definition you quoted appears to be the definition of [entropy rate][1]. For a process where the random variables are i.i.d., the entropy rate equals the entropy of any of the random variables in the process.


  [1]: http://en.wikipedia.org/wiki/Entropy_rate
OK, perhaps a unique solution is not possible, but what about the fact that $cov(X)$ is not influenced by distance? If you told me that $cov(X^{B}) = cov(X)$, couldn't I look for a relationship between the covariances for each pair of signals in $X^{B}$ and their distance $D_{ij}$, as described above. If I find such a relationship, I would say that it's very unlikely that $cov(X^{B}) = cov(X)$, since I expect the true $cov(X)$ to be flat w.r.t.$D$.
@Ham Yes, reporting ESs is recommended in many settings (I can think of the [APA guidelines](http://people.cehd.tamu.edu/~bthompson/apaeffec.htm) for example), although I would say reporting group difference (unstandardized, because ES are just standardized difference) is already good practice.
When you mention a function it's best to state which package it's from. Do you mean the `survdiff` function from `survival`?
Thank you for your answer, but I am confused- you say 'estimate the spike using the proportion of zeros' but plot it with no bounds. does the spike have a discrete height or is it infinite, if discrete, is it $P(X=0)$?
Let the marginal distribution of $X$ be $F_X$. If for each $x$ you predict $Y=1$ when $p(x)=\\Pr(Y=1|X=x)\\gt 1/2$ and otherwise predict $Y=0$, the expected accuracy is $\\int\\max(p(x),1-p(x))dF_X(x)$. It's easy to show this is a universal upper bound. Is this the kind of result you are looking for?
But briefly: repeated measures ANOVA does *not* assume or suppose that your indices are "repeated measures of the same thing", which can be quite confusing. Having four indices that measure **different** things, but with each subject assessed with all four indices, does qualify for repeated measures ANOVA. The caveat is that for this test a *sphericity assumption* should hold. There are tests to check if it does. If it does not, you should either correct for it (which is messy), or use MANOVA. You can also choose to use MANOVA to be on the safe side (but pay the price of losing some power).
In *any* location-scale family the mean and variance will be functionally independent in this fashion!
As I said in your earlier post, lm() has a plot associated with it. So, if your model is M1 you can use plot(M1).
Any thought about the impact of responses imbalancement (due to skip rules) on reliability analysis?
It is not the significant p-value which matters here but rather the difference itself, the effect size.
The answers will depend on the distribution of the y's. Can you define what you mean by 'predictive power'?
@mpiktas: that's not the way I understand this to work.  I figured out that answer, incomplete though it is to my requirements, after I formulated the question.  "Use the spearman rank to compare ordering performance", based on what I've learned elsewhere on my own, is a valid answer to my question.
Any specific suggestion that can work with big datasets?
@GaëlLaurans Thanks for that comment; it's helpful to this non-Francophone - now that I know why that happens so often, I will be more understanding of it.
Can you give me an example of what you mean by an OLS model without fixed effects? I don't see that you can mean "as opposed to a random effects model", because you don't estimate those by OLS.
Depending on the minimum of the frequency of 0's and of 1's you may get by with ordinary logistic regression (unpenalized).
+1 that was a great read, thank you.
Andrew Gelman had a related post recently about [heterogeneity between groups](http://andrewgelman.com/2013/06/09/heterogeneity-of-variance-in-experimental-studies-a-challenge-to-conventional-interpretations/) that is related (at least about why such a process is problematic).
Just a hint for all those who want to get started on reproducible research with R. I would advice you to have a look at the newish package `knitr` instead of Sweave. It's basically Sweave on steroids. It is as easy, if not easier, to learn and far more flexible.
@Henry yes. ...
hmm, how did you find the distribution of $\\dfrac{1}{\\hat{\\beta_0}}$? I am not sure if it would be the $t$-distribution again.
@grokkaine - This question raises interesting issues and seems valuable, but I'd find it even more valuable if you edited it a bit, taking care to be very precise with your terms.
... in each class. I've also seen recommendations of 5p and 3p / class.
I can't say what you want to model. But my advice is to reconsider what you are trying to show with this model; are you trying to show that people with more severe or frequent symptoms are likely to receive a diagnosis (`status ~ severity + frequency` in binary logit)? Or that people with a diagnosis show more severe symptoms (`severity ~ status` in ordinal/multinomial logit)? You have to answer that question yourself!
Objective is to look at for an association not for a prediction
ARIMA can be used for many different purposes besides forecasting, such as intervention detection, regression analysis of time series etcs.
Welcome to the site, @Mike. This is against our policies (see our [FAQ](http://stats.stackexchange.com/faq)); please do not advertize your book here. What we welcome you to do is to give a summary of the information there, so that a reader could get the gist of it. You could then reference your book as one place where people could get more information, but people wouldn't need to buy it--it wouldn't be advertizing.
That is a nice question and I have some ideas on how an answer could look like. But without a reproducible example, I am not investing my time. OP, deliver!
Because it is frequently used in literature.
One possibility would be to re-express all items scores on the same scale, using a simple linear transformation like $x = (x - min) / (max - min)$, where $min$ and $max$ are lower and upper bounds of your common scale of measurement.
@FrankHarrell - but to enter them as a datapoint into the meta-analysis, don't you need an effect size?
Often exact critical values for the permutation distribution are offered in tables indexed by the two group sizes, but (obviously) only for small group sizes.  The variance (which assumes only the permutation distribution for its calculation) is computed in order to find critical values for a Normal approximation to the sampling distribution of the test statistic, as you write, and it is true that this approximation can be poor with many ties.
> Is it even possible for a random input sequence to produce a non random output sequence ? 
I think so: the extreme case is $f(\\vec{x}) = k$ with k constant, but you could think of a model $f(\\vec{x})$ that has some state / memory of the sequence of instances it  classifies and returns an output value which depends solely on  depending only the index or combination of it. Therefore any random input sequence will produce the same output sequence.  I can't think of a case  where $f(\\vec{x})$ acts only on $\\vec{x})$ and does not produce a random input, but it might be somehow possible.
But they haven't included √n so it's like [Xb-2σ,Xb+2σ] for the confidence interval of 95% isn't it. I mean it's not [Xb-2σ/√n,Xb+2σ/√n] but [Xb-2σ,Xb+2σ]  as given  in http://en.wikipedia.org/wiki/Normal_distribution. Also when you say confidence interval for μ (actually 95.4%), does it mean that the true population parameter mean is within +-2σ of the calculated sample mean or is it that when a draw a sample from the distribution there is 95% chance that it is from sample mean +- 2σ. This is where I am confused
30 is pretty small... There's no way to gather more data? Also, what do you mean by: "they all are required to be combined together to predict oil production"? Since your dataset is so small you could post the **csv** file or whatever somewhere--it might be more helpful... Also, what software are you using?
If you get a moment to confirm or correct my interpretation, that'd be great. Hopefully I'll find a bit of time to think about this a little bit. (+1 on the question.)
awesome - make sense! thank you!
Can I ask what the motivation for using this particular "approximation" is? Are you familiar with the relationship between a Weibull and a single exponential?
Is that **all** the data you have?
Jake, thank you! I am really thankful for these pointers. What more precise information would you need to narrow them down? My dataset is an open source software database if you are not familiar with this, it is basically a system where when people change files, or discuss everything is logged (who did what change and what was modified). My individual 'i' here is a file, and the time 't' is given in a second measured stamp. Since a file can be changed either on (1) any time, or (2) any given amount of times, this leads to the problem I described. Do you have any further suggestions? Whats DV?
A BIP is the right idea, but how do you linearize the objective function?
Hmm, I wonder if the gamma family of distributions is what you're looking for, where $Y \\sim Gamma(k\\theta, k\\theta^{2})$. Y is restricted to positive values with the gamma distribution, which may or may not match your data. For large values of the scaling parameter k, the gamma dbn approaches the normal dbn, which is in line with your initial model.
Thanks @robin; made CW.  Although I don't entirely see this as "argumentative"; there are two fields which have informed each other (this is a fact), and the question is how much they have evolved together over the last decade.
Such a simple distribution, and a nice write-up too!  I suspected the distribution would be smooth except at 0.
shame they often only look better... :-(
What's wrong with conventional kernel density estimation?
Thanks, that helps. I thought that F-Value gave us some additional info that p-value would not. That clarifies my doubt now.
Not familiar with R but trying this out
what package is `propr` from?
The MULTIPLE CORRESPONDENCE command does what the name says.  However, it is intended for nominal variables.
@khader - Right, but those other genes, not being in your data, had no opportunity to show association with the two phenotypes. And so I think it's better to focus on the smaller set.
Thank you very much for making it clear.
$X$ is actually the mean of a sample having distribution $N(\\theta, \\sigma^2 )$. Let me fix that.
It _can_ be possible to draw useful inferences from correlating before and after data, for example as part of assessing test-retest reliability.
I doubt it's really anything but chance. However, you may get some benefit from fitting that model locally (local linear regression), and tracking the way the parameters change as you move across the range of the data -- it may give clues to a better model.
Thank you. But can we automate this procedure of finding the best run
Are you *assigning* patients to cases or control, or merely collecting those who happen to be cases and controls?
ANOVA and linear regression using dummies are identical, with identical assumptions.
"fails to converge".. "do converge eventually". "a fit that looks good"..."the visual fit is terrible". Sorry, but I'm confused!
OK, so in the final dataframe only these conditional amounts should count and PROB won't come out the same as here. That had me stumped for a bit because your toy Y has equal probability 1 and 2 for A.
Perhaps try using the days (N-20):(N-1) of data? If the data is moving out from under you, that could cause what you've seen.
, in terms of background. I have just completed an MSc in Mobile Computing and come from a tech support background.  I want to do a PhD in the future and I know I want to work with data.  It feels like finally i've found a field that accomplishes real science in the field of computing! (as opposed to development) I'm eager to start so I came here.  As I said though, my degree and masters did not include a great deal of math (if any).
Thanks, I forgot about the repeated measures :)
This question may be useful to you: http://stats.stackexchange.com/questions/59418/interpolation-of-influenza-data-that-conserves-weekly-mean