instruction stringlengths 9 38.7k |
|---|
I just got my hands on the ANES (American National Election Studies) 2008 data set, and would like to do some simple analysis in R. However, I've never worked with this complex of a data set before and I've run into an issue.
The survey uses oversampling and has a variable for post stratification weights. I had only th... |
What techniques/approaches are useful in testing statistical software? I'm particularly interested in programs that do parametric estimation using maximum likelihood.
Comparing results to those from other programs or published sources is not always possible since most of the time when I write a program of my own it is ... |
I would like to know if there are SOM implementations (preferably R) available that accept fuzzy input. That is, I have data in which some nominal features are spread out between a number of categories. For example: feature 1 has 5 categories and an observation might have the values (which are actually probabilities) [... |
I'm trying to estimate the state of a Gaussian random walk with central tendency based on time series measurements with varying uncertainties. My random variable has the following form:
$ \frac{d x}{d t} \equiv F(t) - \alpha x $
Where F is a Gaussian random variable. I've noticed that this problem is analogous to the... |
I am trying to model weekly disease counts in 25 different regions within 1 country over a ten year period as influenced by temperature. The data is zero inflated and over dispersed.
I am most familiar with Stata but I don't think that there is any option amongst the gee, xtmixed, xtmepoisson etc. commands that allo... |
What is the relation between estimator and estimate?
|
Is there an R package, website, or command that will allow one to search for a specific statistical procedure they desire?
For instance, if I wanted to find a package that had the Box-Cox Transformation, the website/package/command might return "MASS" and refer me to the boxcox() function.
It is fairly straightforwar... |
Let's say the number of hotel rooms in a city is X. We know the arrival rate of visitors every day. We don't know the current occupancy. Is it possible to
estimate the occupancy rate over all hotel rooms (assume 1 visitor / room)
estimate the distribution of stay duration (assume every visitor stays at least 1 day)
O... |
I've been using the lm function in R to do demand modeling (tons of steel to be predicted by various economic indicators). I used $R^2$ and $F$ to report on the strength of the model. However, when I use the R function lqs ("resistant regression") and then type in summary(model_name) I do not get any statistics that... |
I have a multinomial logistic regression with dependent variable valued in {-1,0,1} (reference category is 0) and a number of continuous and discrete predictors. After running the regression a continuous predictor of interest ('size') has a Type 3 analysis of effects p-value of 0.0683, and the two coefficients (corresp... |
I have a single model (e.g generalized Pareto distribution) to test with a different data set (I have a set of different increasing threshold and fit the same model with a data above these threshold). I want to know which set of data will give me the best model fit. Can i use likelihood ratio test in this case or any o... |
I'm running an EFA using orthogonal/varimax rotation, and assigning variables to a factors based on maximum load (so only each variable only gets one factor). I then want to validate the model using SEM... since the rotation I used to determine the variable<->factor loads was orthogonal, is it "wrong" to let the factor... |
What are the methods to minimize the effect of boundaries in a wavelet decomposition?
I use R and the package waveslim.
I have found for instance the function
?brick.wall
but
I am not too use how to use it.
I am not sure the best solution is to remove some coefficient. I have read somewhere that it exists some wavel... |
Besides obvious classifier characteristics like
computational cost,
expected data types of features/labels and
suitability for certain sizes and dimensions of data sets,
what are the top five (or 10, 20?) classifiers to try first on a new data set one does not know much about yet (e.g. semantics and correlation of in... |
I am constructing Cox models that predict survival in a clinical trials cohort.
After speaking to our statistician (who is away at the moment, hence this post), I was advised to take a forward likelihood ratio-test approach to building Cox survival models, starting with a base model and adding the term that improved t... |
Does the magnitudes of principal eigenvectors obtained by PCA have anything to do with correlations of original variables, and can we use PCA for clustering?
Thanks!
|
Have you ever heard about Child-Pugh cirrhosis score? There are five features, each feature is discretized in three intervals. For each interval you get a point, eg 1 for the first, 2 for the second etc. After computing all points you sum them up and then you get a cirrhosis stages ranked from A to C. Each stage is cor... |
My problem is this:
I have one dependent variable and 4 independent ones: one is age and the other three are temperament dimensions. I did 3 sets of two-way ANOVAs. The first independent variable is always the same (age) and the second is always different - one of the tempeament dimensions. In one case I get that age h... |
I have a zero-inflated negative binomial model (ZINB) for highly skewed, high zero-count data, $n=6800$. The null model does not reject the ZINB model, and Stata count fit also indicated ZINB over other count models.
Yet, when I run the model with more than the minimum of covariates, the inflation intercept has a coef... |
I am clustering probability distributions using the Affinity Propagation algorithm, and I plan to use Jensen-Shannon Divergence as my distance metric.
Is it correct to use JSD itself as the distance, or JSD squared? Why? What differences would result from choosing one or the other?
|
Suppose we have random variable $X_1$ distributed as $U[0,1]$ and $X_2$ distributed as $U[0,X_1]$, where $U[a,b]$ means uniform distribution in interval $[a,b]$.
I was able to compute joint pdf of $(X_1,X_2)$ and marginal pdf of $X_1$.
$$ p(x_1,x_2) = \frac{1}{x_1}, \text{ for }\quad 0\le x_1\le 1, \quad 0\le x_2 \le ... |
Suppose I roll a 4-side dice 25 time to get a final sum between 25 and 100. How I calculated the distribution of probability for each sum between 25 and 100?
|
Context:
I am working with an ordinal logistic model and trying to interpret/present the results. The model has two continuous predictors of interests, and a mix of continuous and categorical controls. I was hoping to graph the predicted likelihood of the top outcome (being accepted into a school) across multiple lev... |
I have 4301 lines of data from my science project. I have to do unorthodox statistical analysis for my results because they are 4-dimensional; I have three independent variables.
With Excel I can do a lot of analysis, even multivariable linear regression, but what I need is a step up: Multivariable nonlinear regressi... |
I am looking for methods which can be used to estimate the "OLS" measurement error model.
$$y_{i}=Y_{i}+e_{y,i}$$
$$x_{i}=X_{i}+e_{x,i}$$
$$Y_{i}=\alpha + \beta X_{i}$$
Where the errors are independent normal with unknown variances $\sigma_{y}^{2}$ and $\sigma_{x}^{2}$. "Standard" OLS won't work in this case.
Wikipedi... |
I'm looking at doing text classification/spam filtering using naive Bayesian classifiers with the e1071 or klaR package on R. Is there a good tutorial out there to describe this? I'm kind of stuck because I'm not sure what to use as the data to input into the NaiveBayes function.
Some help very much appreciated, thanks... |
I have collected a bunch of statistical results in the form of "YES" and "NO" strings.
Now I would like to have a summary cell displaying "YES" if all these cells equal "YES" (or are empty).
|
I read Clinical Trials, a Methodologic Perspective (S. Piantadosi) as I was suggested by one of you.
According to the author:
A trialist must understand two
different modes of thinking that
support the science-clinical and
statistical. They both underlie the
re-emergence of therapeutics as a
modern science. ... |
I have used an established 33-item empathy questionnaire.
I have modified the scale from a 9 point to a 4 point scale in order to force an answer and reduce ambiguity.
Do I need to retest the scale properties after this reduction in the number of response options?
|
In many cases, we do not actually have to explicitly compute the normalization constant of a certain distribution, if we know its kernel and it corresponds to a known family.
Is there a name for this "trick" that I can look up and read more about? I don't think there is something very deep about it, but I figured it mu... |
Suppose I have data with p explanatory variables, and I want to use a LARS algorithm to build a model. Do I
Run LARS until all p variables have been added to my model, and the correlation between each variable and the residual is 0?
Or do I terminate LARS earlier, say a) by stopping LARS once k < p variables have been... |
I am designing a Hybrid Monte Carlo sampling algorithm for PyMC, and I am trying to make it as fuss free and general as possible, so I am looking for good advice on designing an HMC algorithm. I have read Radford's survey chapter and Beskos et. al.'s recent paper on optimal (step size) tuning of HMC and I gathered the ... |
An experiment I conducted recently used a 2 (between participants) x 3 (within participants) design. That is, participants were randomly allocated to one of two conditions, and then completed three similar tasks each (in a counterbalanced order).
In each of these tasks, participants made binary choices (2AFC) in a num... |
I have data from 40 people, each measured once in 2 conditions. For reasons tangential to my question I'm not comfortable using parametric analyses to compare the two conditions, so I'm employing bootstrapping. However, when I run a bootstrap analysis (resampling people with replacement, computing condition means, then... |
I've scoured Google and this site and I am still confused about the lmer function in the lme4 library.
I have some data collected from different psychiatric wards, which have a multilevel structure. To simplify, I'll pick two level 2 and two level 1 variables, although I actually have a few more.
Level 2- WardSize [thi... |
Say we have the following 5 cities, each with the same population
CityA with 20% each of 5 ethnicities
CityB with 99% of one ethnicity, but 100 different ethnicities in the remaining 1%
CityC with 40% of one ethnicity and the remaining 60% distributed evenly over 10 different ethnicities
How can one measure their re... |
I'm struggling to find a method for reducing the number of categories in nominal or ordinal data.
For example, let's say that I want to build a regression model on a dataset that has a number of nominal and ordinal factors. While I have no problems with this step, I often run into situations where a nominal feature is... |
if range of gaussian pdf is not a probability then how come it is used in Bayes rule in the same way as pmf?
|
I searched on the internet for books on statistics (particularly 4shared.com), and most of the books I found do not cover multivariate statistics in detail. Are there any good books which cover these topics in detail and with sufficient examples?
|
I am doing time series data analysis by state space methods. With my data the stochastic local level model totally outperformed the deterministic one. But the deterministic level and slope model gives better results than with stochastic level and stochastic/deterministic slope. Is this something usual?
All methods in ... |
The Pareto distribution can be used to give a pdf for the wealth of a person chosen randomly from a population. (In fact, this was its origin. See, for instance, http://en.wikipedia.org/wiki/Pareto_principle ).
I would like to explore the reciprocal question: Given the total amount of wealth in a population, what is ... |
I want to approximate a non-linear function with a limited value range by an artificial neural network (feed forward, back propagation).
Most tools and literature availabe suggest linear functions for the output neurons when doing regressions. However, I know a priori that my goal function is of limited range, therefor... |
I have just done a Chow test on a regression in order to see whether there is a structural break. I am a bit stumped however as my Chow test returns a negative number. Now what do I do?
More specifically, this expression (from the Wikipedia entry for the Chow test):
$\frac{(S_c-(S_1+S_2))/(k)}{(S_1+S_2)/(N_1+N_2-2k)}$
... |
I have data from human participants in a study. There are more females in the study (60%) and males are older. I have a binary categorical variable $O$. If those who are $True$ for $O$ are older, do I need to correct for sex and/or age? Maybe those $True$ for $O$ contain more men. What concepts or methods should I use ... |
If my dataset comprises few censored variables (<1%) and I fit the OLS regression using a heteroscedastic resistant estimator (the residuals are not terribly heteroscedastic to begin with)- are the results valid?
|
I am not sure if this is an instance of vectorizing the operations in R, but this is where I am stuck:
I want to get:
dpois(1, 0.1)
dpois(2, 0.2)
dpois(3, 0.3)
and I tried:
dpois(1:3, 0.1:0.3)
and
do.call(dpois, list(x = 1:3, lambda = 0.1:0.3))
both do not work.
It there a R-ish way of doing this?
|
What inter-rate reliability test is best for continuous data? I am doing a study with one variable with continuous data, now the measurement involves measurements done by two people. I would wish to do inter-rater reliability test for the data, so far I have collected a few samples and a sample data I have given below... |
Is there any standard method to determine an "optimal" operation point on a precision recall curve? (i.e., determining the point on the curve that offers a good trade-off between precision and recall)
Thanks
|
The Data:
The observed probability (proportions) of three mutually exclusive events for five species.
What is the best way to plot these data in R along with their standard errors? I'd like to avoid a "beside" bar plot with error bars (3 bars for each species). I was hoping to use a stacked bar plot, but I'm unsure how... |
I am new to R, ordered logistic regression, and polr.
The "Examples" section at the bottom of the help page for polr (that fits a logistic or probit regression model to an ordered factor response) shows
options(contrasts = c("contr.treatment", "contr.poly"))
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, d... |
I need to do a high dimensional biological data analysis. My data consists of hundreds of thousands of dimensions. I am looking for an implementation of multinomial logistic regression that will scale well to data of this size.
Ideally, it should allow me to also do Ridge and Lasso regressions also. Which software shou... |
We are learning pivot functions, test statistics, and hypothesis testing at university but it makes no sense. I've tried reading my text book/notes, going through examples, etc., but the concepts seem like a random guess and I'm clueless about how to even start guessing what the answer could be.
1st part
Can you pleas... |
I asked this question over on StackOverflow, and was recommended to ask it here.
I have two time series of 3D accelerometer data that have different time bases (clocks started at different times, with some very slight creep during the sampling time), as well as containing many gaps of different size (due to delays as... |
If I have a dependent variable and $N$ predictor variables and wanted my stats software to examine all the possible models, there would be $2^N$ possible resulting equations.
I am curious to find out what the limitations are with regard to $N$ for major/popular statistic software since as $N$ gets large there is a com... |
I have 2 acceleration vectors, each represented by a matrix with its first column corresponding to the magnitude of acceleration and second column corresponding to the time (in ms) They both represent the same data, but one sensor is started a little later than the other, so I'm trying to remove the time lag using corr... |
Context:
In an effort to structure the center pieces that I have came across in probability theory and statics, I created a reference document focussing on the mathematical essentials (available here).
By sharing this document, I hope to give statistics students a comprehensive summary of the core material taught in gr... |
Suppose that the quantity which we want to infer is a probability distribution. All we know is that the distribution comes from a set $E$ determined, say, by some of its moments and we have a prior $Q$.
The maximum entropy principle(MEP) says that the $P^{\star}\in E$ which has least relative entropy from $Q$ (i.e., $... |
Can anyone give some advice on how to start proving this algebraically?
Define the residual from a regression (one independent variable) algebraically and show that:
the mean of the residuals is zero
the correlation of the residuals and the independent variable is zero
|
hopefully you can help me with the meaning of the following, I don't really understand the terminology:
"regression of a vector of ones on the matrix $W$",
where $W$ is something like $(W_t)' = (w_{1t},w_{2t},w_{3t}, w_{4t})$.
I don't understand, which regression I actually have to compute. If it is of help for you, I'... |
"Under what condition (or conditions if you think it necessary) would one observe no change in the regression coefficient (e.g., b-hat Y on X1) for some variable when another variable is added to the regression equation?"
I think the answer is when the exogenous variables are perfectly uncorrelated - is that correct?
|
Background
I have two estimates of variance and their associated standard errors calculated from sample sizes of $n=500$ and $n=10,000$ the results are $\hat{\sigma^2} (sd_{\hat{\sigma^2}})$:
$$\hat{\sigma^2}_{n=500}=69 (6.4)$$
$$\hat{\sigma^2}_{n=10,000}=72 (1.5)$$
Question
If I say that variance increased by 3, what ... |
I am trying to predict the outcome of a complex system using neural networks (ANN's). The outcome (dependent) values range between 0 and 10,000. The different input variables have different ranges. All the variables have roughly normal distributions.
I consider different options to scale the data before training. One ... |
I play a lot with PyBrain -- Artificial Neural Network implementation in Python. I have noticed that in all the models that I receive the weights of the connections are roughly normally distributed around zero with a pretty low standard deviation (~0.3), which means that they are effectively limited within the [-1, 1] ... |
I'm examining correlations in a data set with a large number of variables but small sample sizes. To get a feel for how these quantities behave, I generated some random data and looked at the distribution of correlations:
n = 4
y = matrix(rnorm(1000 * n), 1000, n)
x = matrix(rnorm(1000 * n), 1000, n)
p = as.numeric(cor... |
How should I syntax the rma function from metafor package in order to get results in the following real-life example of a small meta-analysis?
(random-effect, summary statistic SMD)
study, mean1, sd1, n1, mean2, sd2, n2
Foo2000, 0.78, 0.05, 20, 0.82, 0.07, 25
Sun2003, 0.74, 0.08, 30, ... |
I've never really found any good text or examples on how to handle 'non-existent' data for inputs to any sort of classifier. I've read a lot on missing data but what can be done about data that cannot or doesn't exist in relation to multivariate inputs. I understand this is a very complex question and will vary dependi... |
is there a way of calculating an effect size for the Kolmogorov-Smirnov Z statistic (in SPSS or by hand)? Or should I stick to the Mann-Whitney test, even though my group sizes are less than n=25?
|
I'm trying to fit a multivariate multiple regression model where the independent variable X is latent but I don't know where to start (I have prior information about the coefficient matrix so I can use some iterative method).
The dependent variable Y is a NxM matrix denoting N observations each from M variables. The la... |
In the classic Coupon Collector's problem, it is well known that the time $T$ necessary to complete a set of $n$ randomly-picked coupons satisfies $E[T] \sim n \ln n $,$Var(T) \sim n^2$, and $\Pr(T > n \ln n + cn) < e^{-c}$.
This upper bound is better than the one given by the Chebyshev inequality, which would be roug... |
Does anyone have suggestions or packages that will calculate the coefficient of partial determination?
The coefficient of partial determination can be defined as the percent of variation that cannot be explained in a reduced model, but can be explained by the predictors specified in a full(er) model. This coefficient i... |
I have a question about group sequential methods.
According to Wikipedia:
In a randomized trial with two treatment groups, classical group sequential testing is used in the following manner: If n subjects in each group are available, an interim analysis is conducted on the 2n subjects. The statistical analysis is perf... |
Context
I have got some problems with my doctoral dissertation. My thesis is Investigating Secondary Primary School Teachers' Organizational citizenship behaviours through their perceptions about organizational culture and their organizational trust levels.
I have a sample of 871 teachers.
I have three instruments bu... |
I am training an artificial neural network (backpropagation, feed-forward) with non-normal distributed data. Beside the root mean squared error, literature does often suggest the Pearson correlation coefficient for evaluating the quality of the trained net. But, is the Pearson correlation coefficient reasonable, if the... |
I am looking for good references on using directional data (measure of direction in degrees) as an independent variable in regression; ideally, it would also be useful for hierarchical nonlinear models (the data are nested). I am also interested in directional data more generally.
I have found a text by Mardia, which ... |
I am looking for some suggestions about assessing the representativeness of a particular dataset I am analyzing.
In this dataset I am looking at the relationship between two variables (e.g., X and Y) in a population that is split into five distinct blocks. The main problem is that the data is based upon reports from t... |
Some edits made...
I have a dataset which other researchers have used mixed effects modelling with to come up with a nice set of associations. I also have a much smaller dataset which is the same variables but from a different country. The first dataset is plenty powerful enough (350 individuals from 30 locations) but ... |
I have two exclusive groups of people and a counter of how many events happened for each group.
Lets say group 1 has 7000 people and group 2 has 3000 people.
group 1 had 50 events and group 2 had 40 events.
I'm calculating the event percentage for each group for example for group1 its 50/7000. for group 2 its 40/3000.... |
Some edits made...
This question is just for fun, so if it isn't fun then please feel free to ignore it. I already get a lot of help from this site so I don't want to bite the hand that feeds me. It's based on a real life example and it's just something I've wondered about a lot.
I visit my local dojo to train on an es... |
I would like to find out the values (x, y) used in plotting plot(b, seWithMean=TRUE) in mgcv package. Does anyone know how I can extract or compute these values?
Here is an example:
library(mgcv)
set.seed(0)
dat <- gamSim(1, n=400, dist="normal", scale=2)
b <- gam(y~s(x0), data=dat)
plot(b, seWithMean=TRUE)
|
This question might be way off base as I am just getting to know vector autoregressive models, but I've tried searching through the usual channels and if this actually is a valid question it might be of help to others that it is here.
Should I think in the same way about sample size for a VAR-model as for any other reg... |
I am a programmer who, in a past life, used the products RS/1, RS/Explore, and RS/Discover in a manufacturing engineer career. Now, years later, I would like to do some multivariate regression on some real-world data (sales data from my wife's store). The point would be to highlight what sales days are truly exceptio... |
Let's say you have a jointly gaussian vector random variable $\mathbf{x}$, with mean $\mathbf{M}$ and covariance $\mathbf{S}$. I now transform each scalar element of $\mathbf{x}$ , say $x_j$, with a sigmoid:
$$y_j = 1/(1+\exp(-x_j))$$
I am interested in the expectation between two variables $y_j$ and $y_j'$ of the res... |
I am trying to find a simple similarity metric that will compare vectors of indeterminate length. These vectors will be populated with values between 1 and 5. In this situation a 1 is closer to a 2 then it is to a 5 etc etc.
I am new to this type of math. I naively considered using cosine similarity. However, when I ... |
What is the median of the non-central t distribution with non-centrality parameter $\delta \ne 0$? This may be a hopeless question because the CDF appears to be expressed as an infinite sum, and I cannot find any information about the inverse CDF function.
|
I am trying to read up about AdaBoost from Tibshirani (page 337 onwards), and would appreciate some help in understanding it better.
The book says that "For each successive iteration m = 2, 3, . . . , M the observation weights are individually modified and the classification algorithm is reapplied to the weighted obser... |
Many statistical jobs ask for experience with large scale data. What are the sorts of statistical and computational skills that would be need for working with large data sets. For example, how about building regression models given a data set with 10 million samples?
|
For a paper, I need an example of a dataset $(x_i,y_i)$ where the residuals are $iid$ (the $x$ do not represent time) with a discontinuity on the effect of $x$ on $y$.
I have already found a dataset in Berger and Pope 2010 but the jump there is not clearly visible
The 'LifeCycleSavings' dataset has been suggested, bu... |
I'm looking at the effect defeat and entrapment inducing conditions have on subjective ratings of defeat and entrapment at three different time points (among other things).
However the subjective ratings are not normally distributed. I've done several transformations and the squareroot transformation seems to work bes... |
I have a dataset about a population in hospital, and what type of infections patients have.
Let say the number of patients is 100, 10 of them have pneumonia (group A), 20 of them have urinary tract infection (group B); keep in mind that group A and B can be overlapping, that is a patient suffering from pneumonia can al... |
I used BIRCH and HAC to do clustering on my data.
I want to now what type of information I can include in reports that my users can generate to get more insights on the clusters. I would have to dumb down the statistical terms and represent them as much as possible visually in these reports for my users.
|
I am working with the twostep cluster process in SPSS Modeler (Clementine) and trying to get a sense for the distance function used. It is a log-likelihood function (as stated in docs) but I am unsure for even the continuous variables (the function handles continuous and nominal variable) how this is a log likelihood (... |
I have a bunch of points that belong to one of population P1, P2, ... Pn AND to class A or B.
Within each population I'll be doing classification between A and B, and I want to select features that discriminates the best between A and B. Now, my features are also correlated with population membership, but I don't care ... |
In regression analysis what's the difference between 'data-generation process' and 'model'?
|
Using either percent error or percent difference, I want to compare one of my measured values from a set to the mean of the set. By reading the Wikipedia article on percent difference, it's still not quite clear which I should choose.
What if I wanted to compare an instantaneous slope to the slope of a linear regressi... |
Let's say I have two distributions I want to compare in detail, i.e. in a way that makes shape, scale and shift easily visible. One good way to do this is to plot a histogram for each distribution, put them on the same X scale, and stack one underneath the other.
When doing this, how should binning be done? Should ... |
I working on this data set with marital status and age. I want to plot the percentage of never married man versus each age. Could you please help me to figure out the way how to do it in R? So far I have created two separate arrays with men never marries and ever married. I know how many case of each I have. What i nee... |
I understand two-tailed hypothesis testing. You have $H_0 : \theta = \theta_0$ (vs. $H_1 = \neg H_0 : \theta \ne \theta_0$). The $p$-value is the probability that $\theta$ generates data at least as extreme as what was observed.
I don't understand one-tailed hypothesis testing. Here, $H_0 : \theta\le\theta_0$ (vs. $H_1... |
Is it possible to visualize the output of Principal Component Analysis in ways that give more insight than just summary tables? Is it possible to do it when the number of observations is large, say ~1e4? And is it possible to do it in R [other environments welcome]?
|
How large sample size should be for Ljung-Box statistic to achieve a power $\ge 0.5$ when number of lags tested is 1? How does the power fall ( assuming an AR(1) process), with increasing number of lags? The LB test is more than 40 years old, surely someone must have answered these questions by now.
|
I have a database of some 10000 cell-numbers with mapping of geographical areas they are associated to. I believe the first 5-6 characters in the numbers can point to the geo. area the cell number belongs to.
I want to build the rules for such mapping so that geographical area for a new number can be calculated. Can ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.