instruction
stringlengths
9
38.7k
I have a question on the difference-in-differences estimator. Suppose my data consists of two periods and the treatment is administered to some of the individuals in period $t = 2$. I estimate this model: $y_{it} = \beta_0 + \beta_1 treatment_i + \beta_2 year_t + \beta_3 treatment_i \times year_t + \beta_4 x_{it} + u_{...
I was just having been assigned a project of conducting sentiment analysis for some document collections. By Googling, a lot of sentiment-related research has popped up. My questions are: What are the major methods/algorithms for sentiment analysis in the field of machine learning and statistical analysis? Are there ...
I'm currently facing a problem I have been stuck in for almost half a day and I really can't keep this because I have a lot of work to do! It obviously has to do with the birthday problem. The original birthday problem solves the question of "what is the probability of having at least two persons with the same birthday...
I have a ($k$-class) classification problem, with of the order of 100 real-valued predictors, one of which appears to have much more explanatory power than any of the others. I'd like to get deeper into the effects of the other variables. However, standard machine learning techniques (random forests, SVMs, etc) seem to...
I have survey data from students from two Universities. One of the questions in the survey had 4 response categories and students were allowed to check only one (categorical variable). I want to make a table that shows the odds ratio and 95% CI for OR with University arranged in columns and all 4 possible answers in ro...
I would like to have a reality check of my understanding of the MH statistic. I have been trying to reproduce an example of the Mantel-Haenszel test provided in Conover (1999, p. 192-194). The data is structured as other examples provided for the procedure in R. The statistic produces is the $T_{4}$ value, which is d...
Let's say I have some kind of survival data - i.e. I'm giving a drug that may cause mortality. So I have three patients: A, B and C. All are given the drug at Time t1. Let's say patient A dies at time t2. Patient B dies at time t3. And Patient C dies at time t100. Clearly, the likelihood that the drug caused the death ...
I have a dataset, consisting of two independent variables each with two levels. The independent variables are individuals (1 vs. 2) and light (day vs. night) The dependent variable is the efficiency to detect an object (in other words the proportion of objects detected in a known population of objects). I want to find ...
So its like saying 95% of the items sold in this website costs between $$25 - $150. While some items might cost less than $25 and other items might cost more than $150. Is there a way to find this? Is this something related to CI - confidence Interval?
Does the Gibbs sampler converge to a global maximum in the presence of multiple modes? For example in case of a Gaussian mixture distribution?
Can somebody explain to me the difference between linear model and loess model in statistics? I need to explain this to non-math people.
I am running a GEE negative binomial regression to see how predictors affect the onset of violence through time. I have an $X$ variable (vegetation cover) which is calculated as whether an observation differed positively or negatively from the mean of the overall $X$ variable. It was calculated from raw values and cove...
What does the $MI(X,Y)$ convey about $Y$, when one of the probability distributions, $X$ is trivial and has all the probability concentrated at a single point?
I need to find the geometric mean of 0 and 600. Would it just be the square root of 600? I know that the formula is $$ \bar x_{\mathrm{GM}} = \left(x_1 x_2 \cdots x_n\right)^{1/n}, $$ but in this case one of my values is 0, so I'm not sure.
I have the cardinalities of sets $N_i, \forall i \in 1,2..n$, and the cardinalities $|N_i \cap T|, |N_i|, |T|, |N_i \cup T|, \forall i$, are known. Here, the set $T$ and sets $N_i$'s are all subsets of a mother :) set M and $|M|$ is also known. Using these quantities, I would like to compute the normalized mutual inf...
I'm brand new to statistics and am studying the math behind split testing (A/B and multivariate). I've learned how to calculate $\chi^2$ with given test data, and I understand how to translate this into a probability via a table, but I'd like to be able to calculate the probability myself. I've read through a couple of...
I have 82 respondents in 2 groups (43 in Group A and 39 in Group B) that completed a survey of 65 Likert questions each ranging from 1 – 5 (strongly agree - strongly disagree). I therefore have a dataframe with 66 columns (1 for each question + 1 indicating group allocation) and 82 rows (1 for each respondent). Using ...
When using topic modeling (Latent Dirichlet Allocation), the number of topics is an input parameter that the user need to specify. Looks to me that we should also provide a collection of candidate topic set that Dirichlet process has to sample against? Is my understanding correct? In practice, how to setup this kind ...
Are there any references or standards that dictate the color coding of the zones of a Shewhart style control chart. We use green in +/- 2 sigma range, yellow between 2 and 3 sigma and red beyond 3 sigma. I am hearing that using green, yellow and red is not good because of other connections (like a traffic light) we hav...
Boosting algorithms, such as AdaBoost, combine multiple 'weak' classifiers to form a single stronger classifier. Although in theory boosting should be possible with any base classifier, in practice it seems that tree-based classifiers are the most common. Why is this? What properties of tree classifiers make them best...
Hate asking such a general question, but I'm so unfamiliar with statistics in general that I don't know what to search or where to find the answer. I'd like to learn how to manipulate errors. Like, if I had a function $f\left(x,y,z\right)$, and I knew $\sigma_x,\sigma_y,\sigma_z$, what the error of $\sigma_{f}$ is.
I'm going to preface this all by saying that I'm pretty pedestrian when it comes to large statistical analysis. I have approximately 11K discrete events and a corresponding score. I also have approximately 500 binary attributes. Each event is positive for one to six attributes. How do I go about trying to figure out th...
Given a partial sample of values from a set (known size), how to extrapolate the lowest/highest value in the entire set?
Suppose that I have a time series, $x_{1:n}$, and I would like to test whether they are all independent samples from the uniform distribution on $[0,1]$. This is a somewhat basic question, but how do I correctly test for that? I am using the Kolmogorov-Smirnov test to check that they are uniform. One thing I can do is...
I'd like to test for and estimate group differences in NIHSS (National Institute of Health Stroke Scale) change between hospital discharge and three months after hospital discharge. Because the score is bounded between 0 and 42, the signed difference between the two measurements seems to me inappropriate, as people wit...
I have $K$ datasets, each with $N$ variables and $M$ samples (they are in fact EEG time series, but I discard time and treat them as $K$ iid multivariate samples) and assume they are coming from the same multivariate normal distribution. I am interested in estimating the covariance matrix. Now it can be done in two way...
I need to use DCT on frames of videos as a feature vector to train a Feed-forward artificial neural network, but the problem is the large number of coefficients (in thousands or so). How can I choose some of these coefficients and still capture the majority of information for my image (frame)?
I have a histogram with two peaks and I want to generate the corresponding probability distribution. I have used the following MATLAB code: A=mydata; M1=max(A); M2=min(A); I=(0:100).*(M1-M2)./100+M2; [n,x]=hist(A,I); bar(x,n/(1000*0.352)) I found this code frequently to explain how we can find a prob distribution for ...
I'm having following problem while doing some analysis with R. I have a dataframe like this: Name | Group | Count Person 1 | A | 3 Person 2 | A | 1 Person 3 | A | 0 Person 1 | B | 5 Person 2 | B | 0 Person 3 | B | 1 Person 1 | C | 1 and I'd need to "expand" it (not sure if the right term) to be like this: Person 1 | ...
It is known that the bootstrap can fail. I read in Section 6 of Bickel and Freedman (1981) that the bootstrap fails when you wan to use it to evaluate the MLE for estimating the parameter of a continuous uniform distribution. I read Secion 7.4 of the book by Efron and Tibshirani but I'm not able to find the reference t...
I am new to R(learned the basics) In my current job I have to solve the following problem(the following is an example) Suppose we have 10, 000 users For each user we have his expected monthly spending(in dollars)(with some method that I don't know) for one year What we have to do it fit a model where if for th...
Using sparse matrix objects in svm training in e1071 returns different results than running on the same data represented as standard matrix: library(e1071) library(Matrix) library(SparseM) m=10 n=800 #means <- colMeans(myData) #stdDevs <- apply(myData, 2, sd) means <- c(0.042154664, 0.010474473, 0.106408354, 0.00223722...
If there are $n$ samples $X_1 \leq X_2 \leq ... \leq X_n$ from a continuous uniform distribution with pdf $f(x)=\frac{1}{\theta},0\leq x \leq \theta$, then it is well known that the MLE for $\theta$ is $\hat{\theta}=X_n$. However, if the bootstrap is used to estimate the confidence interval of $\hat{\theta}=X_n$, we ...
I have an unbalanced panel data set of 40 cities and 20 years. It is unbalanced because the data are not collected for certain cities for every year. The data are then balanced after these 20 years. Suppose the time periods are 1960 to 1979 and then 1980 to 1999. I want to compare the data for 1979 with the data fro...
After some amazing help, especially from @jbowman, I was ready to get into my models but have hit a snag that I don't understand. I decided to try package MuMIn as it works with lme4 so that I am able to do all the models in once shot rather than running them each one at a time. However apart from loading it and then l...
If $X \in \mathbb{R}$ is a continuous random variable then its density $f$ (if it exists) is defined as $$ f(x) = \lim_{\epsilon \rightarrow 0} \frac{F(x + \epsilon) - F(x)}{\epsilon}, $$ where $F(x) = \Pr(X \leq x)$. It is sometimes more convenient to think of it as $f(x) = \Pr(X = x)$. However, this cannot be writt...
I'm estimating a couple 3 level logit models using Stata 12 and am faced with a dilemma about how (or if) I should specify my third level. The data is court cases nested within judges nested within circuits. The only random effect is the intercept. There's over a million cases, about 500 judges, and 20 circuits. The...
I run a backward variable selection logistic regression and find out the SAS program selected 12 variables and give me the output like this: It is funny that my configuration of the SAS backward selection is to make the SC(SBC) lower. Overall, the result looks like the SC result suppose that intercept with covaria...
I do not know anything about statistics. I am a software engineer. I had a question in my mind and I think here is the place to get my answer. Suppose that I have data for 3 months. The data shows my visitors on a daily basis. Is there a possible way to know how many visitors I will have in e.g. 6 months? If yes, I gue...
Possible Duplicate: How to interpret regression coefficients for a variable with takes positive and negative values? I'm performing negative binomial regression and one of my centered-mean X variables (with 200 observations) ranges between -0.2 and +0.2 around the 0. Do regression coefficients only account for a pos...
Possible Duplicate: Is there a way to predict future change based on data? I do not know anything about statistics. I am a software engineer. I had a question in my mind and I think here is the place to get my answer. Suppose that I have data for 3 months. The data shows my visitors on a daily basis. Is there a poss...
I have two features which are both continuous. How to perform a classification task based on them? I've read the Wikipedia entry on Naive Bayes, but this is only for discrete outcome and one feature.
I modelled a binary response against several explanatory variables using logistic regression. There were various combinations of the explanatory variables that produced reasonable fits. I would like to validate and compare the models by using 10-fold CV by comparing the mean positive prediction rates. When doing such a...
I have data extracted from a state machine. Each row of data looks like this: label1,label2,label3,impedance,did_state_change The column data types are described as follows: label1,label2,label3: These are nominal (categorical) values impedance: This is a ratio value (float number) did_state_change: This is a categori...
I have a time series that contains double seasonal components and I would like to decompose the series into the following time series components (trend, seasonal component 1, seasonal component 2 and irregular component). As far as I know, the STL procedure for decomposing a series in R only allows one seasonal compone...
I have a set $S$ of $N$ real numbers. I wanna calculate the mean $m$ variance $v$ of $S$. But since $N$ is too large, I do not want to use all of the numbers. Instead, I would like to sample $n$ numbers uniformly randomly from the $N$-number set $S$, such that mean and variance of the sampled set does not deviate too m...
I am developing an app for time series analysis that should support the following: Exponential Smoothing (Holt-Winters) Box-Jenkins curve fitting (straight line, quadratic, exponential, growth) multiple regression Croston's intermittent demand model and discrete data models new product forecasting (Bass diffusion) Ar...
The G-Test is a way to get quick estimates of a chi squared distribution, and is recommended by the author of this well-known A/B test tutorial. This tool assumes a normal distribution and uses difference of means to compute confidence. What is the difference between a G test and a T test? What are the benefits or down...
Assuming "complete randomness" and given a string with a length of 20 characters where each character may be one of 62 possible characters: What are the total number of combinations possible? (Guessing 20 to the power of 62.) Also, if new strings are randomly selected one after another and added to a list of strings...
I have in mind the adjusted R-squared formulas proposed by: Ezekiel (1930), which I believe is the one currently used in SPSS. $$R^2_{\rm adjusted} = 1 - \frac{(N-1)}{(N-p-1)} (1-R^2)$$ Olkin and Pratt (1958) $$R^2_{\rm unbiased} = 1 - \frac{(N-3)(1-R^2)}{(N-p-1)} - \frac{2(N-3)(1-R^2)^2}{(N-p-1)(N-p+1)}$$ Under wh...
I would like to test if each of the red observations is more extreme in variable xy[,2] than 95% of a null hypothesis (black dots) generated by randomization. I am not interested in relationships between the two variables. My instinct is to bin xy[,1] and ask if a red observation that falls in a given bin is more extre...
I searched for references on using subsampling or the delete-d jackknife to calculate confidence intervals but wasn't able to find much. Could someone please offer more reference on using subsampling or the delete-d jackknife to calculate confidence intervals?
It seems that most authorities agree that dark or otherwise prominent gridlines in plots are "chartjunk" by any reasonable definition and distract the viewer from the message in the main body of the chart. So I won't bother to give references on that point. Equally, we can all agree that there will be times that pale ...
Conceptually we learn that the sample variance formula, we have to divide by n-1 such that it gives the correct estimation for the true variance. However if we have this example, let a sample $X_i = 1$ with probability $p$, and $0$ with probability $1-p$. so if we define a statistic $\hat{p} = \frac{1}{N} \sum X_i$, we...
I am using logistic regression to predict electricity spike prices (price that exceeds a certain threshold). I directly use the following variables as my independent variables together: (a) demand/load - a continuous IV (b) is a binary IV (c) days of the week (d) months of the year. I used the reference category for (c...
I have the time series of the prices of two securities, A and B, over the same period of time and sampled at the same frequency. I would like to test whether there is any statistically significant difference over time between the two prices (my null hypothesis would be that the difference is null). Specifically, I am u...
I am trying to find the correlation between a dichotomous and a continuous variable. From my ground work on this I found that I have to use independent t-test and the precondition for it is that the distribution of the variable has to be normal. I performed Kolmogorov-Smirnov test for testing the normality and found th...
I am presently trying to learn R. I would like to be able to apply it more in my work environment as I am an analyst in the Health Care industry. I am presently trying to use R to forecast. What is the best forecasting package in R? I am presently using the forecast package. I have tried to fit the ets models to ...
I have 3 groups randomised to intervention A or B or control. Participants were measured pre and post intervention - should I use repeated measures ANOVA or ANCOVA with the variable measure at time 1 (pre) as the covariate? Variables are continuous. thanks
What sort of test should I use to get the p-value after getting a shannon diversity index? Also does anyone know if and how they can be done using PRIMER 5?
I've learned in my probability courses that the cumulative distribution function $F$ of a random variable $X$ is right continuous. Is it possible to prove that?
Given the number of users of an application was 70 in total, it's my understanding that research shows: Five users is the number of users needed to detect approximately 85% of the problems in an interface, given that the probability a user would encounter a problem is about 31%. Thing is that over time, it seems ...
I am familiar with PCA as a linear transformation in order to align the axis of the IV space with the directions of maximal variance in order to possibly be able to reduce the dimensionality of the problem. Are there similar techniques (or can one use PCA itself) when facing a binary classification problem? Like a logi...
I did a study monitoring the stability of an enzyme exposed to different conditions over time. Each day for 30 days, an aliquot was taken from each storage sample and analyzed in duplicate. I wanted to use statistical analysis to show mean changes during the 30 day experiment between the different conditions for analy...
I'm reading up on RBMs and this is not obvious to me. I'm imagining RBMs being used for something like the Netflix Prize (since that was one of the papers I read on it). So you have a bunch of movies in the visible nodes, and the genre of those movies in the latent variables, but in the energy function, there are bi...
The objective of fisher linear discriminant analysis can be formulated as maximizing $\frac{Tr[X^TAX]}{Tr[X^TBX]}$ over $X$ where $A$ and $B$ are positive semi-definite with orthonormality constraints over X. What is the significance of the orthonormality constraint in here? I am also curious if reformulating this o...
I have been asking a number of questions about fitting mixed effects models. Thanks to a number of wonderful statisticians on here I have come far, and I thank you for you continued patience. I was going to ask this question live in chat but when I officially registered my username I lost my reputation and it has rever...
My understanding of the bootstrap approach is based on Wasserman's framework (almost verbatim): Let $T_n = g(X_1, ..., X_n)$ be a statistic ($X_i$ is the iid sample drawn from distribution $F$). Suppose we want to estimate $V_F(T_n)$ - the variance of $T_n$ given $F$. The bootstrap approach follows these two step...
I'd be grateful for any hints or help with this question: Let $X$ follow the Weibull distribution with pdf $f(x)=\beta x^{\beta-1}e^{-x^{\beta}}$ on $x>0$ with $\beta>0$. Show that $E(X^r)=\Gamma(\frac{r}{\beta}+1)$ where $\Gamma(a)=\int_{0}^{\infty}x^{a-1}e^{-x} dx$ This is how far I have got....... $E(X^r)=M_X^{(r...
Consider the nested logistic regression model’s following interpretation. A person repeatedly chooses between two different options. These options feature different levels of the same features (e.g. car characteristics). In some cases, the person will choose option 1, in some cases the person will choose option 2. The...
I'm a postgraduate economics student but not of the statistically inclined sort :) Im running a regression to estimate the likelihood of a patent being litigated. I have two dummies for the patent owner type; let's call them SmallFirm and LargeFirm. The reference category is individuals. What I'm actually interested i...
I'm currently looking at a 2x2 Repeated Measure Anova for an undergrad project but I'm struggling to find information about which means to report. I will be reporting the Within-Subjects Anova,the Interaction and the Between Subjects Anova. I have a Profile Plot to show the Estimated Marginal Means of Measure1 which I ...
I want to make a nested logistic regression in R with the package mlogit. I would like to test how producer's decision to enter organisations (14 organisations) or not is affected by different factors. Producer can be in specific organisation and other according to year. I was advised to use year as separate variables ...
I can't figure out how to (or even whether it is possible) to use the plm package in R to run a regression including fixed-effects that do not correspond to the individual observation unit. For instance, I have observations on firms' outcomes, but I need to include sector-specific dummy variables. Of course I would hav...
I have a data set of 91 variables. It is related to a qualitative analysis I made to analyse a few phenomena. For this reason, the questions are grouped in 10 clusters, since they express different aspects of the analysis. I made a subset using the following R command: example1<- subset(data, select=c("a1", "a2", "a14...
I have a rather complicated decision analysis problem involving reliability testing and the logical approach (to me) seems to involve using MCMC to support a Bayesian analysis. However, it has been suggested that it would be more appropriate to use a bootstrapping approach. Could someone suggest a reference (or three)...
Given two independent variables with Beta distribution, $X \sim \text{Be}(a_1, b_1)$ and $Y \sim \text{Be}(a_2, b_2)$, how do you find the probability that the value of X is greater than the value of Y for a given observation? Does this probability have a name that I'm just blanking on?
I have a dataset of around 100 different subjects Some of them have a disease, some do not (roughly 60:40 disease:no disease) They are subjected to a battery of 15 tests, to see if they are outside "normal" ranges. Just plotting the values for the different tests for disease vs. non-disease as different colours (using ...
I have a dichotomous variable which I am trying to predict. In order to do this I have about 2000 variables out of which 1100 are continuous variables (real values between 0.0 and 1.0) and the rest are categorical variable (0 or 1). I am a total newbie and would like to know how to go about it. I am not aware of the r...
Does there exist any agreement on what must rejection regions look like topologically? If we identify the region of "acceptance" with the corresponding confidence interval (or confidence region in dimensions greater than 1) then, according to this question, it seems that rejection regions must be open. On the other han...
I measured a binary variable from two different populations, and now I'm trying to find out whether the different populations differ with regards to this variable. I could use a Chi-Square test, but that would necessitate that both populations have the same length. Is there an appropriate test for these circumstances? ...
The traditional Discrete Fourier Transform (DFT) and its cousin, the FFT, produce bins that are spaced equally. In other words, you get something like the first 10 hertz in the first bin, 10.1 through 20 in the second, etc. However, I need something a little different. I want the range of frequency covered by each bin ...
I was looking for information about feature selection and crossvalidation, when I found this post: Feature selection for "final" model when performing cross-validation in machine learning. where there is a discussion about how to use feature selection on cross-validation. I saw that the procedure described is somewhat ...
I have the following Y outcomes distribution with the normal density function represented by the superimposed red line: I need to develop a regression methodology to predict $Y$ given a number of predictors $X_n$. OLS doesn't seem to fit the bill because of the non-normal distribution of $Y$. Given that the outcomes a...
If I am trying to analyse wether a known effect is inhibited by another factor, is it a fallacy to analyse the influence of the factor on the effect size directly? I.e. can I just use a statistical test between the effect sizes for different conditions, or do I have to do a full interaction model? Here is the setup. In...
Why do we usually assume that random effects come from a normal distribution? Can we assume another distribution? Or maybe because the CLT indicates that a random effect is normally distributed?
I am attempting to show the correlation between two features of a dataset is weak. I am under the impression I should be using a t test for this to measure statistical power but would like to know how many samples I would need to show that the correlation is less than x%. Am I to understand that I would need many sampl...
I have a huge data set (33K), each represented as a bit-vector of 275-dimensions. basically my data set can be represented as a 33000 x 275 matrix. I want to cluster these bit-vectors. I have tried single link hierarchical clustering on a small data set, 3000 x 275, the result is promising. I know that single link hier...
Estimates for the fixed effects in a mixed-effects model are known to be asymptotically normal in distribution (under mild assumptions). Are there any results that quantify the deviation from normality (in general, in simple cases, or just simulation studies)?
I have the following Cox PH model: (Time, Event) ~ X + Y + Z I would like to get the predicted hazard rates (i am talking about hazard rates NOT hazard ratios) given specific values of X, Y, Z. I know the muhaz R package can calculate the observed hazard rates, but I am interested in the predicted model. Is there a w...
I have 2 questions. 1) How can I have p.value for my 2 functions? My hypothesis is that I have a correlation between my function and my data. 2) How can I have a confidence intervals for my 2 functions? library(ggplot2) g <- function (x, a,b,c) a * (1-exp(-(x-c)/abs(b))) X1 <- c(129.08,109.92,85.83,37.72) Y1 <- c(0.7,...
Let $X$ be a multivariate normal random variable with known mean and covariance, and $Y$ be another random variable. We know for sure $\|X−Y\|_2\le C$ where $C$ is a known constant. A few questions: Is it possible for $Y$ to be normally distributed? Can we say anything about its mean and/or covariance? If we know the m...
I have ran a series of models to see which best fit the response variable and I got the following (for the model average of all models with a $\Delta AIC < 2$). I am currently learning models so this output is one of my first: Estimate Std. Error z value Pr(>|z|) (Intercept) 102.7190 5.5300 18.575 ...
Set-up: One of the fundamental elements of direct marketing is choosing which lists of prospects to select and send an offer to. There are hundreds of lists on the market to choose from and each list will contain a specific number of records you can send an offer to. I have a table of historical performance of list. F...
I use a regression as my predictor. Let's say my regression is $y = a_1 x_1 + a_2 x_2 + a_3 x_3$ I realized that in practice, when my prediction is way off, it's usually because one factor significantly skewed the prediction. For example, $x_1, x_2$ are both slightly negative, while $x_3$ is very positive. In this cas...
In this discussion on probit vs. OLS models 'Conjugate Prior' mentions that probit and all GLMs allow to specify a DV distribution. How is the GLM improved by specifying a DV distribution and what is the implied DV distribution for OLS then?
I've worked the slope all the way down to $\sum [x_i(y_i - \bar{y})] = \hat\beta_1 \sum[x_i(x_i - \bar{x})]$ But I can not figure out how to show the steps for: $\sum[x_i(y_i - \bar{y})] = \sum(x_i - \bar{x})(y_i - \bar{y})$ and $\hat \beta_1 \sum[x_i(x_i - \bar{x})] = \hat \beta_1 \sum(x_i - \bar{x})^2$
I have something like this: Case I A |-----------------| |------------------|B Case II A |-----------------| |---------------------| B And the following numbers: Total generated by A Total generated by B as seen by A A 1000 ...
Suppose $x_i$ are drawn i.i.d. from a $p$-variate Gaussian, $\mathcal{N}\left(\mu,\Sigma\right)$. Suppose one observes $x_1,x_2,\ldots,x_n$. One also observes $s_{n+1},s_{n+2},\ldots,s_{n+m},$ where $s_i = \mbox{sign}\left(x_i\right)$ is a $p$-vector consisting of -1 and +1's. (Well, in principle, it could contain some...
I am trying to understand how cdplot in R behaves, but I am missing something. When I copy/paste the following example given in the documentation for cdplot: > fail <- factor(c(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1), levels = 1:2, labels = c("no", "yes")) > t...