Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 134978

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

1 vote

regression with kNN on dataset with categorical variables

I expect you are talking about nominal categorical variables there? Ordinal variables with 100 levels are very strange. I have never seen a likert scale with 100 nuances or anything else that would wa …
David Ernst's user avatar
  • 3,219
1 vote

Weighted lm model based on number of observations in R

If you want to have a model where 1 site = 1 observation, then you can use the weighting parameter of 'lm': lm(formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = …
David Ernst's user avatar
  • 3,219
1 vote
Accepted

Does this t.test require a lower- or upper-tail test?

This depends on how you compute the paired sample difference. before - after => greater after - before => less
David Ernst's user avatar
  • 3,219
3 votes
Accepted

How to plot ROC for multi-class classifier? One-vs-All or One-vs-One?

When you use roc curves, you are saying that misclassification costs are not the same for different types of mistakes. If they were, you would just optimize classification accuracy which would be th …
David Ernst's user avatar
  • 3,219
1 vote

What is the "under the null hypothesis" and how do I calculate it for a t-test?

So the issue with the decimal degrees of freedom is sorted out. When you use the basic version of the t-test, you get integer numbers that you can also find in tables. Let's put that aside. When you …
David Ernst's user avatar
  • 3,219
6 votes
Accepted

Time series grouping for detecting market cannibalism

I'm mostly answering how and why the available data can be sufficient. This is what I understand your question to be about. Don't worry too much, you have the most important data available. I'm not s …
David Ernst's user avatar
  • 3,219
4 votes
Accepted

Claim the superiority of a treatment in the context of a significant difference with a two-s...

Your second quote says that confirmatory tests are not necessary. It states quite the opposite: One two sided test with level alpha is equivalent to doing two one sided tests with level alpha/2. So it …
David Ernst's user avatar
  • 3,219
2 votes

Facing unbalanced data: AUC vs. Cohen's Kappa vs. Balanced Misclassification Rate

Do you know the concrete costs of misclassification in both directions? I assume that missing the rare class must be much more costly than falsely adding a record to the rare class. (If not, then your …
David Ernst's user avatar
  • 3,219
2 votes
Accepted

Uncertainty in Binary Classification of New Data (via Random Forest)

I get to your main question in the second paragraph, first a more general remark: You probably already know that you should not be optimizing accuracy with a data-set that has this level of class imba …
David Ernst's user avatar
  • 3,219