instruction stringlengths 9 38.7k |
|---|
Can SHAP importance be used for linear mixed models? I've seen it used for a variety of different modeling methods and was curious if it was possible to use it for linear mixed models? I am using the lme4 package in R.
Any help at all is greatly appreciated!
|
Here is the current Formula One World Championship points scoring systems—
Currently in Formula 1, there is a lot of talk about this and whether it is adequate or if it should be changed.
$$\begin{matrix} {\it prix}\,{\it finishers} & {\it points}\,{for}\,{\it pos}\\ 1 & 25\\ 2 & 18\\ 3 & 15\\ 4 & 12\\ 5 & 10\\ 6 & 8\\... |
Given constants $b, n ∈ N$, provide a neural network which implements a function $g_{b,n} : R → R$ such that
$|{x ∈ R : g_{b,n}(x) = x^2, 0 ≤ x ≤ b}| > n$,
i.e., $g_{b,n}$ intersects the function $f(x) = x^2$ more than $n$ times in the interval $[0, b]$.
My idea is to create a zig zag sort of function split into $b/n$ ... |
If I have a dataset with hundreds of samples and thousands of features, and t-SNE does a good job of separating classes compared to others classifiers, I don't understand why I can't rerun the algorithm with an additional test sample and predict its class based on KNN. Even if the model is non-parametric, can't the rob... |
I have created a mixed-effect model which involves drug response, here I have 2-factor level Drug variable of response that is Control or Drug A. The model that I employed is m1 which basically check a drugA (with 3 rats) over control (3 rats). And DF1 (dataframe) is a set of 6 rats with control and drugA (in total the... |
I have non-normally distributed, heteroscedacic and autocorrelated data. To overcome these issues I would like to use robust linear mixed models with the robustlmm package in R or random forest regression. Which do you think is better suited?
My continuous response is yield [dt/ha] and my fixed effect predictor variabl... |
I have a dataset with features A, B and C and an output label D. I want to perform the likelihood ratio test to see if feature C contributes to the performance of a regression model.
Do I:
train two models $M_1$ and $M_2$, one using features A B C, one using only features A B, and perform the test using those two mode... |
I understand that for non-parametric data, the probability density function (pdf) cannot be obtained using parameters like (mean value) and (standard deviation), and I understand that we use Kernel Density Estimation to estimate pdf.
However, for any non-parametric data, can I still estimate (mean value) and (standard ... |
Consider the classical model Normal-Normal-Inserse-Gamma model:
$$
x=(x_1,...,x_n)|\mu,\sigma^2\sim N(\mu,\sigma^2)\,\,(iid),\,\,\mu\sim N(m_0,\tau),\sigma^2\sim IG(a,b),
$$
where $m_0,\tau,a,b$ are known.
Suppose My interest is $\phi=\mu/\sigma$. So the usual path would be: obtaining the posterior distribution of $(\m... |
I'm trying to conduct feature selection based on the Canonical Correlation Analysis (CCA). As far as I know, for two given datasets $X$ and $Y$ CCA looks for the linear projections of $X$ and $Y$ such that these projections have maximum correlation. However, when I try a toy example
Xdata <- matrix(rnorm(500, 0, 1), nr... |
I am currently dealing with a multi-class classification problem. I have two different approaches (in terms of feature engineering) to this problem. Intuitively, the result is obvious. However, I want to show it statistically.
I use random forest algorithm. The sample size is approximately 750, and the number of predic... |
Let $X_{1},X_{2},...,X_{16}$ be a random sample from a $N(4\mu,1)$ distribution and $Y_{1},Y_{2},..,Y_{8}$ be a random sample from a $N(\mu, 1)$ distribution, where $\mu$ is unknown. Assume that two random samples are independent. If you are looking for a confidence interval for $\mu$ based on the statistic $8\bar{X} +... |
I have this sample of a dataset that show for each number of ads showed to the user, the number of click and the KPI value (CTR):
#volume #click KPI
20 10 0.5
2 2 1
3 1 0.33
20000 1600 0.08
KPI values are calculated as : #click/#volume
we want to pick better ads . The issue ... |
I have been trying to plot a time series model for the equation
$X_t = 0.5 X_{t-1} + 0.5 X_{t-2} + \epsilon_t$
set.seed(87364) series5 <- arima.sim(n=1000, list(order = c(2,0,0), ar = c(0.5,0.5)), sd = 1) plot(series5, main = 'AR(2)')
But I keep getting this error:
Error in arima.sim(n = 1000, list(order = c(1, 0, 0), ... |
I want to simulate data of the following random intercept effect model in R
$$Y_{ij}=\alpha+\beta x_{ij}+u_{0,i}+\epsilon_{ij}$$
$$u_{0,i} \sim N(0,\tau^2)$$
$$\epsilon_{ij} \sim N(0,\sigma^2)$$
Here the intercept $\alpha=10$ and slope $\beta=5$, and I know $\tau=10,\sigma=1$.
I wonder how to simulate the data of this ... |
I have seen several practice questions using a simple linear regression eg y = ax + b where the question indicates that using a supplied value of y to find the x variable is invalid because the regression equation is the "wrong way round" ie can only be used to estimate a y value given the x value. I dont understand t... |
Usually concept drift is defined as a change in the conditional distribution of our target variable with our covariates,
$P_{0}(Y|X) \neq P_{t}(Y|X)$. It is also known as real concept drift or conditional drift (according to https://dl.acm.org/doi/pdf/10.1145/2523813).
Data drift is defined as a change in the covariate... |
My last question was closed, so I made a new one that is more relevant and has my full calculations thus far. I have a scenario where I have been given some information, such as normal equations from a linear model. From the information I'm given, I need to get least squares’ estimates of 1, 2, and 3. I think I am on... |
This is my first post on cross validated (and my first attempt at statistics!) so please let me know if I haven't been clear enough with my question.
So I was learning about Bayesian Parameter Estimation, when I came across this for likelihood:
This was immediately followed by the statement "The binomial distribution... |
I have a multi-class classification problem with time-series features. You can find an example series below. It shows the same series over time for different classes (actually, each line represents the average of its class at a given date).
I have experimented with multiple models, and the random forest has the highest... |
I have alot of stock data features. I have normalized each feature by stock as different stocks have very different stdev. I would also like to normalize by time of day. IE stdev is very different at 9:45AM than at Noon. How do I standarized for two dimentions rather than just one? Do I do two passes? Is there an... |
Suppose the DAG below is the true, complete, DAG for the effect of $Exercise$ on $Cholesterol$. $Exercise$ lowers $Cholesterol$; $Age$ causes people to $Exercise$ more; $Age$ causes $Cholesterol$ to increase. Now suppose that we are not interested in causal effects; we are, instead, building a predictive model of $Chol... |
I want to conduct a confirmatory factor analysis (CFA) for a model with 4 latent variables and 60 indicator variables (15 per factor, uncorrelated factors, hence 1,710 degrees of freedom, that is, 1830 covariances minus 120 model parameters).
Using the semPower package (A priori power analysis: https://sempower.shinyap... |
I'm a novice in the field of ML and stats.
So I have a dataset where the target feature (dependent variable) is binary (True, False), I'm trying to make some inferences and find features in the dataset that explain the target feature, I'm not trying to create a predictive model, I'm just trying to get the coefficients ... |
The sandwich estimator for OLS regressions where heteroskedasticity is suspected is
$$
var(\hat\beta) = (X'X)^{-1}X'ee'X(X'X)^{-1}
$$
If I want confidence intervals on predictions, I can just take many draws from $N(\hat\beta, var(\hat\beta))$, multiply by $X$, and take the quantiles.
But what if I want prediction inte... |
Does anyone more experienced with R's survey package know about an alternative for svychisq for the case of a contingency table with at least one cell with a zero value?
There does not seem to exist an equivalent of fisher.test for complex survey data.
Please find below the link to the database and the code that I have... |
I read statistical analysis plans and reports of over 80 longitudinal trials. I noticed, that in 70% they were analysed using a marginal model, namely the MMRM approach (mixed-model repeated measures). MMRM has weird name, as there is nothing "mixed", pure fixed-only regression with residual covariance specified, fit w... |
I was learning about Bayesian Parameter Estimation when I came across Uniform prior.
I saw the answers to this question for some insight into it.
In the source I'm referring to, this is how the function is described:
Doesn't this suggest that for any θ, P(θ) = 1? How is that possible? Have I misunderstood the descrip... |
I'm going through Rethinking and Kruschke's Puppy book.
After the examples I want to try myself with other data and have a problem.
What if (unlike the examples in the book and online) categorical variables have no hierarchy.
Thus numerical encoding feels wrong (maybe this is too traditional logistic regression thinkin... |
For my research I need to conduct a mediation analysis on panel data, my data setup is as follows: It is an (unbalanced) panel dataset including about 50 countries and 14 years. I have one dv, one iv and am interested in the mediation effect of this iv by estimating mediation effects of two different mediator variables... |
I have a mathematical model according to which a quantity I can measure experimentally, x, is equal to a linear combination of two other variables, y and z: x=ay+bz. I can measure experimentally x and y in different treatments and would like to know if z changes. I have no way of measuring z, nor a and b. How can I det... |
I have been reading the Deep Learning book by Ian Goodfellow and on pg. 277, they mention:
It is also crucial that the minibatches be selected randomly.
Computing an unbiased estimate of the expected gradient from a set of
samples requires that those samples be independent. We also wish for
two subsequent gradient est... |
I have been trying to understand Hidden Markov Models but I often find myself confused. I have discussed with my tutor for further help however, he is often rude and does not help and so I have decided to turn to the community.
I am trying to determine the probability of observing the following sequences: AABGA, ABBGT.... |
I am doing a self study of "Survival and Event History Analysis" by Aalen et al. Overall, I like the book. It is my second pass at survival analysis (I used
Survival analysis: Techniques for censored and truncated data by Klein and Moeschberger). This is a nice dive into the underlying theory without needing to revisit... |
According to the source I'm referring to, this is the function for the uniform prior:
This was followed by:
where P(θ) is replaced by 1... why was that done?
Any help is greatly appreciated.
|
Let's say I have a longitudinal study, with patients assessed at several time points, which goal is to compare the treatment vs. placebo.
If, theoretically, I used a mixed model to analyse the difference over time, should I include only the random slopes for time without random intercepts?
My reasoning is as follows. R... |
Assume Team A scores an average of 3 goals per game with a standard deviation of 1.0, and assuming Team B allows an average of 2 goals per game with a standard deviation of 0.5.
How would you determine the expected goals of Team A scoring on Team B?
|
I have a somewhat convoluted question here. Suppose I have paired random variables $X$ and $Y$. That is, when I draw samples, I get one instance of $X$ and an associated instance of $Y$. Then I can calculate $$\operatorname{Cov}(\bar X, \bar Y) = \frac{\operatorname{Cov}(X, Y)}{n} $$ where $\bar{X}$ and $\bar{Y}$ are s... |
So I have a solar Irradiation dataset having around 61000+ rows & 2 columns. I have made the model using XGBoost to predict future values.
I have split the data in 2 parts train and test and trained the model accordingly. Furthermore, I have made the predictions on the test data set. Everything is going fine. But now I... |
Say I have a bag with 10 numbered balls, and I pick one ball at each time step and then put it back in the bag. Since each ball is equally likely, therefore the current situation represents a uniform sampling with replacement scenario.
Say I repeat the above sampling with replacement step 1000 times. So in expectation,... |
I am trying to predict whether two sets of papers are written by the same author by looking at the distribution of papers over the years (number of papers published in a given year). Suppose we have a first group X = { 1992:2, 1993:5, 1996:10, 1997:2, 1999:10} and a second group Y = {1992:1, 1994:3, 1996:2, 1997:5, 2... |
The following probability density function has a particularly simple form, and it was produced when deriving a confidence interval for $\frac{\mu}{\sigma^2}$ , $$g(y;\delta)=c_\delta(1-y^2)^{(n-3)/2}e^{\delta y}\quad\quad \text{for}\quad-1\leq y\leq 1 $$
where $$c_\delta ={{(|\delta |/2)^{n/2-1}}\over{\sqrt{\pi}\, \Gam... |
I've read in a paper using Hoeffding's inequality to derive a bound on the probability of the difference of means of two samples being larger than a threshold that "Hoeffding's bound greatly overestimates the probability of large deviations for distributions of small variance; in fact, it is equivalent to assuming alwa... |
If we divide the data into training data, validation data, and testing data, I remember the lesson from Andrew Ng saying we use the validation data for hyperparameter tuning purpose.
(you can see this article: https://towardsdatascience.com/why-do-we-need-a-validation-set-in-addition-to-training-and-test-sets-5cf4a6555... |
I'm confused about some of the results I got after plotting my data.
I have a data set that includes tests scores and a binary group assignment of either polypharmacy or non-polypharmacy. the scores are unpaired. I have 132 overall observation with 35 being non-polypharmacy.
Here is a reproducible example of my data:
s... |
I am currently analysing a dataset from a survey that moved participants to a different section depending on their response to a previous question, (e.g. people who said they were not farmers, skipped the farming-related questions). There is also missing data that does simply relates to respondents choosing to skip the... |
I want to know the pdf of the multiplication of two normal random variables (may or may not have the same mu and sigma, may or may not be correlated).
R> x=rnorm(100)
R> y=rnorm(100)
R> hist(x*y)
R> hist((x+1)*(y+2))
I tested for the above simplest cases. It seems that the resulted distribution has a long tail. Is the... |
A straightforward question: when is it "favorable" to interpret visualizations using, say, boxplots, histograms/density estimates, versus empirical cumulative density functions (ECDFs)?
I've always relied on histograms and density estimates for getting a sense of data distributions, and boxplots for comparing distribut... |
Suppose I have paired data $(X_1, \ldots, X_n)$ and $(Y_1, \ldots, Y_n)$ and I would like to compare if the means $\bar{X} = \frac{1}{n}\sum_{i=1}^nX_i$ and $\bar{Y} = \frac{1}{n}\sum_{i=1}^nY_i$ are significantly different.
The range of each variable is between 0 and 1: $X_i \in (0,1)$ and $Y_i \in (0,1)$.
In this cas... |
I have a dataset with a column of ratios $Y = z_1 / z_2$, which will be my depending variable, and a set of columns that explain $Y$.
Here $z_1$ means "imports" and $z_2$ means "exports", which for different products comes from yearly data of the form
Year: 2021
Product: Portable automatic data processing machines,
... |
I have asked the question here before but have not been able to resolve it.
I have data from 150 participants who were asked about their emotional state at 3 points in time. There are 28 different emotional states, each asked on a 6-point scale of intensity.
My interest is to find out if some clusters can be interprete... |
I studied two papers related to discriminating between two similar distributions using Shannon entropy. But both of them had different views. Can anyone explain what would be the basic flow of idea to for discrimination procedure using Shannon entropy as a statistic?
Here are the two papers:
enter link description here... |
We have nine conditions in our study (two category factors each with three levels; A: a1, a2, a3; S: s, c1, c2). I did two-way ANOVA; however, we are interested in a more nuanced question. c1 and c2 are control variables controlling different (and independent) aspects of s. We want to compare s and controls (s-c1 and s... |
I have been trying to generate the tSNE plot for the OCTMNIST dataset which is a part of MedMNIST v2(https://medmnist.com/). The code that I have been using is-
from tsne_torch import TorchTSNE as TSNE
X = torch.tensor(x.clone().detach()[:10000, :], dtype=torch.float)
X_emb = TSNE(n_components=2, perplexity=30., n_ite... |
Usually (for linear models at least) Shapley values are defined as deviations to some mean. By default, it seems the bar plot of the popular python package shap diplays the mean of absolute Shapley values and there is no root_square_mean property on the shap.Explanation class to get a plot of standard deviations.
Is th... |
How to test my hypothesis - the larger the fare the more likely the customer is to be travailing alone?
import seaborn as sns
# dataset
df= sns.load_dataset('titanic')
df[['fare','alone']].head()
fare alone
0 7.2500 False
1 71.2833 False
2 7.9250 True
3 53.1000 False
4 8.0500 True
Proposed metho... |
I have a time series $S(t)$ for $t\in I $ where $I=[0,t_\text{max}]$ is an interval.
The time series is very regular, $S(t) = \sin(t)$, although my following question is independent of the explicit analytic form (if any) of the series.
I want to select two sub-intervals of $I$ of same length, for example $I_0 = [t_0,t_... |
I am using linear regression to calculate trend of 2D x-y data. (x is time and y is some sensor data)
However, I realized that sometimes slope of linear regression needs proper scaling.
For example, even though data is same, slope can be varied by unit. (kilo-meter, centi-meter ...)
I'd like to extract somewhat normali... |
I am currently studying time series. However, I have trouble understanding how ergodicity and stationarity differ.
Could someone clarify the difference between the two concepts in simple terms and maybe give an example?
|
I am having trouble with interpretation of a prospective superiority randomised controlled trial. Study characteristics:
Study design:
Alpha value = 0.05
1-beta = 0.8
Predicted effect size =0.15 [P1 = 0.65, P2 = 0.5]
Numbers needed = 492
Observed results:
Effect size = 0.09 [P1 = 0.50, P2 = 0.41]
Numbers enrolled =... |
I have a VAR model that comprehends 6 series.
Only one of them is non-stationary even after taking the 1st difference.
Do I need to take the 2nd difference?
My concern is to approximate too much the other 5 series.
I used the augmented Dickey-Fuller test.
|
I was working on this problem but the extra information supplied seems so superfluous and I'm trying to figure out if it is meaningful, and how it is meaningful.
Given:
This video has presented two boy-or-girl paradoxes.
Find:
What is the probability for one of the children to be a girl given that;
One of them is a bo... |
I have two different datasets (ID 1 and 2) which show the number of animals per hectare for each year. I need to know if the trend for the first periode is different then the trend for the second period. The data is very limited but I need to be able to say something about growth or decline of this population of the ye... |
The definition of single linkage says: In single linkage method, the distance between two clusters is defined as the minimum distance between two data points in each cluster.
However, different articles on clustering contradicts the above statement. The single linkage will create very loose clusters. Hence, the intra c... |
I will use an extremely simplified example to ilustrate the question, but I think the answer shsould hold for more generalised cases.
Let's say I want to create a time series regression model (the model itself is not relevant as the question is related to the information present in the data) to predict a target variabl... |
I got this question, it may be easy but for some reason for me is not:
you are given a binary variable $b\in [0,1]$, that has no predictive power on $y$, but has some on $X$. How would you use it to improve the performance of a regression model $y=\beta X+\epsilon$?"
Any thoughts ? Thank you.
|
I'm trying to come up with how to invert a hypothesis test to obtain a lower confidence bound, specifically for a binomial distribution. So suppose you have a binomial distribution with 5 trials, and 4 successes, and you want to obtain a lower confidence interval, of say 95%.
Typically the way I've previously learned w... |
I wonder how to understand the following mixed effect model.
$$y_{ij}|b_i \sim N(\mu+b_i+\beta_j,\sigma^2), \ \text{where} \ b_i \sim N(0,\sigma_b^2)$$
for $i=1,2,....,M, \ j=1,2,...,N$
What is the fixed effect and what is the random effect? Can I write it in a matrix form? Why is it conditioned on $b_i$(I assume it's... |
Let's say in a video game there are 2 different attacks I want to test, A and B. They have a RNG component so damage varies from one sample to next. Both follow a standard distribution. I test by taking a huge number of samples of each, find the mean, and calculate margin of error. Now I have all this, what do I do wit... |
Assume I have a real count of people by city, and I have 4 cities, A,B,C,D (for simplicity), and the people distribute 30%, 30%, 25%, 15% respectively.
I also have a sample of this population, which is distributed let's say, 33%, 26%, 28%, 13%.
Now I would like to measure whether these distributions are significantly d... |
I have a set of two-dimensional data points that I want to fit with a continuous piecewise linear function with one break point. However, I want each of the two segments to be supported by a minimum number of data points. How can I do this in Python?
With the library pwlf, I can't set a minimum number of data points pe... |
While reading this paper on word2vec, I came around the following description of a feedforward Neural Net Language model (NNLM):
It consists of input, projection, hidden and output layers. At the input layer, N previous words are encoded using 1-of-V coding, where V is size of the vocabulary. The input layer is then p... |
As a learning exercise, I'm trying to implement the deviance for logistic regression from scratch.
I understand the deviance to be:
$\mathcal{L}_S - \mathcal{L}_M$, where $\mathcal{L}_s$ is equal to the likelihood of the saturated model (the ground truth values we're predicting) and $\mathcal{L}_m$ is equal to the val... |
I am asking a question that is math, but I am not sure if machine learning can help too, so posting here!
I have a univariate Gaussian function $\phi_{\mu, \sigma}(x)$, with mean $\mu$ and variance $\sigma^2$.
I need to do some integral of the type:
$\int dx \phi_{\mu, \sigma}(x) F(x, ...)\ (1)$
where $F$ is some known... |
This is what I saw in a source I am referring to:
Since both the numerator and the denominator are probabilities (so they can only take any value between 0 and 1), how can the result of division be negative?
|
I have a bunch of telephone data including information on call start time, end time, and duration. I am trying to evaluate the quality of the dataset to determine if the phone call data are legitimate or manufactured. What are the best-practices in evaluating a dataset like this? What tools can I use to perform a task ... |
I've been training some agents playing Tetris, and I have ran some experiments with different reward structures:
I'm mostly interested in the potential-based rewards agent. I'm looking for some guidance on how to interpret that learning curve? It looks like its taking big steps at ~12000 and ~22000 epochs, and it's ki... |
Does StatsModels' power.tt_ind_solve_power (link) assume a single standard deviation despite two different means? I think so. Why is this a reasonable assumption?
I come from a primarily Bayesian background, so if I wanted to pool variances, I'd probably draw $\sigma_1$ and $\sigma_2$ from the same prior distribution.
... |
So I have been given a linear model, with the Beta0 = 0 as well as given equations. I have done several calculations needed in order to calculate residuals, as shown in my work below:
I also went ahead and calculated the normal equations as well:
From here, I have been tasked with calculating the residuals and then i... |
As a complete beginner in the world of Bayesian statistics, I unfortunately have no idea of how to start this problem.
I am given that our data is distributed in: $x_n|(\mu,\sigma^2)$ ~ $N(\mu,\sigma^2)$. Using this, we are also given that the priors are respectively $\mu$ ~ $N(\mu_0,\sigma^2_0)$ and $\sigma^2$ ~ $Gamm... |
(this question I originally posted in stack overflow)
I want to know if I am interpreting the factor() function in R correctly. Suppose I have a variable with 10 levels let's say these are the different exposures of a study plan. I make it a factor using either factor() or as.factor(). When seeing the summary of my lm(... |
I have a dataset of observations at multiple sites repeated within and at multiple times. I need to test for spatial autocorrelation in the residuals of my model, which I have used time as a fixed effect for.
Do I use means per site of my actual residuals extracted from the model for a Moran's Index test by the ape pac... |
I am analyzing data on polar bears and trying to figure out if different variables influence their movement. My data has a mix of categorical (e.g. bear ID number) and numerical variables (e.g. bear age)
For my analysis, I was thinking of doing a model in a format like this:
Movement = x1*(year) + x2*(length of ice... |
I would like to compare the proportion of people using a facility who are female with the proportion of people who live in the area that are female. The goal is to determine if women are over or underrepresented among facility users for some reason.
Since there are many people who both live in the area and use the faci... |
hello i want to know when i have to calculate mape rmse before this code
predictions1 =scaler.inverse_transform(predictions)or after it. because the result is different in two propositionsthat's it what i m doing :predictions = gru_model.predict(X_test)print("Mean Absolute Error - mape : " + str(mape...(y_test, predic... |
I noticed this in the source I was referring to:
In classification problems,
The data should be independent and exchangeable within each class.
Across classes, the data must not be independent.
Otherwise, the data would not contain information about which class it is in.
The data must be conditionally independent when... |
Doing exercise on Bioequivalence Study, taking data from here.
Model defined as $\log Y_{i,j,k} = \mu + s_{i,k} + \pi_j + \tau_{[i=j]} + \lambda_{[j=2]\cdot(1+[i=1])} + \varepsilon_{i,j,k}$, where $\mu$ is common mean, $s_{i,k}$ is influence of test's subject k from $i$ group, $\tau_1$ - influence of drug X; $\tau_0$ -... |
The statsmodels result is consistently higher by 2. This is using lme4 (R) and MixedLm (Python).
|
The problem that bugs me can be boiled down to: "What is population? (Really)." This is my thought experiment I've dealing with for a few days.
There is a researcher A, who gathers data from $N = 20$ observations on some variable. He gets $\bar{x_A} = 17.21$. He thinks that he can't measure all the population, 'cause "... |
I was reading about active learning recently and active learning seems to be used after the first model is generated. So, I was wandering if there are technics to choose what to label before generating the first model. I have here a text dataset with more than 1 million sentences. I want to create a binary classificati... |
A colleague of mine thinks that the constant in a multivariate regression is equal to the mean of the independent variable, usually denoted by $\bar{y}$. I disagree with my colleague, yet I somehow fail to show the opposite. I tried to prove my argument via the Frisch–Waugh–Lovell (FWL) theorem. However, I somehow get ... |
I want a marginal model, ideally fit via GLS. But the normality of residuals doesn't hold. It isn't much skewed, I don't want any transformations. It's just non-normal in shape. Yet still reporting means for that case is meaningful. The GEE estimation doesn't worry about that. Would you advice me to report rather GLS w... |
Suppose $X_1,X_2,\ldots,X_n$ are i.i.d $N(0,1)$ random variables. For $2\le m<n$, let $S_m^2=\sum_{i=1}^m(X_i-\overline X_m)^2$ and $S_n^2=\sum_{i=1}^n(X_i-\overline X_n)^2$ where $\overline X_m=\frac1m\sum_{i=1}^m X_i$ and $\overline X_n=\frac1n\sum_{i=1}^n X_i$. I am trying to prove that $T=S_n^2-S_m^2 \sim \chi^2_{... |
I have a 2x2 between-subjects design consisting of Gender (Male, Female), and Relationship status (Married, Single). The DV is completion of a certain behaviour (Yes, No). I plan to use SPSS. I plan to do a factorial ANOVA on this design and then I also have one scale (which I will use to complete separate mediation an... |
I encountered a statistics problem that seems basic and I feel that I am being tripped by the graph of part c). Since part c) is the only part I feel I need help with, I will only mention what I got for parts a,b, and c.
Here's the wording of the problem:
Suppose that $(X,Y)$ is a continuous bivariate random vector wit... |
What is the best way to get the R2 values from linear mixed effects models?
I also saw this post before posting this: https://stackoverflow.com/questions/45327217/r-squared-of-lmer-model-fit. However, this post made me concerned about using Nakagawa & Schielzeth's (2013) R2glmm method link: (https://stackoverflow.com/q... |
I have the following model:
lifecomp_pacc3_apoe <- lmer(z_pacc3_ds ~
ls_composite*APOE_score*AgeAtVisit + CESDTotal + famhist +
ls_composite*I(AgeAtVisit^2)*APOE_score + BMI +
std_PRS_Kunkle*AgeAtVisit + std_PRS_Kunkle*I(AgeAtVisit^2) +
gender + EdYears_Coded_Max20 + VisNo + X1+X2+X3+X4+X5 +
(1 |family/... |
I split the data 80/20 as follows:
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
Then, I cross validate a decision tree as follows:
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import cross_validate
tree_cl... |
I referred to https://github.com/senya-ashukha/quantile-regression-dqn-pytorch/blob/master/qr-dqn-solution-cool.ipynb
I have no problem solving CartPole problem when using the basic Linear network as follows:
def __init__(self, int_states, int_actions, int_quants):
nn.Module.__init__(self)
self.int... |
I am doing a study where I am trying to model how different factors affect polar bear movement. I would like to conduct model selection using AIC. So far, I believe I have two options:
1) Put every variable I am studying into one giant model, and then conduct step-wise model selection. What I would design would be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.