4

A couple of points: These models are nested and therefore you can also use formal hypothesis testing using F-test to compare them. These F-test are provided by the lmerTest package. In general it is not good to only look at measures like AIC or p-values to decide which terms to include in the model, especially the fixed effects in this case. You should also ...


3

I've made a few example models which should be nested if you just test them in order. The model I believe best is chickm6 which: removes the baseline Time 0 Diet effect, which is intuitive since at Time 0 (I would imagine at birth), the Diet should not have any effect on chick weight added a linear two-piece spline, with the knot placed at Time 6 (somewhat ...


3

Since you say : However, the relationship between $\textbf{y}$ and $\textbf{X}$ is not strictly linear over the entire domain, but could be better modeled as such within several subgroups $g$ (and coefficients are more meaningful if defined for each subgroup): it sounds to me very much like a mixed effects model (of which multilevel and hierarchical ...


3

New answer: 2020 ! the main interest lies in the changes in hospital-level variation You have 15 years of data, with over 100 hospitals and around 100,000 observations per year, so an average of around 1000 observations per hospital per year. I think there is only one approach that will answer the research question, and that is to divide the data into ...


2

It doesn't necessarily matter that the outcome variable happens to be a standard deviation. That would be a decision made due to the research question. Since the researchers are interested in modelling precision, this would seem to be appropriate. The important thing, to make valid inferences, is that the distribution of the residuals is approximately normal....


2

It would be helpful to know why you would choose to model the data in this way. However in terms of the multilevel model, this is technically possible to do. I would suggest group mean centering the within-unit sum by subtracting each unit's mean from their time-specific value on the sum. In R's dplyr: df <- df %>% group_by(unit) %>% mutate(...


2

In the two-stage approach, in the first step, you summarize the repeated measurements per peptide_Id into a single number. This inevitably leads to some information loss. To give another example, say that you measure the blood pressure of a patient ten times. Even though these measurements are correlated, they contain more information than their average. The ...


2

The multilevel model allows you to simultaneously model within- and between-plot variation. Consider a simplified multilevel model, with the Xs representing within-plot variables and W representing a between-plot variable. The within-plot model: $y_{ij}$ = $\beta0_j$ + $\beta1_jX_{1ij}$ + $\beta2X_{2ij}...$ + $e_{ij}$ Here you can include as many X ...


2

You could consider using a two-part mixed-effects model for semi-continuous data. This combines a mixed-effects logistic regression for the dichotomous outcome $\mbox{I}(x_1 = 0)$ with a linear mixed model for the logarithm positive responses $\log(x_1)$ for $x_1 > 0$. This model can be fitted, for example, in the GLMMadaptive package in R. For an ...


1

Thank you for the additional explanation in the comments about your outcome. They help in thinking about a way to move forward. I will first focus on that issue before sharing why I find your solution to move to a linear model problematic. With regards to $x_1$ and using a tobit model, it is critical to note that tobit regression works under the assumption ...


1

The Bayesian options mentioned in the comment thread appropriately treat the outcome as if it were drawn from a beta distribution, but because the beta distribution restricts values to be between >0 & <1, zoib and brms allow you to model the inflation you have at 1. They do so by estimating a separate model for the range >0 & <1, and then for ...


1

Regarding p-values: The p-values in the regression output are used to test the null hypothesis that the regression coefficient is 0, or in other words, that the variable is useful in predicting the response, given that the other variables are in the model. So the fact that the p-value for Time:Diet2 is greater than 0.05 means that you can conclude the ...


1

Why are you grouping price at all? Grouping continuous variables always entails loss of information and should only be done when you have a strong substantive reason for doing so, which you clearly do not. What are you trying to find out? If, for example, you want to see if price is related to continent, then I suggest doing quantile regression with price ...


1

You can have a standard deviation as an outcome in a regression model, multilevel or otherwise. The question is whether doing so leads to a model that makes sense and does not violate any of the regression assumptions as it relates to normality of the residuals. Regarding the residuals, you will have to check that yourself by looking at residual plots (e.g., ...


1

Some more information is needed to figure out the best solution here, so I'm simply answering a number of scenarios with example R code. Modeling the outcome If the outcome is binary, use family = binomial(). If it is count data, use family = poisson() since it's a fixed time interval. You could also consider aggregating binary data to counts and then use ...


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