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 24515

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`.

3 votes
Accepted

Given probability x, how likely is it that probability y is due to chance?

Now we need $$P(X \ge 33|H_0) \approx 4.68*10^{-11}$$ As you can verify using R pbinom(32,44,.27,lower.tail=FALSE). …
tomka's user avatar
  • 6,714
0 votes

Conditional/normalized multiple imputation

I think one option would follow by analogy of predict on newdata in R. This supposes using mice to single-impute and then access the final regression model after burn in and convergence. …
tomka's user avatar
  • 6,714
2 votes
2 answers
2k views

What is the relationship between the normal and the t-distribution in R (pt and pnorm)?

In R, is it true that: pt(q,df=Inf) $=$ pnorm(q)? … Or in words, can I supply df=Inf in the cummulative t-distribution to get to the standard normal distribution function in R, as I should in theory? …
tomka's user avatar
  • 6,714
4 votes
0 answers
803 views

Avoid numerical overflow problem in likelihood due to $\exp$

Is there a way to prevent this from happening in R? …
tomka's user avatar
  • 6,714
8 votes
1 answer
1k views

Which adaptive Metropolis Hastings algorithm is implemented in R package MHadaptive?

One is implemented in the function Metro_Hastings of R package MHadaptive, see here. …
tomka's user avatar
  • 6,714
0 votes
Accepted

How to correctly predict from orthogonalized covariates on new data in polynomial regression?

The answer is to use the coefs argument of poly. The coefficients used in the orthogonal transformation are saved as attributes in a poly object. They have to be saved for later use. In the implemen …
tomka's user avatar
  • 6,714
10 votes
Accepted

"the leading minor of order 1 is not positive definite" error using 2l.norm in mice

I have had a similar problem in MICE, see my self-discussion here. The problem occurs because you have overfitted your model (too many parameters, variables), some variables are highly colinear or you …
tomka's user avatar
  • 6,714
0 votes
0 answers
680 views

How can I use the sufficient statistics (variances, covariances, means) to estimate a linear...

My question is simple: is there a function in R which estimates the linear regresion model in a similar fashion as lm, but only using the means, variances, and covariance (correlations), i.e. the sufficient …
tomka's user avatar
  • 6,714
2 votes

How to measure association of nominal values for few observations?

I think you clearly have too many cells (240) relative to the number of observations (181). In fact, even if there was only one observation in each cell, you would still have 59 empty cells. Analyses …
tomka's user avatar
  • 6,714
5 votes
1 answer
3k views

How is the optimal probability cut-off in a ROC defined by the R package Epi?

The plot below was created by R package Epi::ROC for a binary classification problem. …
tomka's user avatar
  • 6,714
0 votes
1 answer
1k views

How to correctly predict from orthogonalized covariates on new data in polynomial regression? [closed]

The function poly in R orthogonalize the columns of this matrix or leave them as they are after polynomial extension (raw). …
tomka's user avatar
  • 6,714
20 votes

How to obtain p-values of coefficients from bootstrap regression?

The community and @BrianDiggs may correct me if I am wrong, but I believe you can get a p-value for your problem as follows. A p-value for a two sided test is defined as $$2*\text{min}[P(X \le x|H_0) …
tomka's user avatar
  • 6,714
4 votes
Accepted

How should I interpret this residual plot?

The plot is very dense so it is not easy to see all trends there may be. You could run alternative tests for hetoroscedasticity and autocorrelation to get additional diagnostics. What is visible is t …
tomka's user avatar
  • 6,714
5 votes

Comparing nested binary logistic regression models when $n$ is large

One option is to use pseudo R-square measures for both models. A strong difference in pseudo R-square would suggest that the model fit strongly decreases by omitting V17. … There are different kinds of Pseudo R-squares available. …
tomka's user avatar
  • 6,714
2 votes
0 answers
2k views

Using MICE in R: is it possible to impute only sub-sections of the data?

When using the mice library in R to impute data I encounter the following problem. I have a data matrix with missing information on y1 and y2 and predictor variable x. …
tomka's user avatar
  • 6,714

15 30 50 per page