tttjjj/elt_bench huggingface dataset:
Hi, which flavor of the runs test? Calculating the runs when the value increases and decreases?
I have no idea how difficult and expensive it must be to obtain your observations. It sounds very complicated and so I've sympathy for you. But offhand, a test would seem to lose power with so small an n. Its been decades since I took stats, but I seem to remember a rule of thumb of at least 15 observatons per cell to approximate a normal distribution in each cell for Anova. Perhaps an n of 4 in each cell is not enough to assume that differences between the cells are based on something other than random variance.
The plot appears to obscure what may be a crucial difference between these series: they might be sampled at different frequencies.  The black line (Aeronet) seems to be sampled only about 20 times and the red line (Visibility) hundreds of times or more.  Another critical factor may be the regularity of sampling, or lack thereof: the times between Aeronet observations appear to vary a little.  In general, it helps to *erase* the connecting lines and display only the points corresponding to actual data, so that the viewer can determine these things visually.
I plotted everything but it's hard to tell effectiveness of the 4 (calories, carbs etc) on weight loss. This is partially b/c I don't have data from maintenance... just weight loss unfortunately.
@anxoestevez Could you look into the code? Did it work?
@SvenHohenstein Ok, thank you.
what is your outcome(s) of interest? Are your potential predictor variables all continuous in nature or do you also have discrete variables in your pool of potential predictor variables?
I wrote: "Given that you observe different coefficients for HIV, you will need to run another model which includes an interaction effect...". I would report the findings of the interaction model. However, reporting the findings of two separate models (control and treatment), can be more instructive, esp. for an audience with less statistical background.
Thankyou very much. I will do the search and the reading.
I would like a sample because I'm going to do daily tests that take ~15 seconds per test and my test subject pools is between 25k and 100k. Even if I can't say that the variable is a cause for sure, it would be good to see which are related
I think the main reason is the mathematical convenience: things are more easy assuming normality
W/ the reported N's, there is no point in running Levene's test. It will be significant. The larger point, however, is that the reported difference in variances will have little impact on the results. The question is Welch's t-test vs Mann-Whitney U-test, not Welch's t-test vs regular t-test.
This is a [FAQ](http://stats.stackexchange.com/q/4220/2970) on this site.
Hi abc, it would be good to expand this answer, as links go bad. A simple note and/or reference about Rubin's rules for combining models should suffice. The SPSS docs give `Li, K. H., T. E. Raghunathan, and D. B. Rubin. 1991. Large-Sample Significance Levels from Multiply Imputed Data Using Moment-Based Statistics and an F Reference Distribution. Journal of the American Statistical Association, 86, 1065-1073.` and `Schafer, J. L. 1997. Analysis of Incomplete Multivariate Data. London: Chapman and Hall.` as references for the multiple imputation algorithm.
@Glen_b is that relevant? Those are daily usage rates.
I discussed the nature of logistic regression in a slightly different context here: [difference-between-logit-and-probit-models](http://stats.stackexchange.com/questions/20523//30909#30909). That answer also briefly mentions the connection b/t linear regression and the generalized linear model. It may be helpful to read it.
+1, I'll share this wonderful response (and print it to have nearby ^_^)
Despite your last comment ("I understand that if I were to examine the data per group (...)"), I believe this falls under a repeated-measures design. Feel free to update your question if I wrongly interpreted the question.
Note that $f(t) \\geq 0$ for all $t$ is also a requirement.
+1, I appreciate the comparison of the two possible approaches.
Sounds to me like a nonlinear mixed model.
thanks for edit @Comp_Warrior
Besides Jeromy's nice answer, you might find a few additional details in the book that MASS is the package for (*[Modern Applied Statistics with S](http://www.stats.ox.ac.uk/pub/MASS4/)*, Venables and Ripley). If I was close to my copy, I'd check it now.
Perfect - thank you.  I will read up and follow up.
@chl @Fr. ["Some normal probability plots include bounds that depict the natural variability one could see in data even when it comes from a normal distribution".](http://www.public.iastate.edu/~wrstephe/stat403/probplot.html)
(+1) As reformulated, **this is a great question**: the world is chock full of "technical indicators" designed to help make investment decisions in markets. Most of them are self-serving BS, based on illusions stemming from overfitting, lack of cross-validation, lack of confirmation, and so on. For instance, how would a statistician go about testing the ["head and shoulders" indicator](http://www.trade10.com/Head_Shoulders.html) so beloved of "chartists"? (To begin with, it's impossible to find any unambiguous definition of this pattern, a sign that pseudo-statistics is in play.)
Thank you for this.  Base R also has the `rnbinom` function which relates very well to the output from `MASS`'s `fitdistr` which was invaluable for me in estimating the dispersion parameter.
... by using different values of C for patterns belonging to the positive and negative classes (which is asymptotically equivalent to resampling the data to change the proportion of patterns belonging to each class).
Ok I got it, it's correct!
@BST I only know the situation where you estimate the ED50 or LD50 via logistic regression (e.g. [here](https://perswww.kuleuven.be/~u0018341/documents/bioscent_february2011.pdf) or [the documentation of `drm`](http://www.bioassay.dk/index-filer/start/DraftDrcManual.pdf)). In any case, keep us updated about your progress, maybe I can help further.
@RobertoFerrer Yes, before I posted I used ereturn to list all of the matrices. Just didn't realize e(V) contained what I needed. Taking the square root yields the SE.
@user11852 Doesn't it work or won't it work? In other words, did you try it with `lme4_0.99999911-1`? In Galwey's book (pp. 202-203) the same approach (with identical results) is used also with another software (GenStat).
It contains relevant information for OP to consider. Either way, the question is answered after 10 months and you are complaining that I gave too much information. If you are confident OP understands why he chose the mean then you are welcome to edit my answer.
@deemar That is just a crude workaround. What good is a mean in such transformed variable(s)? It's essentially meaningless. Yes, you can then compute things. But are they any good? Plus, the discrete nature of the values will cause additional problems, and you totally lose understanding of what the algorithm really does measure.
@RelenaRibbons Could you edit the summary table into the bottom of your question, please, and then use the **{}** tool to turn it into 'code' (which will make it monospaced), and thereby render it readable?
(1) logistic regression is reasonable: code for that is easily available through textbook or google. (2) Princeton website has some notes: http://data.princeton.edu/R/glms.html
Can you clarify what you mean by 'limit of the other'? A nested model can be seen as one having some restriction on the parameters space compared to another, but I'm not sure if this what you intended to write.
We have a specialist in this subject who is a frequent contributor.  Consult almost any of [his replies](http://stats.stackexchange.com/users/3382/irishstat) for an account of his favorite methods.  Here is a [typical one](http://stats.stackexchange.com/questions/6033/detect-changes-in-time-series/8549#8549).
If they had more than 12 and some other problem, I guess that Stata would refuse to show coefficient estimates for every predictor. I will happily revisit the question if the OP adds information to the contrary. It's poor practice to show only part of the output. Although I have no reason to doubt it, it's not even explicit that Pseudo-R is 1.
How are jobs assigned to workers? That is, what if Worker 6 in your graph does slightly different work from the rest and ends up getting assigned customers who are much less likely to repeat? The old "all other things being equal... but are they actually equal?"
@Drew75 I added the plot of the ROC curve as an edit to the original post
A regression on Torture as a categorical variable will have *two* coefficients.  If you have only one, that means you are actually regressing on its *numeric encoding*.  The meaning of the coefficient may thereby be difficult to interpret.
Here is the same answer, with slightly different background:
http://stats.stackexchange.com/a/63416/6961
I have made some edits to your question to incorporate a description of the model being fitted. You should check it still says what you want.
In my experience they usually favor the same model. But, yes, if they differ, BIC will favor less complex models
This post is being automatically flagged as low quality due to its length, but I don't think it's not an answer to the question. Would you mind simply expanding on it a little / adding a few details to make it more helpful for a future reader who's a bit lost?
this is not a case control study- but a retrospective case study, data was collected retrospectively from files.
Some points: (1) the nugget is not part of the definition of the spherical variogram.  (2) "Spherical" does not refer to the isotropy, which is a separate concept and characteristic of spatial processes.  (3) "Spherical" refers to a particular model that yields this variogram.  (4) One does not "try" various variogram structures; there are principled procedures to *identify* them and estimate their parameters; this is generally called "variography."
@Tomas: No, he's right. Gamma(0,0) is the Jeffreys prior, and thus truly uninformative.
No, I don't, sorry. If I had been able to think of a good specific term, I'd mention it. If I find one I'll let you know.
Is it still the policy of Cross Validated to refer problems relating to statistical packages to StackOverflow?
`<<-` is not a truly global assignment: it differs subtly.  It functions as a global assignment only when the target variable `A` does not yet exist in the parent environment (and the parent itself is not the global environment).
@Scortchi Thanks. But doesn't the uncorrelated residuals mean a ok-ish model?
In order to have a measure of 'how much more difficult' a test is, you'd have to define what, exactly, 'difficulty' is measured by. It would be easy to compute average differences in *score*, but how score differences map to 'difficulty differences' would require us to define what we actually mean (in an operational sense) by difficulty.
+1 You got it in just as I was writing the same thing... :-).  The expected number of $\\Gamma(2)$ values needed per Exponential draw is about 3.407 with the optimal shift (of $\\sqrt{1/2}$).
*using SVM method we can predict the future value more accurately than other normal methods (like ARIMA)* - **certainly** not true. This will depend heavily on your specific application. To your question: load the `e1071` package with `library(e1071)`, then look at `?predict.svm`, especially the examples.
Type `bl-fu`. Now `sd(bl-fu)`. If it's not obvious, yet, do these: `dif=bl-fu` then `n=length(dif)` then `mean(dif)/(sd(dif)/sqrt(n))`... do you see now?
+1 Nice idea for using the second dimension to create space for the labels.
If you quote me then please quote completely: $f(X) - E(Y|X)$ is zero for the choice $f(X) = E(Y|X)$. This is known as the CEF prediction property and in class you usually show it to motivate least squares as projection of $Y$ on $X$. See URL 1 or any other econometrics lecture on this topic for that matter.
It's about an automated testing framework which should provide the reviewer with both a parametric and non-parametric alternative, if the parametric assumptions aren't met.
@whuber: i would be happy with either. i prefer the formula that's why i posted here because i can just implement that myself. i am sure there must be somethign already built in to R to do this
It is a pretty common decomposition in linear algebra [QR Decomposition](http://en.wikipedia.org/wiki/QR_decomposition)
For a graphical and intuitive explanation of where this *kind* of plotting position formula comes from, please see the second half of my class notes at http://www.quantdec.com/envstats/notes/class_02/characterizing_distributions.htm .
Although it's hard to tell, it appeared to me that the question is not asking about statistical modeling, at least not in a direct way that meets our guidelines. Even if it is, it would be "too broad" (another reason for closing Qs). I don't know of a forum that would be appropriate for your Q. However, it may be possible to edit / reframe your Q so as to fit here. Try reading our [tour page](http://stats.stackexchange.com/about) to learn about CV, & our [help page](http://stats.stackexchange.com/help/asking) & [this](http://meta.stats.stackexchange.com/q/1479/) for info on asking Qs here. GL
@cardinal Good point.  We have to assume either the joint distribution is Gaussian *or else* that the two variables are independent.  One might, with some generosity and suitable caution, make that latter assumption for the OP.
I took it that you want to compute distance or similarity _between individuals_, not attributes, and edited your question. If I'm wrong, @Jane, please correct and leave a comment for me to know.
@BrentonHorne: No. It is not free software.
This is accurate & diplomatic.
Hi http://faculty.vassar.edu/lowry/vsanova.html
Hint: What is the $n$-volume of the $n$-simplex in $\\mathbb{R}^{n+1}$?
If 50% survived, then 50% did not, and cannot be censored by definition, if "(right) censored" means "observed without ever experiencing the outcome."
Mehta and Senchaudhuri (2003) explain why Barnard's test can be more powerful than Fisher's under certain conditions.

For 2 × 2 tables the loss of power due to the discreteness dominates over the loss of power due to the maximization, resulting in greater power for Barnard’s exact test. But as the number of rows and columns of the observed table increase, the maximizing factor will tend to dominate, and Fisher’s exact test will achieve greater power than Barnard’s.

http://www.cytel.com/Papers/twobinomials.pdf
Yeah I suppose this must be the cause of the problem. It would be nice though if these strange results were accompanied by a warning.
Either way, I am now confident enough to interpret the result I obtained by modeling an actual dataset (which is definately invertable)
This seems like it would help, but I'm not sure my data is suitable. In reality the 'distances' I have are 'confidences of matching', between 0 and 1. So it may be difficult to scale them appropriately.
:-) Thanks man!
@Aniko all events have been counted before the follow-up period.
I asked essentially this question for lmer objects: http://stats.stackexchange.com/questions/17785/functions-for-regression-diagnostics-on-mer-objects-in-r and I'm hoping  additional answers will be forthcoming.
@whuber - Thanks! If you write this up as an answer (maybe with more details?), I will accept and +1.
I really meant the tautological sense: if the groups are normal then the residuals are normal. The reverse is only true if homoscedascity is added (as in ANOVA). I don't mean to advocate for checking the groups instead of the residuals, but I think this is the underlying reason for the varying phrasing of the assumptions.
"Throws away a bunch of information." +1. Unless you desperately need to make some kind of executive call on predicted classes, it's almost always better to express your answers in probabilistic terms. After all -- are you *sure* you've classed that point correctly, or is it just the most probable class? What if your estimated class probabilities are 0.4 and 0.6, are you really willing to say it's "in" the second class?
You have two good answers below. If you want more information, it may help you to read my answer here: [Linear regression prediction interval](http://stats.stackexchange.com/a/33642/7290), which pertains to prediction intervals, but the idea is very similar.
I can't help proposing you to look at [R](http://www.r-project.org/), which has way bigger ML library and (being made especially for this job) provides a much more homogeneous environment. R's text mining package is [presented here](http://www.jstatsoft.org/v25/i05).
In fact, it is worth noting that in the right side of the last displayed equation $\\Phi(-1) = 1 - \\Phi(1)$ and so $P\\{E\\} = 1 - \\Phi(1)$ even if the messages are _not_ equally likely, as long as the maximum-likelihood decision rule (item 2 in the OP's question) is being used. Bayesians would use a different threshold than $0$ when the messages are not equally likely and achieve a smaller average error probability, but for the ML decision rule with symmetric noise density, the error probability is just the one-sided tail probability.
(-1) No need at all to down-sample for logistic regression. See [here](http://stats.stackexchange.com/questions/67903/); selecting on the response only changes the expected intercept, so down-sampling just reduces precision of the estimated odds ratios. Logistic regression gives you predicted probabilities, which you may use to classify using cut-offs calculated to take into account the costs of different kinds of mis-classification, or use to rank individuals, or be interested in in their own right.
You'll have to be clearer about what you mean by "most common grouping"
The distinction _is_ important, but we have no way of imposing a terminology on "the world" (except, perhaps, by writing seminal papers). Just make sure that when you read a paper, you know which interpretation of the terms the author means, and make sure to explain to your own readers which one you mean. That will be the best you can hope for (as you don't even manage to agree with a colleague :-) ). I'm going with @whuber here.
Thanks, I had wondered how police make their guesstimates and if you ever run across that information I would appreciate your posting it back here, for the record.
(+1) The first formula (for $X'X$) still contains typos... (but the rest of the analysis is correct).
@whuber Thanks, I added a second edit... for me this is the pdf conditional to $X>d$!
Are your max and min constrained by a particular set of x values or are you asking about a universal max and min, regardless of x values?  The latter case is particularly simple--you need to understand only the most basic properties of R^2 (or of correlation).  The former is not much more difficult but requires some knowledge of ordinary least squares theory.
it might be good to clarify your second paragraph so that it is clear it applies only to the post's idea about normality of variables.
The second one, if it exists, is guaranteed to meet the constraints, by construction. Otherwise, there is no solution.  (But there always will be when the weights are positive.) Here's an example: fit a line $y=ax+b$ to $(x,y)$ data with the constraint $a+b\\le 5$. If the OLS estimates do not satisfy that constraint, now fit the model $y=ax+5-a$ to those data. (You could easily do that by fitting the no-intercept model $y-5=a(x-1)$ to the data $(x-1,y-5)$, for instance.) I hope it's obvious the constraint will be met and that no special software is needed.
This is just a shot in the dark so I'm sure someone else will give a better answer. I believe $\\sqrt{n}\\left(\\bar{X}_n-\\alpha\\right)$ is normally distributed with zero mean and variance $\\sigma^2$. As $n\\rightarrow\\infty$, $\\bar{Y}_n$ goes to the constant $\\beta$. I would expect that in the limit, $Z_n$ is normally distributed with zero mean and variance $\\left(\\frac{\\sigma}{\\beta}\\right)^2$.
@gung Profit and Loss.
+1 Interesting comments about Kaplansky, with whose algebraic work I have long been familiar.
The idiomatic way to simulate an unfair die in R is to use `sample` with the `prob` argument. It's *one line*.
@Arun: Yes, they do show significance relative only to the reference level. Note that `2` and `4` are therefore very close together (though probably still far apart enough, given those standard deviations, to be statistically significant). The OP should try releveling the factors to check that. The residual deviance and null deviance mostly play into the question of how much of the variance this regressor explains (while there is no equivalent to R^2 in logistic regression, there are some "pseudo-R^2"'s that use these deviances.
I appreciate your help. I have so far randomly analyzed 200 threads and found that none of those had discussions about security. According to Yamane's simplified formula, if I take ±5% precision and 95% confidence interval, I need 400 samples. Do you think that if none of the 400 randomly selected threads were relevant to security will justify the effectiveness of my keywords?
$H$ is a row vector? $d$ is a scalar ?
Whuber great answer. well done and thanks.
Thanks - the references are very helpful.  It was a pointer that I needed rather than a solution!
I'd say Lambda was a hyper-parameter of the prior (for which being more Bayesian you could have a hyper-prior and marginalize over that as well http://jmlr.org/papers/volume8/cawley07a/cawley07a.pdf)
I went and re-wrote my code to remove a small problem, as well as learned quite a bit of R. As it turns out, array_key_exists *does* correlate with array size, and the documentation is misleading. Should have known to trust the analysis over the developer's word!
It depends on how smooth $g$ is and whether it is one-to-one.  That landscape can be subdivided into cases where (a) $g$ is differentiable, (b) $g$ is continuous, and (c) $g$ is discontinuous, because the calculations of the likelihoods differ fundamentally among those cases.  Any of our threads on [transforming PDFs](http://stats.stackexchange.com/search?q=transforming+PDF) will apply to (a) when $g$ is one-to-one.
What makes you treat your 9-level scale ordinal?
I don't think these are multivariate samples.
OK, thanks, Nick.
Why do you want to use package *mvtnorm*? It contains functions for dealing with multivariate normal and t distributions, it does not contain anything directly related to regression.
That's sweet but you probably don't know me well enough to say "you are fine".  Please rephrase your answer if you care to.
Thanks, is there any literature you could point me towards for how to do a hypothesis testing of a binomial variable? For example, how to calculate the statistics.
Here's a couple of links: http://www.causality.inf.ethz.ch/data/dataset_generation.html http://www.quora.com/Machine-Learning/What-is-the-best-way-to-create-a-training-set-for-machine-learning The answer is that you _can't_ make a realistic set, so just do the best you can with what you got.
Thanks -- I'd vote you up, but I sacrificed all my rep so I can't!
Thanks for the suggestion, but the ability to choose my own measure of distance is critical, so this won't work to me. Someone else may find it useful, though.
What about a sequence of bits generated by a Bernoulli process with p=0.5? The redundancy should be zero, right?
One thought is brute force. Take random draws from a set of many normal distributions with unit variance but different means. Evaluate each to see if the proportion of observations falling in the two bins is 28/12.
I should note that my problem is not 'online': I have all the data at my disposal, and do not need to e.g. identify the first time my process goes haywire.
This was an OR question to begin with :), i'm glad an elegant solution was found.
I'd argue that Epidemiology is a subset of Public Health, not the other way around.