tttjjj/elt_bench huggingface dataset:
Lets see: you are saying -- for each unit, you have the treatment like (., ., .) and the dots represent one of ABC, one of XY, on of AB? and you have 18 such units? For eg: a treatment may look like (A, Y, A) for _a_ particular unit?
I think the "Thus, the" was left there by mistake, at least I cannot think what I would have wanted to add to that. Probably it was something that I finally moved to the second paragraph.
I lost you at "aggregate": could you explain more precisely what this amounts to and how C is supposed to be computed from A?  What kinds of summary statistics do you intend to develop and what will you use them for?  (The validity of any answers to this question depends on that information.)
@Glen_b: The quote you're referring to is the following: _"The statistician is no longer an alchemist expected to produce gold from any worthless material offered him. He is more like a chemist capable of assaying exactly how much of value it contains, and capable also of extracting this amount, and no more"_. I can't find the original source though, only a quotation in J. N. Spuhler's review of "Advanced statistical methods in biometric research" (Radhakrishna Rao, John Wiley & Sons, Inc., New York, N. P. 1952.)
I assumed this type of analysis would have a formal name (or as you say: "a general agreement" on how to proceed) and some literature on it, which I failed to find. Do you know of any application examples / papers online?
(+1) Thanks for reiterating the need to read the R vignette. Nothing's missing there. And for a more thorough understanding of it, all preprint/draft papers that sit on Jan's website, http://gifi.stat.ucla.edu/
The signed rank test assumes symmetry about the median. You might be able to adapt the sign test, but the effect of discreteness will need to be considered with care (i.e. you'll need to think about what you're actually trying to test and formulate both null and alternative - and from there, test statistic - so that they actually correspond to your question of interest)
How did you divide the data? Randomly, by hand, or some other method? Though, in truth, the part about "successfully created a model" is a MUCH larger part of the issue. Before doing expensive things, you should see if you're using the appropriate type of model, if you've overfit your training data, and if you have the appropriate data for what you are trying to predict.
Right. R has lots of routines for assisting with bootstrap and other randomization methods, but I don't know that you'll find anything specific to this problem.
Giving an answer that crucially depends on a link is not acceptable here, because links can "rot" over time. At a minimum please provide a summary of what you are linking to.
Could you pls give some indication about sample sizes, time frame, % survival, etc. so that we get a better idea of the design of your study?
What research have you done into the standard methods of constructing such confidence intervals? Are you having problems selecting among such tests? Or do you need help applying one of them in particular?
Can you provide a little more information on your measurement setup? Questions that come to mind: (**1**) Are these single-axis accelerometers or multi-axis? (**2**) Are they high-pass filtered or not and, if so, how? (It sounds like they are not, based on your description.) (**3**) What exactly are you measuring and what is the frequency range of the signal of interest? (**4**) What is the sensing mechanism (i.e., MEMS, piezoelectric, capacitive, etc.) or, even, part number(!) of the accelerometers you are using? ...
@jkndrkn: Multiple tests: I'd have a look at [Fleiss et.al.: Statistical Methods for Rates and Proportions](http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0471526290.html) about procedures for such tests. However, the key point for such multiple tests is always to use expert knowledge to cut down the number of alternatives as much as possible before defining the test because the required sample sizes explode with the number of alternatives (as you already realized).
What is your objective in fitting these models? Are you interested in path coefficients, overall model fit, structural pathways or measurement models...? CFA is a form of SEM, and you can fit as many as you want, but how many are appropriate will depend on whether you have hypotheses to test and what you're really interested in estimating. Hence it's unclear from this how to answer your question more informatively than, "Sure, why not..."
I'm not sure what this would tell you.  Most likely each time it would show that the sick people had less protein than the well.  So what does this mean?  Only that they are, or have been, sick... Unfortunately what you want to compare is sick people with a particular (or no) treatment with sick people with other (or no) treatment - and this is precisely what you don't have.
Certainly count data are ordinal. They are also interval. However, when a lot of the entries are 0, then the interval level measures don't seem to be ideal. You more or less acknowledge this, implicitly, by suggesting a cross table.
I agree, @marco.
thank you so much for your reply, im so releived now because i didnot want to delete the outliers
Thanks much for the comment -- greatly appreciated.
+1 Nicely explained and documented.
"Crossed" means that the factors are formally independent, not nested. "Full factorial" = "all main effects + all interaction effects" between factors (plus covariate main effects, if any)
Could you clarify how you obtained the total number of possible locations occupied after $t$ steps on a regular lattice? For example, plugging in $t = 0$, $t = 1$ and $t = 2$ do not give reasonable answers. Should your answer not be $t^2$?
Not my field, nor my religion, but I thought CFA meant confirmatory factor analysis. But to increase your chance of a good answer from those who do this, could you give a reference or an example?
Clarification: I wrote that I used quota sampling but it was in fact stratified sampling.
@mpiktas: I meant the distribution over the true mean and variance.   It's true that I'm making an assumption that the data was generated by a normal process, but that's not a big assumption since all of the variance estimation techniques assume something similar.  (If we had additional information about the generating distribution, any variance estimation method would have to take it into account.)
*Why* are you thinking it might be more appropriate to compare the minimum values? I would have thought it was more appropriate to compare typical values rather than best-case execution times.
Could you explain why points lying on the same hyperplane do not contribute "extra information" about an integral?  I am picturing a generic situation in which the domain of a measurable real-valued function on $\\mathbb{R}^n$ is sampled and the integral of $f$ is estimated by the mean of $f$ on the samples.  I cannot see any reason in general why such an $f$ couldn't vary substantially on *all* hyperplanes intersecting its domain.  Perhaps you are thinking of Monte Carlo simulation in a different sense?
Thanks. I wasn't aware of this facility in R. Julia is increasingly attractive.
http://people.duke.edu/~rnau/411arim.htm  that gives a very good description on the p,d,q and how to figure out values for each.  Hyndman who was one of the people who made the Forecast package for R also has a free book that covers the topic http://otexts.com/fpp/8/
(+1) Thanks for the link, looks promising. Found a graph-architecture example similar to the OP's one: http://networkx.lanl.gov/examples/drawing/ego_graph.html
The answer to 2. is that they were written by very different people to do very different things. `lm()` needed to compatible with S and various books, **nlme** didn't, and it aimed to be more flexible, allowing the heterogeneity to be modelled more flexibly than `lm` allows.
@HorstGrünbusch: Of course FDR and FWER come with different interpretations, but I am not sure what makes FDR unsuitable in this particular case (and suitable in some other cases). Can you elaborate on that, or maybe give some examples? I did not fully get the last sentence of your comment.
Thanks a lot. But one more thing: I have 100 variables to add like what you describe. Is there any way to automatically generate those terms? Thanks again.
@Harrell: Why the option of simultaneous prediction intervals is not available in the most recent version at CRAN? for the line:
p3 <- Predict(fit, age=c(60,65,70), sex='male', fun=plogis,conf.type='simultaneous') I got the following error:
Error in match.arg(conf.type) : 'arg' should be one of “mean”, “individual”
Awesome; thanks for the great answer!
It depends if you want to torture the students by the distinction of conditional/unconditional margins. If not you might just focus on explaining that "independence of two categorical variables" is equivalent to "homogeneity of conditional distributions" and then present the single $\\chi^2$-test. (I usually present it along with lower confidence limits for the true Cramer's $V$ that measures the strength of association.)
@user1513 By references I mean links to more information.
If wind is an important factor, and if the wind speeds are related for the two routes, then it would seem that a person would need information about the dependence between A and B to answer the question accurately.  You would need bivariate data for that, and it's hard to ride two paths at the same time.  You could enlist someone else to help you collect data, but then would need to account for the variability between riders.  In the case A and B are independent, the answers below are great.
(I assumed so far that if you generate many sequences of four then there's no overlap - once you get 4, the count of S's resets to 0.)
It can be easily moved around, though in a slightly tedious manner. For example, if you have between 33 and 1024 levels, create two factors each of <=32 levels.
The sentence following the use of "validity" explains *exactly* what is meant by not affecting validity.
PS I cannot upvote you because I dont have enough reputation apparently...
Why is there missing data? Is the data missing completely at random, or can the reason for a given observation being missing be explained by the non-missing data or the demographic data? The best method for handling missing data depends critically on the reason for missingness.
Are you aware of the ColorBrewer site and package? Lots of good ideas there.
Nice quote, though I can't help imagine how it would sound being spoken by Chris Eubank...
@Xi'an. Imagine a population of people with height, weight, eye color. Now, lets say height is Gaussian, weight is Gaussian and eye color is Binomial.  There are measured correlations between all these variables. I am wondering if there is a procedure for generating a person from this population randomly.
@gmacfarlane. My apologies- what do you mean by 'Does D vary with the alternatives?' ?
@DavidMarx, yes, I even have a better documentation: http://gking.harvard.edu/files/gking/files/making.pdf but I still dont understand how sample is being formed given the future x value.
Thanks for the list of references. I will check them out! What do you think about using stepwise selection to get down to a simpler model?
AN MA 1 coefficient of -.999999 indicates that you have a very questionable model. Try using the Box-Jenkins method of identification in order to form your model. If you post your data I will try and help you ( after the new year ! )
I responded in an edit of the response.
@Jugurtha: My bad: I should have written $E[C \\mid \\cdot]$ as a double integral: $E[C \\mid \\cdot] = \\int \\int C(\\hat{\\theta},\\theta) f(\\hat{\\theta} \\mid x_{1:n}) d\\hat{\\theta} f({\\theta} \\mid x_{1:n}) d\\theta$. That is, given a beliefs about the distribution of $\\theta$, you are able to formulate expectations of how far off a given point estimate is likely to be.  (I'll edit my original answer to fix.)
I understand that.  But, in the case I show, glmnet did find a fit.  It can overfit even if the two sets were independently generated.  I don't understand how the algorithm determines that the model it generated was overfit and decided to do the "correct" thing.
Heh, it is even answered in the duplicate; but let's call it a good duplicate.
+1; @Luigi, that's a shame, because this approach really is the answer to your concern.  I believe gretl and R are somewhat similar, and R is also free, but *much* more extensive than gretl.  There are also a great deal of online tutorials, etc.; R may well be worth your while to learn.
(+1) Nice, clear answer.
How do you conclude that the "gls model" has a better fit? If you base your decision on AIC, then be aware that this MIGHT be dangerous. Indeed, "lme" and "gls" do not necessarily use the same log-likelihood: it may be that one of them left all additive constants out of the log-likelihood while the other include them; and this would compromise the comparison of AIC's.
Just finished reading this, and it was exactly what I was looking for, so thanks for the recommendation. I found the writing quality fairly poor, which was quite distracting at first, but I got used to it after a while. The material covered is excellent, and it gives a great historical account of where stats has come from, and what drove the people making the discoveries, and leaves you with a glimpse of what's yet to come, and an feeling of the exciting possibilities of getting more involved in the field. Might see if I can get some of my stats-hating friends to read it :)
I'd have called that a moderator too.
Hmm.. No, they shouldn't be the same. For once, in the linear regression $y \\sim N(X\\beta,\\sigma^2 I)$ so $\\bar{y} \\sim X\\beta$ not $\\bar{y} \\sim \\beta_0$. In addition to that you are talking about samples vs. population estimates. Finally specifically for this case the differences appear pretty minuet for practical purposes anyway.
Indeed, in logistic regression there is no assumption of normallity (or logistic distribution in this case). The link function $F$ (sometimes denoted $F^{-1}$) is used for modelling the relationship between the probability of observing a $1$ ($0$) with the covariates through $P(Y=1\\vert \\beta, X)=F(X\\beta)$. A poor fit/performance *may* be due to the choice of the link function. An alternative for sorting this issue consists of using a more flexible distribution, see for example [this paper](http://biomet.oxfordjournals.org/content/95/1/93.refs).
I did have a look at 27 x 26 before posting the answer (with color and shape according to first and second letter being upper case). But that didn't convey an easy message, so I immediately went back for the larger grid.
Also see figure 3.11 in [ESL II](http://statweb.stanford.edu/~tibs/ElemStatLearn/download.html) (page labelled "71" in the 10th printing of the book) and the nearby discussion.
A good example I found online was if you code school type as: Elementary School (1), Middle School (2), High School (3), and College (4). By most measures, the difference between Elementary School and Middle School is not the same as the difference between High School and College.
1. Thank you Masato, I checked and my highest variance ratio accross all levels is 2.7
Yes, rather than starting with the data, start with the question and the data generating process.
Apologies, here are the figures:                            DV: Range=3.00, Mean=1.41, SD=0.78.                Unstandardised coefficients: Predictor(.71),Constant(3.42), Moderator(-.04), interaction(.04).      Variances: predictor(0.02), constant(4.21), moderator(0), interaction(0). Df=92. Moderator: M=86.11, SD=8.92. Hope the above values make sense.
If I am not mistaken, what you say seems to apply to any kind of dynamic misspecification. Of course, that can be dealt with by using some ARMA model for the error terms. From what you wrote above, I do not see any particular reason to believe that weather shocks or coupon campaigns have an MA(q) structure. Am I missing something?
@eykanal you're right, that's caused by editing it from saying something else and not doing it properly; now fixed.
Because while i have good understanding of the normal distribution, from my university days, i am over my head when we get to things like *"Kullback–Leibler divergence"*.
Cleveland suggest that when breaking the scales like this to have more "forceful" visual separation (see a [similar Q/A](http://ux.stackexchange.com/a/41560/10639) on the user experience site). So the idea is a good one, but I might suggest separating the panels so it is much more visually clear that there is a break in the axis. What do you think about a linear scale on the lower panel and a log scale on the upper?
n-thing the Odds ratio. I know nothing about pig's tails, but the most informative question here seems to be: how much more likely is a pig to have an abscessation, given it has a tail lesion? (Include a CI, too.)
I'm looking for not just sequences, but for sequences with possible pitfalls. The distribution kind is not very much  relevant here.
By the way, if something can be done to improve the answer, feel free to offer suggestions. I would be more than happy to edit the answer in response to reasonable, constructive feedback.
@mpiktas 1900 and onward seems unlikely as the standard probit model dates from 1934/5. What's computationally tractable depends on the available algorithms as well as the available computing power, so 2000 onward seems believable to me.
Expanding on @CloseToC's answer, consider the case when $C=B^c$. Then, you are asking whether it is always true that $P(A\\mid\\Omega) = P(A) \\geq P(A\\mid B)$ and the answer is clearly No. The conditional probability of $A$ given $B$ can be smaller, larger, or the same as the unconditional probability of $A$.  Simple examples of all three cases are easy to find.
Your comment (and it should be posted as a comment, not an answer) is a bit overblown (murder?!). You should delete this and post it as a comment, but tone it down while you're at it.
In other words, 'test the preference' = the probability distribution of choices is not random uniform, but multinomial with more probability on some of the products. Maybe to simplify the problem we can consider that many choices can be made from the same basket. Maybe this way I could have like M bernouilli trials of e.g. A, each with a different probability (1/4, 1/6, 0...1/6) and check that choices of $A$ (A=True) are higher than expected.
@AndyW True, they are quite different. I may try and spin it up into a full comment after lunch.
Thank you very much for your answer. I have a similarity matrix, how can I get some underlining structure of it? / features from it? may be spectral clustring, etc.??
You should probably go back and edit your original question, or at least edit this to link to it. For others' info, that question is here: http://stats.stackexchange.com/q/80835/32036 Also, I think you still need to clarify exactly what questions you are trying to answer with statistical analyses, and maybe a bit about how you're doing the calculations that you're comparing.
Just to be clear: you want to compare clusters of *nests* rather than clusters of birds (A+B+C+D+E to F+G+H+I+J)? And the attribute you want to compare within and between is the `attribute` column of `my.locs`?
"Squaring always gives a positive value, so the sum will not be zero." and so does absolute values.
This is type II censoring (http://en.wikipedia.org/wiki/Censoring_%28statistics%29). Now, it can be shown that the usual likelihood in survival analysis also holds for a censoring mechanism of type II.
Is the data published as a data set or did you "scrape" it off the site? If the latter, what do their TOS say about use of the site, e.g., are the use of "robots" restricted or otherwise discouraged? Have you considered simply contacting the site to obtain explicit permission?
So something like `lm(y~I(0.4*predictor1+0.2*predictor2+0.1*predictor3))`
"Forecasting sales from customer inquiries" is the type of example that you should have mentioned in the question as that enables a better response. Another tool that helps in this context is correlation coefficient (See: http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient). This concept is closely related to linear regression.
Do the three residues influence one another?  Does P_all = P1+P2+P3 mean anything on its own, or is it just an aggregations of different things?
@gung: every previous question on this topic has decayed into people insisting that it was not necessary, and indeed heretical, to plot a sample tree. Read the citations I gave. I'm looking for a sketch here of how to code plotting an rf tree.
+1 At least these chapters are available on the Web: I think that qualifies.  Thanks, Aaron.
It's a great question.  The optimal solution will depend on some additional things, including (a) the principal elements of the cost, including the cost of including one farm and the cost of measuring one subject; and (b) the experimental design.  E.g., will both the treatment and control solutions be applied at each farm (a good choice, but not without its potential problems) or will you be able to apply only one solution at each farm?  Will subjects be clustered (physically) within farms or treated and sampled truly at random?
Arun, thank you for your suggestion! If I were interested in probability estimates instead of classification scores, then do you think I could do the same thing with probabilities instead of 1s and 0s?
I have converted them from pdf to text files using an open source pakage pdf to text..
Thanks for the references and r function. I still prefer the interpretation of d-based measures (where they apply) over variance-explained-based measures. I find it clearer to think of the effect of an intervention in terms of a difference score.
I assume ANOVA would help, but I'm unsure of how to build the model, something like conc~geno+region+elem, random=id (which means relate conc to geno, region and elem, and allow for the random factor id, I think !).  Check out http://www.personality-project.org/r/r.anova.html and http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf
@nico You might be interested in this paper: [Investigating the behavioural characteristics of lottery players by using a combination preference model for conscious selection](http://onlinelibrary.wiley.com/doi/10.1111/j.1467-985X.2011.00693.x/abstract) (JRSS A, 17(4):1071).
+1. While it would not be my first suggestion to understand the GLM/GLMM comparison it will probably beneficial for the OP indeed.
@Germaniawerks mentioned that it is using alpha for both components
You can mark this reply as accepted (and change at a later time if another answer is proposed).
Required by whom? And why? Can you  show him/her the folly of doing this?
Be careful!  Please read our FAQ and the wiki for the `Homework` tag and note that questions from textbooks, like this one, are welcome *provided* you indicate what research you have done, what progress you have made, and specifically where you need help.  Without that additional information, such questions will be closed automatically.  To would-be respondents: please note that guidance is welcome, but [detailed solutions are usually not](http://meta.stats.stackexchange.com/questions/12/how-should-we-deal-with-obvious-homework-questions).
I guess that increasing the penalty parameter of the Lasso model will eventually lead to zero coefficients. Further help will probably require further information on what you do and what you obtain.
If the univariate distributions are Normal and independent, then the distribution of differences must be Normal.  Its lack of Normality demonstrates a dependence between the two distributions.  The dependence is not merely that of correlation: there must be something else going on, too.
All the simulation work is now complete, I am just putting the paper together at the moment (mostly just ensuring that it is all fully reproducible).  I have saved all of the grids so some reanalysis should be possible to look into other questions I didn't think of at the time.