tttjjj/elt_bench huggingface dataset:
Welcome to the site, @Spy_Lord. This question seems to be *only* about how to do this in R. Thus, it may be off-topic for CV (see our [help page](http://stats.stackexchange.com/help)); but could be on-topic on [Stack Overflow](http://stackoverflow.com/). If you have a statistical question about RF, please edit to clarify; if not, we could migrate it for you (*please don't cross-post*). However, it will need a [reproducible example](http://stackoverflow.com/questions/5963269/) to be on-topic there; so you'll need to show what you've tried so far & add a `dput()` of your data.
Thanks for this. I need to justify what i have done is right. So it is for my thesis, i cannot do more stats and do a small section on methodogy i.e. different ways of running the models produces the same/different answers. I dont have the word space!
an addition at @Jeremy Miles answer: http://www-01.ibm.com/support/docview.wss?uid=swg21476743
This is a fine proof of the result, but it doesn't address Kyle's actual question.
GLMs are well-studied. I refer you to Murphy's *Probabilistic Machine Learning* Chapter 8 for a thorough rundown of logistic regression.
The RF algorithm, as implemented in the `randomForest` package with formula notation, considers one response variable only (factor or numeric). Can you provide more information on the type of variables you have, and what you want to achieve?
1) Why did you add the `missing-data` tag? 2) I still don't understand your question. In my very first comment, I offered 3 possible research questions, and you didn't pick either of them. What is your **research** question? Why did you measure emotions? What's your experiment? What are you trying to get at?
Because of the low numbers of data making up the initial % the resultant and observed strike rate % is significantly lower.
Ah, right, forgot the `$statistic` part in the code. Updated my answer.
I'm not necessarily advocating ARIMA; what is most important from your point of view is the assumption of *independence of the regression residuals.* Yours likely have strong serial correlation. That could completely change the hypothesis tests concerning significance of the slope; no matter what procedure you use, it would be invalid to ignore such correlation.  ARIMA is one of many methods to model and explicitly account for serial correlation.
I believe you're confusing the CDF with the relationship between your predictor variable and the probability of a 1 in your binomial data. I don't think any of your lines represent a CDF. The black line definitely can't tell you anything directly about the CDF.
@RFrank, I think you can use the same random effects structure I described in the other answer, although you may delete the random slopes in the predictors if that doesn't make sense in the context of your application. Have a look at the second bullet point to see how that model characterizes correlations between both MZ twin pairs and DZ twin pairs and let me know if you still have questions. FYI for future reference, you can use '@' in front of a user name to ping someone you've been talking to in a comment thread- I only noticed your comment because I happened to look at this question again
(**2**) If $F \\sim F(d_1,d_2)$ then $F = d_2 X / (d_1 (1-X))$ where $X \\sim \\mathrm{B}(d_1/2,d_2/2)$. Note that the transformation is monotonic. So the cdf of an $F$ distribution can always be evaluated via the cdf of a Beta distribution. Indeed, this is precisely how the software `R` goes about it, using the following reference: Didonato, A. and Morris, A., Jr, (1992) Algorithm 708: Significant digit computation of the incomplete beta function ratios, *ACM Transactions on Mathematical Software*, 18, 360–373.
+1, this is a nice answer. Welcome to the site, I hope we'll see more like it in the future.
Is the outcome whether or not the gene is expressed? Does the medium have an effect in the sense that the probability of expression differ between the two genotypes?
imagine $k$ 1-v-rest classifiers as each describing regions where the $i$th class dominates the rest, _i.e._  $\\left\\{x|g_i(x) \\le c_i\\right\\}$. This can result in the ambiguous region in your bottom figure. The linear machine approach _trains_ the classifiers in the same way, but then defines the region where the $i$th class dominates as $\\left\\{x|g_i(x) \\le g_j(x),\\,\\forall j\\right\\}$.
If you mean $10$ *consecutive* weeks, why not just compute the $43$ means of all such periods and compare their distribution to the mean of all $52$ weeks?
@mbq I don't remember all details. There are two packages - gam and mgcv, both having the gam() function. I worked with mgcv package and know that it allows different splines - thin-plate, cubic and more. Here is its help: [link](http://cran.r-project.org/web/packages/mgcv/mgcv.pdf), see pp.28-30 and 46
I don't understand, sorry. The question was about computing the ME.
[These distributions](http://en.wikipedia.org/wiki/Stable_distribution) have four parameters: a location, a scale, a power law for the tail, and a skewness.  Some of them may be easy to fit based on additional assumptions.  For instance, should the data be nonnegative?  Could they have two long tails or just one?  Do you have any prior information about their location or scale?  Also, do you need a good fit throughout the range or do you (perhaps) just need to characterize tail behavior?
I just wonder if you found any proper answer for the standardization problem. I have the same question now. I can imagine that for doing a repeated measure ANOVA this is better to do the standardization. But as I understood, multilevel analysis controls for between subject variation and within-subject between-observation variation separately. in this case I am in doubt about using the standardization or not. In case you got a proper answer know, this will be very helpful. Best,
Hassan
72% responded yes, but I forget how many day-of cancellations.
@mbq: This here, for example: http://www.lscp.net/persons/peperkamp/Peperkamp_Le_Calvez_Nadal_Dupoux_%282006%29_The_acquisition_of_allophonic_rules.pdf (i.e. probability distributions for speech sounds in context of other adjacent sounds) ... but my question aims for a general answer of what I have to take into account when I rate each measure's applicability for any use case.
I was just curious how much my data are worth for a serious analysis, but then I realized that I wanted to measure both the distance and the measurement tool, which is like the chicken-or-the-egg problem. @Michael's answer showed what my data are useful for (not much, really). I run in a sort of hilly forest. There is a shallow valley I usually cross twice and also one deep but short hollow way.
It will still mask important information about the potential differences in scales and means if you do this by group. If you do this for the data set as a whole, you will underestimate the standard errors on your standardized coefficients, because you had suppressed some natural variability in your data. So I would advise against that unless **ABSOLUTELY EVERYBODY IN YOUR LITERATURE** does this, and there is no other way they know about.
@whuber, your explanation is probably the best one i've ever seen. Typically, when this is explained, it is covered very abstractly when they mentioned ellipsoids and spheres, and they fail to show what they mean. Kudos to you for demonstrating how the axis transformation transforms the data distribution into a "sphere" so that the distance can be "seen" as multples of the sd of the data from the mean of the data, as is readily the case for one dimensional data. This visualization is in my opinion is key, and is unfortunately left out of most discussions on the topic. Good job---your explanati
Fixed it! Nice catch as usual!
Check out this [paper](http://mediapatterns.enm.bris.ac.uk/pdf/ECML-PKDD_2009_Inference%20and%20Validation%20of%20Networks.pdf):  It is more or less close to what you try to do and it uses GLM to predict edges. Also to avoid building manually the ground truth for the final network, they rely on external sources. Might be useful.
Thanks! I think this may be a clue to solve this. I'm trying to find the code to do a multiple linear regression model on the components returned by a call to density() in R.
Ideally, yes, it would be handy to have that in order to reliably estimate the location-shift. But that lesser precision caused by a small sample in one group doesn't of itself make the inference invalid. The important thing here (in terms of choosing an analysis) is to think about what you want your model for the data to be.
That's great.  The standard way of dealing with outliers.
Thanks Gael I will look into this.
Does it require strictly positive data? Neither [this](https://www.otexts.org/fpp/7/5) nor [this](http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf) suggest it in their discussion of multiplicative HW. Who says so?
@Megan: You are right. In practice, Zeger et al. (1988) suggests $(15/16)^2\\pi^2/3$ works better than $\\pi^2/3$ as residual variance for logistic regression models, though the two are very close. See S. L. Zeger, K. Y. Liang, and P. S. Albert. Models for longitudinal data: a generalized estimating equation approach. Biometrics, 44: 1049-1060 1988.
Did you have a look at  http://vnijs.rady.ucsd.edu/site_media/materials/tutorials/R.marketingmix.pdf   ?
fair points, although re:4 - this is not necessarily true if you include development time. Also, the R-based solutions (either interfacing with R or running as R packages) are typically using C/C++ for the sampling code.
`anova(nullmodel,fullmodel)` should work, for whatever you might regard as a null model in your problem
Both beta and x are matrices. If you have n observations and k explanatory variables, beta will be a k-by-1 matrix (in your case 2-by-1) and x will be an n-by-k matrix (in your case n-by-2). In linear algebra, you can only multiply matrices if the inner dimensions match. Thus you can multiply x*beta but not beta*x
@Ben: visit http://meta.stats.stackexchange.com/search?q=homework .  Note that most homework questions are both artificial and specific.  The vagueness of this one suggests to me it originates from a personal interest only.
For two balls with probabilities p and 1-p and two draws the expectation equals 4p(1-p), not 1. With n > 2 draws the expectation is np(1-p)(p^(n-2) + (1-p)^(n-2)) because you cannot have two unique balls and the only way to have one unique ball is to draw n-1 of the other color.
(+1) It's funny, I just realized that this Stata command might be used for transmission/disequilibrium test in genetics :) I discussed R packages in an earlier response, http://stats.stackexchange.com/questions/5171/testing-paired-frequencies-for-independence/5258#5258.
@MichaelLew you actually don't compare means, you take other statistics into account as well :-). You actually perform *significance testing* in order to see how significant the difference between two means are; how would you go into doing that with p-values? It makes sense to say that you can't compare p-values, because you actually don't know their distributions ;-).
I think you are looking for [Mahalanobis Distance](http://en.wikipedia.org/wiki/Mahalanobis_distance).
Hey i edited the question to provide more details, I don't know anything about the distribution of the data, though most likely normal if i have to guess.
You pick values for $\\theta_1$ and $\\theta_2$. Then minimise with respect to $\\theta_3$. You get the value $\\theta_3^{(1)}$. Having it you now use OLS to estimate $\\theta_1^{(1)}$ and $\\theta_2^{(1)}$. You got your first iteration. Then iterate until convergence.
@ssdecontrol I am not sure I am following you. What I wrote is not any kind of procedure. It is a textbook-level result that is based a) on the _assumed_ unbiasedness of OLS estimator, and b) the linearity of the expected value operator. There is no need to distinguish between the samples in any way -they could partly overlap for example.
@Skrikant In fact, I didn't think another tag was needed at all, but yours looks better.
The need for additional control variables can depends on whether the the treatment group was selected at random from a larger group with the remainder becoming controls, or (as is more often the case in post-hoc analysis) because of of some specific features.
Note that this is not an SPSS issue. You will find the same results with other software.
Also see this question on post hoc tests for ancova: http://stats.stackexchange.com/questions/2469/post-hoc-tests-in-ancova
Bananas are always tasty.
@Aksakal given that the test statistics gave a value of 8.943 i would expect the corresponding p-value to be greater than 0.05, and not 0.000 as obtained given that it is larger than all 3 critical values. Had the test statistics been smaller than -2.623 i would have expected the p-value to be less than 0.01, but given it is larger than the 0.1 critical value, the p-value for the test statistic should be larger than 0.1 when it is not. I hope that my concern is coming across clearly!
+1 for the second suggestion.  The Q-Q plot is one of the strongest and most insightful ways to compare two empirical distributions, because it graphically displays variations between the two throughout their range.  It is also a natural graphical adjunct to the KS test, whose statistic is the maximum deviation between the Q-Q plot and its reference line (Y==X).
For a discussion of different permutation strategies in factorial ANOVA-designs, see e.g. http://avesbiodiv.mncn.csic.es/estadistica/permut1.pdf (pdf)
Actually I just realized, aren't these all wrong because they should be combinations not permutations?
This is not true "Note that to have a solution $X^TX$ must be invertible."  In order to have  UNIQUE solution that must be true but if it is not then you can have an infinity of solutions.
Should follow from the [Borel-Cantelli](http://en.wikipedia.org/wiki/Borel%E2%80%93Cantelli_lemma) lemma.
IN column E put =A1-B1. Plot column E as a line graph.
It is not true. Let (X,Y) = (0,1) w.p 0.5 and (1,0) w.p 0.5.
Related question [here](http://stats.stackexchange.com/questions/665/whats-the-difference-between-probability-and-statistics)
`splits the terminal` How on earth a terminal node can be split? `The independent variable is Income` The dependent variable? Please make the question clear or give a link to the picture of the tree.
Very nice explanation! I'll just wait for one or two days, maybe someone will add something valuable.
This is also a great example of how ensembling many similar models (AUC ranging from .76-.82) can increase accuracy.  In this case, a good meta-model based on the green and red models would be better than either of them on their own.
Why are you taking $\\log$ of the observations/variables?
http://en.wikipedia.org/wiki/Vector_autoregression
@PascalvKooten - I meant the F_β score which generalises F_1.  From wikipedia : 'F_β measures the effectiveness of retrieval with respect to a user who attaches β times as much importance to recall as precision
Correct. I feel bad answering my own question, but no one gave it a try. How about I keep that in quotes, then add my own bit of explaining?
@VSPCP, two clarifications: Don't you mean the $x_i$'s are sampled from $\\nu$ (assuming silently that $\\nu$ is a probability measure)? And why are you replacing the norms in the operator by inner products in the empirical approximation $-$ I don't understand how to make sense of that.
Thank you for the paper, looks interesting but i am not sure that is my situation - it appears from a quick glance that this is about predicting how customers purchase products over time - correct? My problem is about predicting the amount that will be in their account over discrete periods.
This question doesn't appear to be on topic here.
Describe your new problem more specifically in a new question if you can't find another that already answers it.
@MansT: Nice you have edited the question ;-)
@user603 I updated my answer. Hope it is clear enough.
At the bottom of the asymptotic normality derivation from your link. It says "Finally, the information equality guarantees that when the model is correctly specified, matrix H will be equal to the Fisher information I, so that the variance expression simplifies to just I^−1"
You say that my approach to find good parameters is invalid...can you provide me with resource were i can check if my whole logistic approach is scientifically correct?
+1. Stephens here is a typo for Stanley Smith Stevens.
Thanks for the extra information. I wrote a comment about the issues raised but it grew too long for the space allowed. I'll paste it into an edit to my answer.
This sounds to me like a standard problem in faint disguise. Achieved 31, not achieved 151; expected achieved 19.87179, expected not achieved 182 - 19.87179. So your chi-square statistic must be calculated from both pairs of observed and expected, with 1 d.f. In any case, for better advice, tell us where the expected 19.87179 comes from. Note that your last sentence is a loose wording for P-value.
Even though we wound up going with histogram in case we decide to do other kinds of similar charts that aren't time related, I think this is the most direct answer to the question that I asked. (We're actually using histogram/time, but maybe I'll change it to histogram/cycle....)
Thank you for your answer. The experimentator used a two-way ANOVA (which is not fully correct, since experiment is a random factor, not fixed), and I used the nlme as suggested by Frank Harrell. I prefer to avoid separate tests, since it decreases the statistical power. Also, correct me if I'm wrong, but I do not think that a high p-value can demonstrate anything, because a p-value works only one way (being unable to reject the null hypothesis does not demonstrate it).
I edited my answer to answer on your comment
In general, which metric, ROC or confusion matrix is a more reasonable one?
I've voted to close as off-topic. This is basically just a dump of the code, if you reduce it to a smaller problem and try to explain what you are doing it is more likely to be on topic here. If you are just interested in getting help with code it will be better for SO, but even then it would be helpful to make the example smaller.
@AdamO I believe that point is valid for most software tools. There were well known bugs in Excel for years and I don't think Microsoft reimbursed anyone.
Add some context, I am working on a NLP experiment. I have several categories of documents and I want to tell how close each pair of categories are related to each other.
Thanks! I had my doubts, too, thus I somehow expected  your answer to 3+4. The KS test also shows a high similarity but when I played a bit around I realized that 5+6 likely don't hold: In *subset* I increased the counts for the eighties by a constant amount (say 100 individuals) and still got the same high correlation. So we could have more young people without seing a difference. I guess saying that both distributions are similar and there is no obvious difference is correct, but there is no statistical evidence for that or more complex conclusions.
@whuber: the documentation provides the form of the pdf explicitly. In this case, the form given is the same as the one used in, e.g., Wikipedia.
@Dominic I was just doing some research on this issue this afternoon. You're right that it knows about conjugate distributions and it uses several strategies (of which slice sampling is one) when conjugates are not available. My answer had "one of the strategies" ... which is true, but should be more complete. Your answer would still be very welcome.
Your sample is so small that the probability to have only two unique value pairs in the bootstrap resamples (resulting in $r_i=1$) is pretty high. Sometimes there is even only one unique value pair (indicated by the warnings that `the standard deviation is zero`). I wouldn't recommend bootstrapping pearson r with a sample size of only 5.
Consider using ELKI, which was used to make the figure on Wikipedia. It supports DTW out of the box. The Matlab implementations of DBSCAN and OPTICS are said to be of low quality.
Excellent take; I like the way you started with the interpretation (which I'd say is likely the best way t take the question) and then wrote a clear answer.
A good reference is Elements of Statistical Learning.
@jonsca Oh, I agree with the edit, I was just concerned the OP, being a new user, mightn't realize that if they wanted it changed back, it could be done.
Negative binomial models are often suggested for count data, when the data doesn't look Poisson. But if you just want to do regression without specifying a particular mean-variance relationship, and have at least a moderate sample size, apply robust standard errors to e.g. Poisson regression output. Also, is this a homework question?
@blop. The community always expect the original poster to show what he/she has tried to accomplish/understand their goals. A hint would be to start by the constraint that Female which are not obese (F_not) needs to be 10% greater than not obese Male (M_not). So, F_not = 1.1*M_not. Then, we have F_not + M_not = 48.2%. Can you figure out what it's next? Hope you can solve this.
What have you tried? Where are you having difficulties?
This question appears to be off-topic because it is not about statistics.
I have seen that you are a regular user on stats.SE. I have a humble question: Can you please consider to flag questions like these (ML, DM) to move to stats.SE (and then answer them there) in order to grow the machine learning community on stats.SE ?
@zyx, there is nothing advanced about the OP's questions. These are *very* common questions for which, in my opinion, stats.SE is more appropriate---and to which the participants there are more attuned to, as well. Math.SE and MO are both excellent resources for probability questions, but much less so for statistical ones. The OP's questions lean much more toward the latter.
+1 Certainly some statisticians have used the terms in the OP's question (and not always perfectly consistently with others using the same words). I think the terms you use are becoming more common but I'm not sure on what basis we could guess at their relatively worldwide usage among statisticians -- papers, for example, don't necessarily help because the average statistician won't be actively publishing. You may be right -- but how would we know? [If you happen to edit again, you may want to replace "standarized" near the end with "standardized".]
@PeterFlom to my reading, that's a quite different question. The other one was rightly put on hold, but this is asking something different from that one, and I think it's quite possible to answer this one.
I have updated my answer in using the example data.  Hope you enjoy (its actually quite a good classifier!)
A nicer--and very suggestive--alternative expression for this value is $\\text{arg}(X+iY) = Im(\\log(X+iY))$, the polar angle of the complex number $X+iY$.
More information about the data is needed.
As @ttnphns's plot refers to *subject space representation*, here is one tutorial about variable space and subject space: BTW, I didn't know about *subject space plot* before, now I understand it and here is one tutorial about it:http://www.amstat.org/publications/jse/v10n1/yu/biplot.html. ;-)
Can you give more information? The best recommendation for the appropriate analysis is always dependent on the research question which you haven't said anything about. Some more info about the data would also be helpful
First, Chi-square looks for any association between two categorical variables. It doesn't posit a dependent variable, and you have one. Second, chi-square doesn't allow testing *which* species has which effect (at least, not in its standard form) and this is your question of interest.
Can you spell out your acronyms the 1st time you use them? Eg, what are DGE, DESeq, & htseq-count?