All Questions
6,589 questions
2
votes
0
answers
85
views
How is Gaussian log likelihood value calculated in weight linear regression?
I have examined these R functions glm.fit() gaussian()$aic stats:::logLik.glm() and ...
0
votes
1
answer
47
views
Is there a standard way to quantify & test the benefit to one covariate by including a second covariate?
For a linear model (or glm), is there a standard statistic (and associated test) to quantify whether inclusion of a covariate increases the strength of the association between another covariate and ...
1
vote
2
answers
30
views
Should I conduct a multilevel for this or another analysis? Need help
I have three sources of data (teachers, parents and students) assessing students, in three waves. I want to assess all and see the differences between moments but then I also want to use variables for ...
0
votes
0
answers
39
views
How to identify the best use of the logit link function in regression?
I am confused about how to identify the best use of the logit link function in regression problems.
Here is my current understanding of the topic. My confusion stems from the fact that for continuous ...
-1
votes
0
answers
8
views
what happens when a network has low closeness centrality - what happens to nodes on the periphery [closed]
I have thirty-nine nodes with closeness centrality scores but I do not know what to say about the nodes on the periphery who do not have scores.
3
votes
1
answer
46
views
Calculate marginal effects for random effects model with two crossed random effects
I am trying to get effects marginal of two crossed random effects (using STAN or brms). I understand how to do it for a single random effect following McElreath's book and Kurtz's brms version of the ...
4
votes
2
answers
41
views
Accounting for non-independence and autocorrelation in HGAM
I am currently trying to fit a HGAM to model differences in daily activity patterns of fish in two treatments. Data were collected with high-resolution telemetry, and I currently have estimates of ...
1
vote
1
answer
19
views
How to test for interaction between dichotomous repeated measures outcome and continuous moderator
In my dataset, participants were asked if they plan to make a purchase (yes/no) before and after a sales presentation. It is expected that people would be more likely to respond with an intent to ...
4
votes
2
answers
145
views
Why do I get different standard errors when i group the data before fitting a Quasi-Poisson GLM for counts with an offset = log(population)?
Is it theoretically correct to group the data before fitting a quasi-Poisson or should I leave it ungrouped?
Commentary as well as an example in R code is posted below.
I noticed I get different ...
2
votes
1
answer
135
views
Does this comparison of the quasipoisson model to the poisson model make sense?
I'm messing around with the use of the quasi likelihood method so this is my first attempt. I think I'm misunderstanding a key component, since I do understand why the parameter estimates are the same ...
0
votes
0
answers
22
views
Derive gamma-parameters from preset R^2 in mixed models
For a simulation study in R, I want to select the effect sizes according to a preset $R^2$.
Consider this two level random intercept mixed model, with one L1 predictor $X_{ij}$ and one L2 predictor $...
2
votes
1
answer
56
views
Zero-inflated model with low values but no zeros?
I am new to modelling and this question may be ridiculous but, I am trying to model pathogen load count data with species*lifestage interaction effects using ONLY positive individuals.
I.e., those ...
0
votes
0
answers
9
views
Extracting individual level posterior class memebership probabilities in multilevel LCA
I am conducting a multilevel laten class analysis using the R package multilevLCA.
I have fitted the model using multiple steps (i.e. determining optimal number of classes as well as clusters). I now ...
6
votes
1
answer
125
views
Is there a way to forecast by subgroup without forecasting each subgroup separately?
I am trying to find an appropriate model to forecast the number of applications received at the end of a recruitment cycle based on previous recruitment cycles and the number of applications received ...
2
votes
1
answer
70
views
How to verify and report results from a glm with family = quasibinomial?
I estimated a glm with the family = quasibinomial. My dependent variable is continuous survival rate, which ranges from 0 to 1 with (like: 0, 0,1, 0,2.....,1). My ...
1
vote
0
answers
48
views
Opposite results using Bayesian (STAN) vs Multilevel model (nlme). How is this possible?
My datasets contains the median wages and the cumulative installed wind-capacity for 4000 counties over a period of 20 years. The wages tend to rise over the period and the capacity tends to highly ...
15
votes
2
answers
563
views
Why does glm in R with family binomial(link="log") sometimes require start values?
While simulating some studies and analyzing them in R with glm(…, family=binomial) and binary and continuous covariates the function sometimes complains:
no valid ...
0
votes
0
answers
18
views
How to Forecast Sales for Sub-Locations Without Historical Proportion Data?
I have a time series dataset of total sales for a product in a store over time. This product is available in two different locations within the store: one stand near the checkout and another stand in ...
0
votes
0
answers
31
views
Multinomial glm(m) with predictors varying over item/response combinations
I have multinomial data where there are 4 items (categories) and many responses. For each response the size of the multinomial can exceed one (i.e. a response may be c(10,20,3,0)).
The predictors I ...
0
votes
0
answers
56
views
Logitstic regression varies among statsmodels GLM, statsmodels Logit, and skylearn LogisticRegression functions [duplicate]
All,
I found that the logistic regression of simple binary data varies greatly among the following functions.
statsmodels.api.GLM
...
2
votes
0
answers
76
views
Do generalized linear models really need to assume the distribution of errors? [duplicate]
A GLM has the following form:
$$
g(\mathbb E[Y\mathop | X])=X^T\beta
$$
where $g$ is the link function. We can write the moment conditions as
$$
Y=g^{-1}(X^T\beta)+\varepsilon,\\
\mathbb E[X^T\...
0
votes
0
answers
54
views
Negative binomial GLM with interaction term...Anova warning?
I am running a seemingly simple model:
model<- glm.nb(PathogenLoad ~ Species*Lifestage, data = data)
The species variable has 3 levels and Lifestage has 2 ...
0
votes
0
answers
24
views
Multilevel Model in R
I have data from a study in which 19 participants (9 males, 10 females) have each completed 4 jumping conditions (BW, 20, 25, 30) whilst I have measured joint level data for the hip, knee and ankle. I ...
0
votes
0
answers
21
views
At what stage of the species distribution modelling to standardize variables and check for collinearity
I try to model the distribution (ecological niche) of a species using a generalized linear model (glm() in R) based on several climatic variables and then apply the ...
2
votes
1
answer
42
views
What's the difference between Binomial model versus Poisson model with an offset for GLM
I am working with binned data indexed by $( i = 1, \ldots, n )$, where for each bin $i$, I have:
$( X_i )$: the number of successes
$( N_i )$: the total number of trials
I want to model the ...
0
votes
1
answer
42
views
CWC(M) in multilevel modeling
I am new to multilevel modeling and recently learned about CWC(M) by Zhang et al. (2009, https://journals.sagepub.com/doi/abs/10.1177/1094428108327450). I am running a multitlevel moderated mediation ...
0
votes
0
answers
18
views
Comparing data at different locations over a time series
I have water quality data from sondes placed at different locations across a lake that collected every hour over the entirety of the summer. I want to know if there is a difference between the four ...
0
votes
0
answers
16
views
How do we prove the variance of regression coefficients of b are corresponding to the variance-covariance matrix?
Say, we have y = b0 + x1b1 + x2b2
I understand the proof of var(b) = var(y)*(X'X)^-1
What I haven't figured out is: Why does the variance-covariance matrix arrange so. Why does not it have a different ...
0
votes
1
answer
41
views
assumptions of a glm
I am running a glm in R and from the residuals plots, the model doesnt meet the assumptions perfectly. My question is how well do these assumptions need to be met or is some deviation ok? I've tried ...
0
votes
0
answers
87
views
Should the linear regression of a transformed $y$ (sigmoid $y$) be identical to the transformation (sigmoid) of the responce
Should the sigmoid $(1/(1+e^{-y}))$ of the predictand $\hat y$ of the linear model be identical to the linear regression of the sigmoid $y$. The Python example below demonstrates linear regression of ...
4
votes
1
answer
165
views
Jointly Testing a Composite Null
Suppose we have a GLM with $g^{-1}(\mathbb{E}[y|x]) = \beta_0+x_A\beta_A+x_b\beta_B$. I would like to test the following hypotheses: $H_0: \beta_A \leq 0 \cup\beta_B\leq0$ $H_1: \beta_A>0\cap \...
0
votes
0
answers
12
views
mice multilevel imputation: does specifying cluster variable ("-2" in predictor Matrix) without multilevel methods lead to cluster robust imputation?
In short: Are mice's imputations cluster robust when I only specify the cluster variable with "-2" in the predictor matrix but do not use multilevel models during imputation?
For clustered ...
1
vote
1
answer
56
views
Is it possible for the residual variance in a model to be greater than the total variance of the variable being modeled?
I've fitted a linear regression in R with svyglm from the survey package. The data is weighted, and the model uses a ...
0
votes
0
answers
19
views
Gamma distribution glm standardisation
I want to model biomarkers which seem to have two distributions. I want to model the change in biomarker at two visits three years apart. However, I am trying to do this with a glm and a gamma ...
4
votes
1
answer
45
views
How to Simulate a Multilevel Predictor Variable with Both L1 and L2 Variance Components?
I'm working on simulating multilevel data where I have a predictor variable measured at Level 1 (L1), which has both L1 and L2 variance components. For example, I want to simulate a socio-economic ...
8
votes
0
answers
94
views
Name for Generalized Generalized Linear Models
Consider the class of models given by $y\sim F(g^{-1}(\beta^\top\mathbf{x}))$ with $\mathbb{E}[Y]=g^{-1}(\beta^\top\mathbf{x})$.
Most authors I've come across call this a GLM only if F is in the ...
2
votes
1
answer
35
views
Reporting Hierarchical Regression Results in Abstract
I did a hierarchical regression test in a social science study looking at how two variables (A and B) and their interaction term can predict variable C. My mentor told me to write in the abstract that ...
1
vote
1
answer
59
views
Zero inflation: OLS vs Poisson
I am working with a dataset with many zeros in the outcome variables (ranging from 50% to 95% zeros). I am using the glmmTMB package to run zero-inflated Poisson ...
1
vote
0
answers
16
views
bear data set: glm or glmm?
I have a dataset where I am trying to determine the speed of bears depending on their sex, the year and the season. Some of my bears have multiple seasons of data: out of 79 bears, 19 had data for two ...
2
votes
0
answers
34
views
Difference in modelling between transforming the response and using a non-normal distribution? [duplicate]
In regression modeling, what is the difference between fitting a model by transforming the response variable (e.g., applying a log transformation to y) and then backtransforming the outputs to the ...
5
votes
3
answers
498
views
Best statistical analysis with (very) limited samples : MLR vs GLM vs GAM vs something else?
I have a very limited dataset (11 observations). I am trying to obtain relations between a response variable and environmental covariates (I have a set of 14 environmental covariates that I can use). ...
0
votes
0
answers
36
views
Pooling Model Results with Rubin's Rule for Multiple Responses (Same Predictors, Different Outcomes)
I understand that Rubin's rule is commonly applied for pooling model results across multiple imputed datasets, where the same set of predictors and response are used, like this:
...
0
votes
1
answer
33
views
Mediation models require a sigma matrix that is symmetric
I'm trying to fit the following reproducible mediation model called final. But I get an error saying:
sigma must be a symmetric matrix
Could you please advise how ...
2
votes
0
answers
16
views
Which estimator to choose for meta-analysis^ REML or CR2 with Wild Bootstrap?
I am following the following book: https://bookdown.org/MathiasHarrer/Doing_Meta_Analysis_in_R/multilevel-ma.html
I can't choose which estimator to choose: REML or CR2 with Wild Bootstrap.
Or maybe ...
3
votes
1
answer
61
views
How can we simulate correlated random variables that vary at different levels in a multilevel/mixed effects setting?
I am very familiar with generating correlated random variables from a multivariate normal distribution.
This question is about doing that in a multilevel setting, where variables only vary at ...
2
votes
1
answer
78
views
General formula for mixed models
I'm trying to wrap my head around the general formula of mixed models and how it relates to the system of equations I'm used to.
The general formula read like this:
$$\mathbf{Y_{j}}=\mathbf{X_{j} \...
4
votes
1
answer
39
views
Outcome in mixed models - lower level or upper level?
I am learning about mixed models and I have a question regarding the outcomes that can be considered. If I have hierarchical data, do the outcomes that I can consider need to belong to the lower level?...
1
vote
0
answers
13
views
normalisation for modelling on new data
I have a model based on several environmental variables and I want to apply it to a new dataset/location but the variables, while theoretically measuring the same things (slope, riverwidth, ...
6
votes
2
answers
393
views
Omitted variable bias in Poisson regression
I have a Poisson model where the true relationship is:
$$E(y\mid x,z)=\exp(b_1+b_2\times x+b_3\times z)$$
but z is not observable and so it is omitted from the estimated regression.
I read here that ...
8
votes
1
answer
471
views
Power analysis for three-level multilevel models in R
For a study in a social science setting - where huge number of participants are not easily available - I'm trying to do a power analysis for a three-level multilevel design.
There are few packages ...