New answers tagged

3

I don't see much evidence that the variance increases with the mean, nor that the error distribution is non-normal. You might be reading too much into chance variation. The principal message of the diagnostic plots is to highlight point 1 as being especially interesting: it's pretty far from all the other points. However, falling in the middle of the ...


3

When you have a binary outcome variable you typically use a link function to connect the probability of a positive response to the linear predictor that includes the random effects, i.e., \begin{equation} \left \{ \begin{array}{l} \log \displaystyle \frac{\pi_{it}}{1 - \pi_{it}} = x_{it}^\top \beta + z_{ij}^\top b_i,\\\\ \pi_{it} = \Pr(y_{it} = 1 \mid b_i),\\...


0

After thinking this through some more - intuitively (not mathematically), I think this happens because of redundancy and degrees of freedom. For example, suppose we are trying to categorize an observation. We look at the "treatment_duration" variable and find that it's in none of the "treatment_duration" 1-4 categories, so it's either in the "no treatment" ...


0

Partially answered in comments: Have a look at generalized linear mixed models (GLMMs). These can model repeated measures / panel data. – Frans Rodenburg Some posts on this site. GLLM's overlap with multilevel models which is an alternative. A book that looks useful is Applied Analysis Economic Social Surveys. Anette Dobson's An Introduction to ...


0

In this specification, changes in hormone level would be associated with changes in age level. So if I am correct, an increase in the magnitude of the change in hormone is associated with a smaller change in weight.


1

Here my thoughts. Hope you already found the solution as I am sort of at the same point. Changing the Likelihood of y for GLM changes the full conditional of your betas and likely the variance. So I am not sure if beta must be conditioned on sigma in a GLM setting anyway, as the joint density of variance,beta|y might not be concave anymore... While ...


0

If you were only interested in decay as a single predictor of patient/normal status, then this problem would disappear if you use decay non-parametrically. Just rank order the cases by decay values and plot true-positive fractions against false-positive fractions for each decay value as a cutoff in sequence to get a receiver operating characteristic (ROC) ...


0

My recommendation, if you want to test for collinearity and have categorical variables as well as continuous ones and are using R is to use the perturb package. The idea here is to add small amounts of random noise to the variables - by adding uniform or normal noise to the continuous variables and by shifting some categorical ones - and seeing what happens ...


3

You can better evaluate the fit of the two models using the simulated residuals calculated by the DHARMa package. Irrespective of the type of the model, these simulated residuals will exhibit a flat/uniform distribution for a correctly specified model. However, you need to be careful with their use if you have missing at random missing data in your outcome ...


1

Model selection based on $p$-values will bias the coefficients of the final model towards significance. This is a form of stepwise regression and should be avoided if the goal is confirmation through $p$-values. The actual chance of a false positive will be much higher than the chosen level of significance. This has been discussed in several places on CV, ...


1

In the ideal scenario, where your data wouldn't be plagued by complete or quasi separation, you would estimate the effects of interest in your binary logistic regression model using maximum likelihood estimation (MLE). If your sample size $n$ is small or moderate, it turns out that the MLE estimators of these effects suffer from bias under the ideal ...


2

The task is impossible, which can be revealed by bootstrapping the entire modeling and feature selection process to show that Confidence intervals on importance rankings of the candidate predictors will be roughly from 1-8 for all 8 candidates The features selected will vary wildly over bootstrap replications Essentially the data do not have the ...


2

Even though I am currently not familiar with brms, logically speaking you are fitting a mixed effects logistic regression. In this case the intercept is the log odds when Cond is zero, and the coefficient for Cond is the log odds ratio between Cond=1 and Cond=0. Note though that the interpretation of these coefficients is conditional on the random intercepts ...


2

Zhanxiong's answer is already great (+1), but here's a quick demonstration that the log-likelihood of the saturated model is $0$ for a logistic regression. I figured I would post because I haven't seen this TeX'd up on this site, and because I just wrote these up for a lecture. The likelihood is $$ L(\mathbf{y} ; \mathbf{X}, \boldsymbol{\beta}) = \prod_{i=1}...


0

x1 through x3 are not binary. If they are categorical with 10 categories and not ordinal, you can create 10 indicator variables for the presence or absence of each category.


1

SJ, if these are all categorical (assuming they are factors) then the scale doesn't really matter. The logistic regression isn't analyzing the actual number, but rather the presence or absence of that variable. You could easily rename all of the variables A,B,C,D, etc. within x1, x2, x3, and x4 and you would get the same results because they are ...


2

Yes, a deviance test is still valid. Some more details: Since the general theory is not specific for binomial models, I will start out with some general theory, but use binomial examples (and R.) GLM's is based on the exponential dispersion model $$ f(y_i;\theta_i,\phi)= \exp\left\{ w_i [y_i \theta_i -\gamma(\theta_i)]/\phi +\tau(y_i,\phi/w_i)\right\} $$...


3

Survival analysis is a good idea for your case. Six time points might be too short, though... For a proper analysis, your data needs to be in a "longer" format, where you have 4*60 rows (one for each plant), and four columns: the first is the factor (WT, A, B, C), the second the "left" time (time of inclusion in the study, 0 for all your plants), the third ...


2

The definition you quote which is used with generalized linear models (glm) is not an exponential amily, it is an exponential dispersion family. For a fixed value of the dispersion parameter $\phi$ it is an exponential family (indexed by $\theta$), but when $\phi$ varies it is not. When used in glm's, the exponential dispersion family is used for ...


4

A couple of points: The reason why you typically need to use GLMMs, i.e., include random effects, is to account for correlations you have in your outcome data in specifics clusters/groups. For example, measurements taken on the same habitat will be correlated. To select the fixed-effects structure you need first to appropriately model these correlations. ...


0

You could use glmmTMB to do beta regression using the argument family=beta_family. It can do either GLMs or GLMMs, so random effect can be included. I don't think the beta family has been extensively tested, but it should work as far as we know.


0

If you actually test for normality in residuals, it is rejected for GLMM: library(fBasics) jarqueberaTest(resid(fitLMM)) jarqueberaTest(resid(fitGLMM)) shapiroTest(resid(fitLMM)) shapiroTest(resid(fitGLMM)) But before of that you need to evaluate the singularity problem in fitLMM. I got > isSingular(fitLMM) [1] TRUE Apparently it is originated by ...


4

Computationally, R-sq in computer printouts is the square $r^2$of the (Pearson) correlation $r.$ Sometimes $r^2$ is called the 'coefficient of determination'. Because $-1 \le r \le 1$ we have $0 \le r^2 \le 1.$ Suppose we have the simple linear regression model $$Y_i = \beta_0 + \beta_1 x_i + e_i,$$ for $i = 1,2, \dots,n$ where $e_i \stackrel{iid}{\sim}\...


1

R-squared or coefficient of determination generally has the value between 0 and 1. However cor(x,y) is between -1 and 1. Definition of R-squared for a multiple linear regression is the square of correlation between output (y) and predicted values(f). For the case of simple linear regression with an intercept and one explanatory variable it happens R-squared ...


Top 50 recent answers are included