5,564 reputation
11035
bio website www54.sap.com/industries/…
location Switzerland
age 38
visits member for 3 years, 10 months
seen 48 mins ago

During the day, I forecast sales at supermarkets, drugstores, furniture, perfume and other retailers and calculate order proposals. Lots of time series, with an emphasis on fast, automatic and robust data cleansing and forecasting - with some logistical optimization thrown in for good measure. I'm active in the International Institute of Forecasters and an Associate Editor for their practitioner-oriented journal Foresight.

At night, I switch hats and do inferential statistics for clinical and biological psychology.

I'm never bored. And I use R.


2d
comment Mcomp rolling forecasts with re-estimation
Stepping though is not the problem. My question is what you want a to do while you are rolling your forecasts. Right now, a is the MAE over the entire holdout sample, but if you do rolling forecasts, a would be based on fewer and fewer holdout observations. Is that what you want?
2d
revised VIF in GLM model in R
edited tags
2d
comment VIF in GLM model in R
Multicollinearity is a property of the regressors, not the model, so you don't need to look for "multicollinearity in GLM" as opposed, say, to "multicollinearity in OLS". In addition, there are other measures of multicollinearity than VIF, like the condition indices and variance decomposition proportions of Belsley, Kuh & Welsch, so it would be good if you could edit your question - are you specifically interested in the VIF, or generally in detecting multicollinearity in R? (I also voted to close and move to stackoverflow.com, since this seems to be specifically about R.)
Jul
21
comment If two time series $X$ and $Z$ follow $0 \leq Z \leq X$, can we say that $\text{var}(Z) \leq \text{var}(X)$?
How does your first "observation" (that $X$ is not constant) follow from your assumptions? I don't see how it does. Indeed, assume that $X=1$ is constant, then of course your conclusion does not follow. Or if you add the assumption that $X$ is nonconstant, then you can have it fluctuate a tiny little bit around 1, as in Alexis' answer, and your conclusion again does not follow.
Jul
18
comment LASSO in the data with large number of variables (p) with lower number of samples (n)
You can use glmnet() in the glmnet package to fit (generalized) linear models with lasso or elasticnet penalties. Whether this is the "best method" will depend on what exactly you are trying to do with your data (prediction, causal analysis, whatever).
Jul
17
comment A clustering and classification question
You have a big task ahead of you in any case if you don't have any data with known classes. If you do unsupervised learning and clustering into two clusters, you can't be sure in advance that your two clusters correspond to introversion and extraversion (leaving the dichotomization issue aside) - your unsupervised clustering may simply cluster into male/female, tall/short, smart/stupid or along a host of other potential one-dimensional characterizations. So try to get a classified sample. Then you may want to look at simple logistic regression, which gives you a continuous output.
Jul
17
comment A clustering and classification question
+1 to @NickStauner's comment. See also here.
Jul
11
comment Smoothing dirty data?
Well, quite obviously, it does reflect customer behavior... after your employer has "trained" the customer, probably involving end-of-quarter price incentives or something. The question really is what "meaningful data" in your question is. The data are the data. You could perhaps try some kind of smoothing to estimate possible sales without this effect and quantify the revenue lost through the end-of-quarter incentives - also the operational difficulties in the supply chain due to larger demand fluctuations.
Jul
11
comment Method to identify samples lying outside the normal distribution
The normal distribution has density on the entire real line, so there is nothing "outside" it. You can look for outliers if you really have to. And please don't cross-post.
Jul
7
comment Odds of births of four generations
Actually, this is not correct. You give the chance for four people all having specific birthdays (e.g., twice Jan 14 and twice Apr 11). This is not the same as "two out of four persons share a birthday, and the other two share one, too", where we do not specify in advance which days these are. Person A is free in "choosing" his birthday. Person B has the same birthday as A (chance of 1/365). C is again free, and D is determined by C (again chance of 1/365). Overall answer to your problem: (1/365)^2, not ^4. (Of course, the OP may have yet another problem in mind.)
Jul
3
comment Which clustering technique to use for a temporal dataset?
kmeans will assign every data point to a cluster, and outliers will skew clusters. And you need to prespecify the number $k$ of clusters... or use yet another step (a point 3 above) to determine the optimal number of clusters, like a scree plot or a gap statistic.
Jul
3
revised Which clustering technique to use for a temporal dataset?
added time-series tag
Jul
3
answered Which clustering technique to use for a temporal dataset?
Jun
27
comment A basic apply() anonymous function question
This is really about how to do this in R, so I voted to close and migrate to StackOverflow.com in the r tag. It would be good if you could edit your question to be reproducible, with small (!) examples of a and b.
Jun
26
comment Problem with Sales Regression Residuals
Ticket sales are probably all nonnegative, and they may be integer, so you should expect residuals that are skewed (simulate negbin data, fit them with the correct model and look at the residuals). That does not need to mean that your models are incorrect.
Jun
26
revised Test whether time of maximum differs across two groups
added alternative approach
Jun
26
answered Test whether time of maximum differs across two groups
Jun
26
comment Test whether time of maximum differs across two groups
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.
Jun
26
comment Determining parameters (p, d, q) for ARIMA modeling
I edited the answer. Your series does not exhibit a lot of structure, so there is really little you can do. Since you essentially have noise and little else, you get large prediction intervals.
Jun
26
revised Determining parameters (p, d, q) for ARIMA modeling
improved in answer to a comment