tttjjj/elt_bench huggingface dataset:
+1 for @fabian's suggestion. An inferior way to do this that usually yields similar intervals is to compute the interval on the logit scale and then transform to the odds scale: 
`cbind(
	exp(coef(x)),
	exp(summary(x)$coefficients[,1] - 1.96*summary(x)$coefficients[,2]),
	exp(summary(x)$coefficients[,1] + 1.96*summary(x)$coefficients[,2])
)`. There's also the delta method: http://www.ats.ucla.edu/stat/r/faq/deltamethod.htm
Hint: For the `Cumulative Binomial Probability` column, you are getting the lower tail probabilities (ie, the probability of getting <= that number of correct guesses).
Hi, thanks for your answer. i am sorry i was not being more specific. i know that the residuals have to be normal and i would not like to discuss whether the variable is normal or not but simply whether i could use a transformed and an non-transformed (just original, sorry i have a lack of a better word) dependent variable in my multivariate regression (sorry for using the wrong term). i think if anyone knows this in general then this could be answered with a yes or no, i would be very grateful :)
I agree with @Rob. This kind of data can pose unique challanges, so this is not a duplicate.
Actually, I think I figured this out. For any given value of the other covariates, it's just making a comparison between the reference stream and the other stream. However, is this the best way to set up this model?
(+1). Additional remark: Even the parameters of the weak learners to not differ, the behavior (i.e. what they predict) changes when the structure of the dataset (as done in boosting) changes.
This thread may be helpful:  http://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues
For what purpose do you intend to use these statistics, Melissa?  @smillig: http://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2 will clarify this question for you.
(+1) The second point is very interesting.
The Engle-Granger method is not especially complicated: you just take the residuals of a regression between the two series and determine if it has a unit root.  This is certainly practical: it's used regularly for a broad spectrum of problems.  That said, I imagine that any answer to your question will require some statistical knowledge (for instance, you should understand things like stationarity, independence, etc.)...
Are you sure that the waiting room holds only $2$ persons? If the waiting room would hold $12$ persons, a Poisson distribution with $\\lambda = 12$/hour would result in the probability of the answer (i.e. $0.5384$). This is the probability that at least $12$ persons arrived up to 9 am.
**Hint**: Use the CLT.
@Andy sines and cosines are not the only basis, nor are they even the only orthogonal basis, for the (square-integrable) periodic functions.  One of their merits is that often *physical theory* implicates them in relationships with other variables.  This suggests we should be acutely interested in the hypothesized or expected relationship between the DV and these covariates.  DavidR, what can you tell us about this?
If you do this then you get $\\sum c_i =0$. No ?
Well, kind of. I'm by no means an expert either, but I read [THIS](http://www.espenhaug.com/NegativeProbabilitiesHaug.pdf) article by Esben Haug and found it quite interesting.
Can you provide a sample copy of your output?  Be sure to mark it up as 'code' using the curly brackets button.
Disregard concepts like allying and ties. Let's say all players are of equal skill, with a 50% chance of winning in a heads up game vs every other player. Logical thinking gives that each player got a 1/3 chance of winning in a three-way game. With this method you get a 1/4 chance of winning for each player, and 1/4 chance of getting no winner?
I found the same solution from Matlab webpage. As you suggest, the results are not very satisfactory as to represent in a 2D or 3D space. In any case, since you provided the solution, I award you the Correct Answer.
Point 1: Maybe I am missing something, but you can't code the IV to the mean DV! Isn't that assuming a perfect relationship?  Point 2: If counter-intuitive results can't be used, I would refuse to do the work and, if this is for the government, I'd make a stink.
Calling whichever is the larger model the "full model", & whichever is the smaller model the "reduced model", is just standard generic terminology. In this case, after the edit, `as` is the full model & `a` is the reduced model.
Also give the R `Hmisc` package `aregImpute` function a try.  But your sample size for testing all this is not adequate for *any* analysis.
Anybody shed a little bit of light on this for me??
At the bottom of the following Web page from NIST/Sematech, http://www.itl.nist.gov/div898/handbook/prc/section4/prc473.htm,it is recommended that both tests should be preformed and the smaller of the two intervals be taken. I have found similar comments in Johnson and Wichern on doing MANOVA.
@PatrickLi there is no need for the x-variables to be normal
@FloE You're right. You will still need to construct your rhs *ad hoc*. For example, something like `tab <- table(x,y, dnn=c('snoring','disease')); glm(tab ~ as.numeric(rownames(tab)), family=binomial)` would work (minus sign reversal for the coefficients because "Yes" is coded 0 instead of 1).
Thanks!  I was out of town last week and missed that MO post.
$t_2$ would be better for smaller values of $\\theta$ (that satisfy the above inequality)
I replaced "the" with "a" in the question. Actually what you said is what I expected to hear. I mean I'm happy that my understanding was not wrong. To develop my question I would like to ask if the number of trials was only two then regardless the confidence of the overall result, is the method still a Monte Carlo method?
Gelman's argument that in a coin toss, you cut the continuous sampling space (angle of the coin to the horizon) in half, so whatever object you are tossing, you will end up with 50-50. I personally think that the argument of whether the probability of heads is exactly 0.5 or 0.5+epsilon is at best a scholastic one.
Just to check whether I read this right: you're saying you have about $60$ observations and $1000$ variables of interest?
Note: You haven't said anything about whether the random variables **X** and **Y** are *i.i.d* or not...
One potential issue with apply normal PCA to variable selection is that you implicitly assume that the low variance PCs are poor predictors of the response.  There is no intrinsic reason why this should be the case, apart from the fact that low variance PCs are more prone to extrapolation issues (predicting outside the space of the sample) compared to high variance PCs.
Actually, I was not aware of latin hypercubes. The reason I am fixing two parameters at a time is because the possibilities of sampling seemed endless and each simulation takes quite a lot of time so I need to use some domain knowledge in narrowing down the values. I will look into multiple linear regression as you suggested and will get back. Thank You. +1
Thanks for your detailled comment. I understand your intention and this kind of analysis was already performed but the disadvantage is that the hierarchical structure get lost. I would also like to measure the contribution of the gp. I thought that mixed models can cope within certain limits with single observations since there are still pat with several observations.
"Reasonable" implies you have a loss function in mind, for otherwise this question is unanswerable.  What is it?  And are there any assumptions you can make about $P$ at all?
Ah, i would get the cdf for an exponential distribution either way.  I get the idea for part (a) now. I would also like to inquire and clarify on how is part b.(ii) linked to b.(i). Since X is a gamma distribution, does the PDF of Tn follows some sort of distribution of Y which is derived from the gamma distribution?
@PeterFlom Sure, but the question was "Is there a difference between Binary GLM and logistic regression? Is one a special case of the other?" and the answer is Yes, logistic regression is a special case of the binary GLM. The present answer from Dirk Calloway remains misleading if not incorrect. I don't want to be heavy-handed and edit it myself.
Your variable combinations / transformation can be fine, but there are 2 issues here. 1st, it is important to realize that these analyses answer a different question than the initial analyses do. You need to figure out what question you want to answer. 2nd, you will have major multiple comparisons problems if you simply scroll through all possible pairwise correlations, then all possible pairwise correlations b/t combined variables, then all possible..., until you find some significant correlations (eg, see [here](http://stats.stackexchange.com/questions/5750/)).
Maybe this question would be more appropriate on Stackoverflow? Since it asks about exact implementations of the algorithms that supports instance weighting.
Aaron, Thank you.
Handwritten digits make a nice test for clustering:
one would expect 10 well-separated clusters,
but [this](http://stackoverflow.com/questions/6645895/calculating-the-percentage-of-variance-measure-for-k-means)
shows no knee at k=10 at all,
at least in the Euclidean metric in 64d.
This is true, but the loss due to degrees of freedom would be rather trivial in most situations I would think. The correlation between A and B is of more pertinence (as mark999 noted in his answer).
I mean, increasing the "rate", what does it mean truly? That the estimator converges faster to its parameter? Does this imply thus that the limit distribution must be multiplied by the inverse of this rate to be non-degenerate? Is that the answer?
Generally, you will be able to read the function's code by simply calling it without parenthesis, as Gschneider did.
[This](http://stats.stackexchange.com/a/51871/3277) answer should suit you best, I think. I vote to close your question as duplicate.
Just to clarify: you are not looking for the *distribution* of each group's individual maximum times, right? (For which you could simply tabulate how many participants in each group had their maximum at $t=1$, at $t=2$, ... and then do a chi-squared test.) Instead, you are averaging values per group and looking for the maximum times of these averages per group, right? Then I'd agree with @Affine that a bootstrap (stratified by individuals) should probably work.
@kjetilbhalvorsen : thanks
No, that's not the case. The Pearson correlation coefficient is mathematically constructed to have no dependence on either the mean or variance of the underlying distribution.  Your intuition might be improved by thinking of the correlation coefficient as a property of the *standardized* variables.
Please reformulate the header of the question (more specific, less generic) and complete the last sentence to increase the long-term-value of this question for the site/audience. Thank you :)
+1 for the effort! You know you can use existing properties of covariance in your answers, right? ;) BTW, normality was not used anywhere in your answer.
I think the fallacy of failing to aggregate and using the df from the number of responses rather than the number of subjects is a violation of independence.  Alternatively, (I think) it might be thought of making an inference at the level of individual item responses for a fixed set of subjects.
thanks! I'll be appreciated if you can point me to a reference ?
perfect, just what I was google-ing for but couldn't find :)
You might want to consider how good Fisher's exact test really is: http://www.stat.columbia.edu/~gelman/research/published/isr.pdf (Section 3.3)
Who said it's funny?
Right, the transformation only applies to X1, during the regression and then for prediction. Thanks. So in case I have a cubic function Y = b0X + b1X^2 + b2X^3, what is the appropriate transformation to linear relationship?
Thanks, I will definitely apply this technique, as my real data is highly skewed. I'm unfamiliar with R code so I'll likely implement it into Mathematica. Can you explain what the "for(ii in 1:n_resamples){
  bootstrap_sample = the_data[sample(1:n_data, size = n_data, replace = T)]  
  bootstrap_mean = c(bootstrap_mean, mean(bootstrap_sample))
}" segment is doing? The rest I think is self explanatory.
As a humorous aside (I hope) here is a [poem I wrote](http://voices.yahoo.com/ode-bayesian-4610651.html?cat=42). (Yes, I know it's not an ode)
I don't quite follow the premise of your question. Are you asking how to know if your time-series data are stationary? That's a very fundamental issue in ts analysis. Are you wanting to identify seasonality, or regime changes?
If my answer was helpful, please consider upvoting/accepting (though you may want to wait some time for other, perhaps better, answers before accepting.) The new question(s) you have would be better posted as a separate question (or two, if the overfitting question is unrelated to the outliers). These comments are meant for clarifications about the questions/answers, not for general discussion.
Estimators and parameters are fundamentally different: an estimator is a number derived from the *data* while a parameter is a number used to describe the distribution of a random variable. In many cases estimators are used to guess the values of parameters. For instance, when 642 of 1000 respondents answer "yes," you can use the formula $\\hat{p}=642/1000$ to guess the true (but unknown) probability $p$. It is crucial that you distinguish between these, for otherwise you will be unable to communicate your problem clearly and you will likely misread any answers that are posted.
this is not true! In a study of over 50,000 subjects, if you observe 50 failures in the treatment arm but only 20 in the control arm, and 40,000 are censored, we still have strong evidence indicating the treatment is harmful for a rare disease!
This question appears to be off-topic because it is about searching for r packages.
@Laurent You're welcome. Feel free to post another question once you have solidified your objectives of the graph.
you probably meant    print(NoCor <- lmer(RT ~ Size + (0+Size|ID) +(1|Subject), data=rt)) as in this package example: A mixed-eﬀects model with independent random eﬀects
Linear mixed model fit by REML
Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
Data: sleepstudy; you should edit your post to fix your code.
What do you mean by "corr(i, j) = 0:5 for $i−j$ or for all $i=j$"?
Luce, R. D. 1959/2005. Individual Choice Behavior: A Theoretical Analysis. New York: Wiley. Reprinted by Dover Publications.
Hi, Stéphane. The problem is that Birnbaum proved that the Likelihood is equivalent to other two principles that are so natural that they should necessarily hold. We wrote a short review on this result. Here: http://www.ime.usp.br/~pmarques/papers/redux.pdf
Sure thing, let me know if that resolves your problem.
@Gavin@whuber so technically if 5 people using the same dataset from R and the order of the variables being used are different in the lm, then each person will have different means. (Even though the data is the same)
`GROUP` will be uncorrelated with other regressors, so `AGE`, `INCOME`, etc. will be clearer effects of these variables on `CHOICE` (with all the caveats about collinearity omnipresent in social science data). However, the effect of `GROUP` will be free of these confounders, and the coefficient/its significance should not change much between these two specifications. (If it does, this is indicative of a violation of the pure randomization, such as contamination of the treatment arms or differential response rates in two treatments groups.)
@Peter: As this is closed as a duplicate, would you mind moving my answer? Gavin's answer explains what the dispersion is; mine how the negative binomial distribution is parameterized: so they complement each other.
@MHH Normally data is split into 3 groups: training, cross validation and test sets. You train on the training set, and try different parameters on the CV set. You test on the test set with the model that performed the best on the CV set to get an unbiased error of your model. If you only had 2 groups of data, then picking the model with the best parameters would be cherry picking. That's how I understand the process at least. Now however I have 3 models with  very similar results on the CV set. I'm wondering how to choose the best performing model on real (future) data without cherry picking.
Think you really have to consider the influence of individual professors on pass rate, not only department-specific dummies (no pun intended)...
I think you need to take a piece of paper and a pencil, and derive the square of your AR(1) process and its ACF. Doing things first by simulation will likely be misleading, and trying to generalize from one simulated series is just a wrong approach.
OK, thanks it was a first try. I'm not familiar with ETS models. I thought the package might self-tune some of the parameters from the training data (thinking in NN models and such). I'll dig into it. Thanks again.
Good answer. Regarding the last part (with respect to running the three models): The model with the intercept alone won't give you an $R^2$ value. Also, the $R^2$ values from the two models with just one predictor are probably not going to add up to the $R^2 = .85$ value for the full model with both predictors. That will only happen when the two predictors are uncorrelated. In other words, the two predictors will probably account for overlapping parts of the variance in the dependent variable.
Actually if you go and read [lrm](http://cran.r-project.org/web/packages/rms/rms.pdf) documentation you will see that the default penalty is "no penalty":  "_The default is penalty=0 implying that ordinary unpenalized maximum likelihood
estimation is used_"
Thanks!  That's what I needed.
Great... I wasn't aware of that!
That would be an interesting response to a referee: "We thank the referee for their comments, but think they're a bit dopey" ;) Good comment though.
I will go about this doc and try to fetch as many information as i can.
I don't know if thats possible in SAS: A gamma mixed model for values greater than zero (because of panel data; normally using Proc GLIMMIX) + proportion of zeros?
@NickCox, I agree w/ all of that, but I suspect the requisite discussion is too high-level for the OP & wouldn't be helpful.
This sounds the basis of propensity score matching, so I think the answer is yes.
@user1149913 seems to give a good answer to that part
what are the q_i and p_u matrices composed of?
@Piotr, Yes, covariance (or correlation or cosine) can be easily and naturally converted into euclidean distance, because it is a [scalar product](http://stats.stackexchange.com/a/36158/3277) (= angular-type similarity). Knowing covariance between two variables as well as their variances automatically implies knowing _d_ between the variables: $d^2= \\sigma_1^2+\\sigma_2^2-2cov$.
this is a common sitation in animal movement models (where we typically have turning angle and step length for each observation); https://github.com/benaug/move.HMM handles this, as I think does the `depmixS4` R package (more general).
I'd call it *backcasting* - which means I agree with @AndyW 's answer
@shabbychef - given that the reference provided speaks of *non-asymtotic* minimax rates... then no asymptotics should be done.  But you essentially have the answer anyway, just $L=n^{-n\\beta}exp(n^{2})$.  So (+1) from me
+1, very clearly explained.
Thanks for the idea. Will look into that.
"c" is the mean/average of "r" values. The problem comes only when we have R==C
Oh ok, I will read the link you've given to me. Thank you!
@danas.zuokas: updated the question!
@EngrStudent I have edited my question
+1 Thanks for your Answer - It wasn't clear to me that the Fisher transform was appropriate or not in this case, but your answer helps clear that up.
Where are you stuck? What have you tried so far?
You may be interested in this paper by Andrew Gelman and Iain Pardoe (2007) [Average Predictive Comparisons for Models with Nonlinearity, Interactions, and Variance Components](http://dx.doi.org/10.1111/j.1467-9531.2007.00181.x).
Isn't that what you wanted? "Now, what I am interested in is finding what are the probabilities for wearing red shoes for each of the five 'levels' in weather."  Yes, if your weather factor has 50 levels and you want an estimate for each you will get one.  Otherwise, you can select any subset of levels that you want.  If your "factor" is actually continuous, plot as many probabilities as you want.  See mod2 in the edit to the post above.
Do you want multiple test sets? Otherwise, I don't see what the outer loop does. Pseudo-code would help.
Good info, but I think the OP is asking why the term 'MAR' was chosen for this situation.  Before I learned about missing data, if I heard the term 'missing at random,' I'd think of situations that would actually fall under the 'MCAR' setting.
Will this be a Cox proportional hazards model? A parametric model? For Cox PH see [this vignette](http://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf)
I'm just kidding. It should just be enough to have confidence there's no uncertainty due to subsample choice. Traditional train-test validation is $k=1$, remember. $k$-fold "kicks in pretty quickly" as far as the $k$ is concerned, in my opinion. Double $k$-fold is not totally uncalled for if you HAVE to know, just do iterative split sample validation in your other $k$ to see how variable those model performance statistics are, but beware of small sample bias issues if you are getting very small $n$s there.
@Stijn No. But 6 hours is too long isn't it ?
Wow! I didn't expect this to vary. BTW, has the Nature style guide changed since you posted this answer? It's now pointing to "Life sciences reporting guidelines".
@HarveyMotulsky A good point but not strictly correct.  The chi square goodness of fit test applies to data from any probaility distribution including continuous and discrete ones.  The test statistic may involve counts for categories but the original data need not be.  In fact the test can be used to check normality.
This question appears to be off-topic because it is about Matlab code
What is N in your case? Individuals, firms, countries? You have time series with different lengths? Or you have holes in your time series?
I have no idea what you are asking for.
@Glen_b: thanks for editing! Avitus
One would view this as a likelihood, Michelle, for the purpose of estimating selection probabilities.  That does not appear to be the case here.
@dchandler, for the second question, I would not put it up like that as a question of a one-to-one relation of methods in machine learning and methods in statistics. A $t$-test is computed to answer the question: Is there evidence in the data to reject the null hypothesis that the means are equal? We can have a long discussion about whether this is interesting, and even whether the $t$-test and the corresponding $p$-value provide a good answer, but I don't think there is any point in asking if there is a machine learning alternative.
I am intrigued by "2-interval forced choice", but the wikipedia article seems to focus more on the time of response, which is not relevant for my application. Maybe you have a better reference.
And Chili recipes are not far off from my secret application..
Any ideas of how to proceed?
Thanks. I have added a background piece to the OP to clarify my question further.
Cross-posted: http://stackoverflow.com/questions/8436569/how-to-apply-a-arma-model-to-a-prewhitened-signal
There's no need at all to account for non-normality of *predictors* in regression.
@IrishStat To be fair Box and Tiao did a lot of work on intervention analysis and didn't it at least get some coverage in the later editions pf teh Box-Jenkins book?
Have you seen our [popular thread on $R^2$](http://stats.stackexchange.com/questions/13314)?  I'm not sure to what your "rigorous proof" refers, but if it concerns the meaningfulness of $R^2$, the many answers in that thread are worth reviewing.
Thank you! I thought silhouette plots are only available for the 2-step method. Good to know!