# Tag Info

### Limitations to generalized additive model (GAM)

Probably one of the biggest limitations to GAMs is that they cannot model complex regression paths that involve multiple responses or things like mediation paths. Structural equation modeling (SEM) ...
• 3,855
1 vote

### t.test on bootstrapped estimates

The bootstrap is a valid approach, but the t-test is not valid. One simple approach is to take the quantiles of the difference of the sample metrics and test whether that confidence interval includes ...
• 4,263
1 vote

### t.test on bootstrapped estimates

Here is the problem with this approach: It is incredibly sensitive to the number of bootstraps. Suppose that the null is true (the population variances between the two samples really are equal). I ...
• 30.5k
1 vote

### How could I estimate a transition probability matrix that varies over time?

If the transition probability matrix varies over time then your stochastic process is not a Markov chain (i.e., it does not obey the Markov property). In order to estimate transition probabilities at ...
• 109k

### How could I estimate a transition probability matrix that varies over time?

You can use a multinomial regression model (using previous state and time as independent variables), and you can use any typical regression modelling techniques such as regularization, feature ...
• 5,354

### What is the difference between z.ratio and t.ratio in the pairwise comparison output using emmeans function?

The test statistic has the same form in either case, a difference divided by its standard error, but the comparison is either against a t distribution with the specified number of degrees of freedom ...
• 77.4k

### Correct calculation of repeated cross-validation classification metrics

The answer above is great. Here is one more thing to keep in mind: ConfusionMatrix() defaults to normalizing (i.e., norm =) the confusion matrix to the proportion ...
1 vote

### Why is standard error of clustered observations not under-estimated?

You've drawn from two different populations, so your comparison is not valid. The question you want to ask is: Given a clustered population, what is the impact of ignoring clustering? Let's say we ...
• 511
1 vote

### How to measure/rank "variable importance" when using CART? (specifically using {rpart} from R)

The caret package and the rpart package each have ways to list the variables and rank their importance, but generate different results from each other when calculating variable importance. ...

### Does R-squared help assess statistical significance?

All else equal, the higher the $R^2$, the higher the $F$-stat and the lower the p-value. That "all else equal" is crucial, however. If you increase the $R^2$ by throwing many parameters at ...
• 46.4k

### Best analysis for site selection with paired data

With your data, the isSingular warning simply means that the data don't provide enough information to distinguish the variance among random intercepts from a value ...
• 77.4k
1 vote

### Comparing emmeans values multinom model

Is there a way to deal with the rather large difference in group size? Statistically the smaller group size caused a larger confidence interval which made the effect less significant. You have less ...
• 7,643
1 vote

### Comparing emmeans values multinom model

The emmeans package does not require equal sample sizes, so to that extent you are worrying too much. It uses the variance-covariance matrix of coefficient ...
• 77.4k
1 vote

### How to correctly set up my mixed-effect model?

As @shawn-hemelstrand commented, I am pretty surprised that this code converged for you. nlmer::lme() will sometimes allow users to fit models that they do not have ...
• 857
1 vote

### Evaluating goodness-of-fit for GARCH models in R with QQ-plots (rugarch package)

To assess the distributional assumption of a GARCH model, you can look at the probability integral transform (PIT) of the standardized residuals. It can be obtained by ...
Accepted

### pROC package - sensitivity and specificity calculations

As @Dave indicated in the comments above, pROC attempts to detect if the positive group displays higher or lower values of the predictor than the control group. This can be controlled with the ...
• 3,184
1 vote

### R glm for censored data

Possibly you might figure out some distribution and apply some censurized estimation method. But, in this case, a single regressor (the groups), it might be easier to perform a permutation test.
Accepted

### R glm for censored data

The blood biomarker concentration measurements are censored because of the upper detection limit (at 2,500 judging from the plots). You can use ordinal regression (aka proportional odds regression) to ...
• 7,643
1 vote
Accepted

### Why isn't the residual standard error referred to as RMSE?

Referring to “the” MSE is probably a mistake, since there are reasonable arguments for multiple calculations (an $n$ denominator and and $n−p$ denominator both make sense). I would want to define ...
• 46.4k
Accepted

### What interpretation do REML/fREML values provide in generalized additive models (GAMs)?

All the fitting methods in gam()/bam() return some form of smoothness selection score: GCV UBRE (AIC) GACV REML score ML score ....
• 42.4k

### What is the difference between these two mixed model specifications?

First off, I suggest reading Bates et al., 2015 to get an idea of what your syntax is doing in both models. I cite it below, but there is a specific page dedicated to this if you have questions about ...
• 3,855

### What is the difference between these two mixed model specifications?

There is another, more general, question on StackExchange: R's lmer cheat sheet. The resources linked there might be able to address my question. In particular, it seems that the form (1 + ...
• 141
1 vote
Accepted

### How to use slopes in PCA?

The problem is at least partially mitigated if you standardize before computing the slopes. ...
• 857

### mvabund package can't handle offsets?

You may need to log transform the input variable (Number.of.samples) you're using for your offset variable, to match the log link function of the negative binomial. Here is a link to an mvabund ...

### Can you impute (predict) missing continuous data using categorical data as the predictor?

There's no reason not to mix different types of data for multiple imputation (continuous, categorical, ordinal etc.). It's just a matter of whether the particular software you use can support it (e.g. ...
• 27.1k

### How get survival function estimates from Aalen's additive regression?

Klein and Moeschberger (Second Edition) devote Chapter 10 to additive models. Practical Notes to Section 10.2 discuss this matter. The estimates of the baseline hazard rate are not constrained to be ...
• 77.4k
1 vote
Accepted

### Identifying root cause of very poor Random Forest model

(In the comments, I see you think it solved, so this is more general advice.) To identify the root cause of a poor model, you should start by getting a baseline model to compare against. As you are ...
• 2,079
1 vote

### Comparison of the performances of Regression Models and ANN models

Out-of-sample testing is the standard way to do this. Train your model on most but not all of your data Even better might be to have multiple out-of-sample groups (something like cross validation). ...
• 46.4k
1 vote
Accepted

### Interpreting ordinal regression output in R polr()

I find it easier to think about this model using the latent-variable representation. For simplicity, let's assume that your model has only one independent variable (GPA), and that the dependent ...
• 1,293
1 vote

### Interpreting shape and rate parameters from a weibull model of mortality hazard in BaSTA

With so many parameterizations of Weibull models in survival analysis, you first need to identify the parameterization that has been used. According to the BaSTA ...
• 77.4k

### Confidence interval in logistic regression when probability of success is 1

This just in... Try using the logistf package instead of glm: ...
• 17.7k
1 vote
Accepted

• 109k
1 vote
Accepted

### Why is the confidence interval for difference in two proportions inconsistent with the p-value for this difference in R prop.test()?

The difference is in how the standard error is computed. This can be done based on a pooled estimate of the variance and the assumption of equal probabilities (which makes sense if the null hypothesis ...