Skip to main content
11 votes
Accepted

Why is betareg() giving "invalid dependent variable" error?

The error message posted by R tells you what the problem is: invalid dependent variable, all observations must be in (0,1) In other words, your dependent variable should take values that are strictly ...
Isabella Ghement's user avatar
8 votes
Accepted

Error while fitting data in auto.arima - R

This warning (not an error) is informing you that the seasonal unit root test (used to select the number of seasonal differences, D) has errored. Admittedly, the message is not very informative for ...
Mitchell O'Hara-Wild's user avatar
6 votes
Accepted

Add categorical variable in crr of package cmprsk

Create a model.matrix: ...
rawr's user avatar
  • 208
5 votes

What is cor.smooth(R) : Matrix was not positive definite warning Cronbach alpha in Psych?

Per the package function linked by Jeremy Miles, cor.smooth is a function within the psych package that is used to transform a non-positive-definite matrix by using ...
Shawn Hemelstrand's user avatar
4 votes

R logistic regression

From the documentation for ?Smarket, it doesn't appear to me that your two function calls are the same. The variables included are reported to be: A data frame with 1250 observations on the ...
gung - Reinstate Monica's user avatar
4 votes

R logistic regression

It does seem off topic, but with respect to why you are getting the warning message, the warning is indicating that linear separation is present in the model. This most often occurs when there are ...
Wes's user avatar
  • 516
4 votes

Why is betareg() giving "invalid dependent variable" error?

As the error message tells you betareg() requires responses to be greater than $0$ and less than $1$, i.e., the open interval $(0, 1)$. That is the support of the ...
Achim Zeileis's user avatar
3 votes

Why does system GMM fail due to computationally singular system in my setup?

The main reason is that your moment matrix is badly conditioned. This is specific to your dataset. Using momentfit, we can try to see what happens if we compute the ...
Pierre Chausse's user avatar
3 votes
Accepted

Interaction Plot error: The lines do not meet

This question is better suited for Cross Validated, but the answers are pretty straightforward: 1. What does this warning message mean? From the arguments in ...
andrew_reece's user avatar
3 votes

Error when fitting ARIMA model in R

Why do you use variable atm one time and variable atm.ts the other time ? Make sure you only work with one variable that is of class ts.
Branislav Cuchran's user avatar
2 votes

Tukey for GLM can't find data in model

I think because of as.factor. I experienced same error message when using summary(glht(mod1, mcp(cycle="Tukey"))) for model: <...
Aad Aadrean's user avatar
2 votes

New factors levels not present in training data

I just encountered the issue as well when using expand.grid() to examine predictions of randomForest() across various factor ...
Taylor White's user avatar
2 votes

Error in Johansen procedure `ca.jo` in R: "system is computationally singular"

I recently encountered a similar frustrating error with ca.jo. The problem is numerical, not statistical. Very large numbers cause problems for ...
Matt P's user avatar
  • 669
2 votes
Accepted

statsmodels ARIMA predict function on in sample data points

I figured it out--turns out that you can't predict on the first date of the train dataset because the start index of the original series had been differenced away. You can add one frequency to the ...
Judy Gong's user avatar
2 votes
Accepted

Random Forest Error: Type of Predictors in new Data do not match training set

You need to code Seasons, Holiday, and Functioning_day as factors, but your ...
Gavin Simpson's user avatar
2 votes

Make Farm as a random effect in my model I am given Error: number of levels of each grouping factor must be < number of observations (problems: Farm)

We typically fit random intercepts when we have repeated measures or some other kind of clustering within levels of a grouping variable. From the description in the OP it seems that you have one ...
Robert Long's user avatar
  • 65.9k
2 votes
Accepted

Error in auto.arima with seasonal dummy variables

Your sreg matrix has only 12 rows, yet your data has 175 observations. The number of rows of sreg should be the same as the ...
Rob Hyndman's user avatar
  • 58.3k
1 vote

How to deal with VAR model when covariance matrix is not positive define?

You are probably running out of data points. A single equation of a VAR(p) model for $k$ time series contains $pk$ slope coefficients. The entire model contains $pk^2$ slope coefficients. Their ...
Richard Hardy's user avatar
1 vote

R syntax of a second-order factor analysis. Does it work if one factor from the first order only consists of 2 items?

I think the problem is that you are allowing your first-order factor residuals to correlate in addition to the first-order factors being indicators of a second-order factor. This leads to an ...
Christian Geiser's user avatar
1 vote

Parameter 'C' cannot be optimized for 'nu-svr'? mlr3 with kernlab

From the sklearn User Guide (I know you're asking about an R package, but sklearn's user guide is pretty great about introducing topics IMO): The $\nu$-SVC formulation [15] is a reparameterization of ...
Ben Reiniger's user avatar
  • 5,051
1 vote

How to plot a binomial GLM with a three way interaction?

This is not much different than your prior question. Because you have all categorical variables, and because they are nested within a three-way interaction, you simply have a set of proportions. Get ...
gung - Reinstate Monica's user avatar
1 vote

Difficulties reproducing an R-blogger's example of modelling dependency with copulas

The error encountered while fitting a t-distribution copula to the stock data in R seems to be related to optimisation issues during the model fitting process. The function ...
Lynchian's user avatar
  • 308
1 vote

dbinom(x, N, phat) in R returns "NaNs produced". How can I solve this?

Partially answered in comments: Agreeing with everyone else: CL is "carapace length". It doesn't make any sense to model it as a binomial distribution ...
1 vote

Incidence rate ratio after negative binomial results in R

Try this: exp(coef(Mymodel)) Mymodel is a model object containing much more than the fitted coefficients, and some of this ...
kjetil b halvorsen's user avatar
1 vote
Accepted

How to generate a VAR(1) model?

I found out by myself here is the simplified version: ...
recon's user avatar
  • 23
1 vote

Error when using vif() on glmmTMB obejct?

I think the problem might be in how the vcov() calculates the variance-covariance matrix of the glmmTMB. It defaults to full=FALSE, which doesn't return the full variance-covariance matrix. But now ...
Rachael's user avatar
  • 81
1 vote

What post-hoc analysis should I use following a two-way ANCOVA with factor, integer and numeric variables?

This seems to be due to a confusion on your part about the necessity (and even applicability) of post-hoc tests. When you have a categorical variable with multiple levels (e.g., several subspecies) ...
gung - Reinstate Monica's user avatar
1 vote

How to test whether covariates are significant with "xreg=" and "auto.arima()" (Error message)

It seems that I was able to solve the issue by adding the nrow= and ncol= parameter to the ...
Dbb's user avatar
  • 73
1 vote

Add categorical variable in crr of package cmprsk

The abovementioned answer is great, just to mention one tiny detail in the matrix; ...
guaguncher's user avatar
1 vote
Accepted

To use the correct test for independence

So a game has been played 1554 times and you wonder what share of these uses happened by a good and how many by a bad. This can ...
Bernhard's user avatar
  • 8,485

Only top scored, non community-wiki answers of a minimum length are eligible