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 23732

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
2 answers
73 views

How to show that this stat statement is true [closed]

Someone made this statement: 1 out of 1000 corresponds to a proportion of 0,1%. In this case you have a chance of 37% of having 0 outcome, significance level 63%. 3 out of 1000 translating to a pro …
Maximilian's user avatar
1 vote
2 answers
2k views

Cumulative probability in R

The probability density function I have is as following: Now, I want to rewrite the cumulative probability function bellow into R. The variables ($S$, $\mu$, $\sigma$) are constant variables. … For $t$ i.e. t <- seq(0.1,1,0.1) How the cumulative probability would look like in R? Non of my solutions yields desired output! …
Maximilian's user avatar
0 votes
1 answer
506 views

Chi-squared test on small number of groups and large observations

<- data.frame(group=c(1,2,3), o=c(695301,154100, 224140), e=c(930785, 192893, 273400)) e <- x$e # expected frequency under Null Hypothesis o <- x$o # obseved frequency r … lsim <- lapply(x[ ,"o", drop=FALSE], function(x) replicate(100, jitter(x))) o <- data.frame(lsim) e <- x$e apply(o, 2, function(x) { r <- sum( (x - e) / sqrt(e)); chq <- sum(r^2); p.value <- 1 - …
Maximilian's user avatar
0 votes
0 answers
490 views

Model over/under-fitting evaluation with chi-squared test

Here are some data: (R language) set.seed(1234) dat <- data.frame( ins=sample(c(1,2,3,4,5,6,7,8), 100, replace=T), outs=sample(c(1,2,3,4,5,6,7,8), 100, replace=T) ) df <- ifelse(with … This is the chi-squared test from R: with(tab, chisq.test(Freq, p=exp_freq, rescale.p=TRUE)) Well, I'm indifferent, would this be correct approach given setup hypothesis? …
Maximilian's user avatar
1 vote
1 answer
99 views

Logistic regression with opposing states with same identical variables

I run this example in r and it shows already impact with adding only 10 (representing ony 1% of the total dataset) such opposing variables. …
Maximilian's user avatar
5 votes
1 answer
875 views

Incorporating long term statistics into short term forecasting

Actual example (fitted model) within R would be desired result. For nice answer I'm offering double the current bounty. … EDIT: I'm going to disappoint in term of data and provide data from the forecast R package, since I think (for my purpose) it is going to be sufficient to answer this question. …
Maximilian's user avatar
2 votes
1 answer
108 views

How to find weight by maximizing the rank ordering performance

I'm using r statistical software so suggesting a r package would be also helpful. …
Maximilian's user avatar
0 votes
1 answer
74 views

How to estimate cyclicality and sample from it

Sample data and the attempt (in r): The data are percentages per group and represent the proportion of observations per group of the overall dataset per year (each column should sum to 100% or 1, but because …
Maximilian's user avatar
1 vote
1 answer
139 views

How to approach and model these data - choosing an appropriate model

I'm using software R. EDIT: I'm thinking to model each of the independent (explanatory) variable one by one, using survival analysis. Would that be good approach? …
Maximilian's user avatar
1 vote
0 answers
221 views

Forecast (predict) probability over time with R

I have as target variable probability (observed/realised p over time) so its p~(0,1). I'm looking for the right model to fit the observed probability over time and "predict" n steps ahead. I'm not su …
Maximilian's user avatar
1 vote
1 answer
179 views

The effect size of difference

These have been calculated in R based on this formula for $A$: A = obs / mean(obs.window) The values of $B$ and $C$ in R are based on the formulas: B = obs / min(obs.window) and C = obs / max(obs.window …
Maximilian's user avatar
1 vote

The effect size of difference

I'm not sure but here is the best solution I can provide: I feel sort of optimization should be used to solve this issue, or definitely better model (rather then linear OLS model) but nonlinear... d …
Maximilian's user avatar
1 vote
1 answer
584 views

Statistical test, significance of change in average value

I have past 12 month data (a ratio of occurence: ranges between 0%-100%) and I have most recent data (January, so 13th observatios). I would calculate the average of the first 12 months (first 12 ob …
Maximilian's user avatar
0 votes
0 answers
85 views

Two ways to test a hypothesized proportion against data

In this case the upper CI is, using R: qbeta(.95, 0.15*1000, 1000-(0.15*1000)) # [1] 0.1689547 Since 16% < then 16.90% we fail to reject the $H_{0}$ hypothesis. …
Maximilian's user avatar
1 vote
1 answer
1k views

How to interpret the result of logistic fit with poly()

Here are two examples of binomial model fitting. In the second example, the independent variable is modeled using poly() as a second order polynomial. How do I interpret these 2 results? Why someone …
Maximilian's user avatar

15 30 50 per page