instruction
stringlengths
9
38.7k
I have performed chained multiple imputation in Stata and performed 2 robustness checks to compare distribution of the original and imputed values Visual exploration Kolmogorov-Smirnov test of equality of distributions Visual exploration is I notice that whereas the mean of the distributions are similar (dotted green ...
I am new to MCMC. I am trying to use Metropolis-Hastings MCMC to update a parameter set for a model based on measurements. But the posterior I got seems to be little bit wired as the std values for several parameters are nearly 0. What could be possible reasons for this? Any comments would be much appreciated. Thanks f...
I have a panel data set consisting of a treatment and a control group. The control group contains much more observations than the treatment group. In order to adjust some specific Variables between both groups, I generated weights using entropy balancing in Stata. Now, I am about to find the right model to estimate the...
I am having some trouble with the literature on the correct model specification for my question. Here is the setup: I have a multilevel model with a variety of variables at level 1 and a single level 2 variable. I am examining interactions between both level 1 variables and cross interactions between the level 2 variab...
I am running a repeated measures ANOVA for my data set. Our rats completed 8 training sessions in 2 conditions (within-subjects; 16 sessions total). Then they completed a test - the same test in each condition (2 tests). The test was not significant between conditions. So we ran three additional training sessions, thin...
Let's say I have a model of count data as a function of the month of the year along with an additive effect of season (factor with 2 levels Wet and Dry which correspond to Jan - June and July to Dec respectively). count ~ month + season My regression will give some main effect estimates for the two parameters. Let's s...
I am training a neural network (VGG16) on some image data for an image classification task. Each image has a “number of clicks” and a “number of views” feature. From these features, I’m defining a binary label as a threshold value on clicks/views. The issue is that not all images have been viewed the same number of tim...
When applying the lm function as follows (the assumptions were not considered. The purpose of this example is just to make my question clear) : library(carData) model1 = lm(data = carData::Salaries,salary~sex+yrs.service+yrs.since.phd) and comparing it with the model created with the function caret::train() (method ...
I am using Stata 17.0 MB and working on a dataset of Enterococci bacteria infections in the previous ten years (2012–2021). These bacteria have more dangerous subtypes resistant to one antibiotic (vancomycin; hence called VRE). I want to test whether there is a significant trend in the incidence rate of these subtypes ...
In this question it has been described how to generate a random variable with a defined correlation to an existing variable. My question is what happens if I want to have a specific pattern of correlation, meaning having a copula connecting the two variables. For example if the two variables are normally distributed th...
I have a zero inflated count data, on which I have run a poisson and quasi poisson reg using glm(). The output from a poisson model is as follows: Call: glm(formula = sum_count ~ location * treatment, family = poisson, data = dat) Deviance Residuals: Min 1Q Median 3Q Max -32.297 -21.360...
At a recent conference somebody claimed that the size of the bootstrap replications should always be 999 rather than 1000. Which argument supports this claim?
I'm trying to understand the differences between the update rule for stochastic gradient ascent and descent. I've read some articles and still don't understand how to calculate the update rule: Gradient Descent: $\frac{∂NLL(θ)}{∂θ_j} = (hθ(x(i))-y(i))x(i)$ So the update rule uses a minus sign because we want to minimiz...
When we train models, often we use the log of outputs in $(0,1)$ in our cost functions. Does anyone have a source that explains if this improves training? For example, supposed the cost is $f(\theta)=\sum_i{\delta_{y_i=1}\log\hat{y}_i}$. I think I read somewhere that stretching $(0,1)$ to $(-\infty,0)$ helps learning. ...
Take a simple example of performing two independent linear regressions on a set of x-y data, in the form of y = mx + b, each using half of the data. I will obtain two separate estimates for m1, b1, m2, and b2. I could then obtain how confident I am in estimating each of the parameters. I wish to find the global m and b...
I've made two studies on clinical data that correlates with a disease. The clinical data can be aggregated into a score, such that the higher the score the higher your % of having the disease. However, I'd like to optimize this data to figure out if one clinical symptom may be more important than another and should rec...
I assume this is a very simple question, however I am not sure about it. I have a regression table in front of me that contains the coefficients of a linear regression. The dependent variable is scaled metrically, the independent variable of interest is an index limited from 0 to 1. If I want to interpret the influence...
If I am looking at the impact of different tariffs in different months on exports, can anyone tell me if this would be the correct difference in differences model? Or would it be
Good evening, I'm having some trouble understanding how the penalty matrix in penalized splines is set up if the error term has a stationary process. Say I have $y=X\beta+ \epsilon$ with $\epsilon \sim AR(1)$ and $cov(\epsilon)=R$ which is a variance-covariance matrix. Then the minimization of the penalized spline regr...
I am having trouble identifying the correct statistical method for the following problem: I have data on a characteristic (e.g. body length) from several individuals per species, distributed in an altitudinal gradient. Just looking at the data, I can see that for most species body length gets bigger with altitude (alas...
It's well known the Kaplan-Meier curve is a univariate time-to-event summary plot. If you want to show differences between groups, you can make a KM curve for each group. In addition you can calculate the p value from a log rank test or a Cox model adjusting for that variable categorically. It's understood that the tes...
Let $x$ be $n$ dimensionally multivariate normally distributed with mean $\mu$ and covariance matrix $\Sigma$. Now let $y$ be random variables defined by \begin{equation} y_i= \begin{cases} 0, & x_i\leq 0 \\ x_i, & x_i>0 \end{cases} \end{equation} What is the mean and covariance matrix of $y$? Can we ...
I am an MBA student taking courses in statistics. Our statistics professor was telling us a story about statistics being used to estimate the employment rate in some country. According to the professor, some researchers in this country conducted a census survey across the country. The people in this country were sample...
As the title says I am looking for an R or python package which can calculate wasserstein distance (aka earthmovers distance between) two lists (vectors) of sampled values from a negative binomial distribution? Relevant publication: Barbour, A. D., Gan, H. L., & Xia, A. (2015). Stein factors for negative binomial appro...
I'm testing out an algorithm for the lasso. That is, the problem is to find the $\beta$ which solves the following: $$\min\frac{1}{2} \left\| y-X\beta\right\|_2^2 + \lambda \|\beta\|_1$$ How can I verify that the $\beta$ I find with my algorithm is the minimum? A few ideas I had: I could try several values of $\beta$ ...
I have a bunch of data points (about 300 samples in total), each sample is a number from 1 to 3 (from {1, 2, 3}). These numbers are supposed to come from a survey. Are there any statistical methods to determine whether these sample are generated by human graders, or are they machine generated?
I have used keras.preprocessing text tokenizer to fit on the training data alone, computed the (train) vocab size 'input_dim' and maximum train sequence length 'input_length' before fitting my neural network model with an embedding layer(input_dim, output_dim, input_length). When I try to process the test data and pred...
For each iteration of the MH, sample $x'=q(x|x')$, then the acceptance probability is computed:$$A=\min(1,a)$$ where $$ \alpha=\frac{p(x')q(x|x')}{p(x)q(x'|x)} $$ Now, I've seen that the algorithm samples from a uniform distribution $$ u\sim U(0,1) $$to set the new sample as$$ x=x' $$if $u≤A$, retain $x=x$ otherwise. ...
OLS estimation assumes that the explanatory variables are independent in the linear regression model. There isn't such assumption when using the MLE estimation. So, my question is, can we use MLE to estimate the parameters in a linear regression model when the explanatory variables exhibit some sort of correlation? Tha...
Suppose the penalized spline given by equation $$ \hat{x}=(W+\lambda_{1}D^{T}D+2\lambda_{2})^{-1}\left[Wy+\lambda_{2}(A+B)\right], $$ where $\lambda_{1},\lambda_{2}$ are positive constants and $A,B$ are linear constraints. My questions: How to construct the hat matrix for this formula? Is there any kind of ``generaliz...
In a finance textbook of mine, there is an equation for calculating the variance $\sigma^2$ of a portfolio of two risky assets (i.e. random variables) $X$ and $Y$ by considering the correlation $\rho$ of the assets. I do not know if this equation is generalized, and no derivation is provided. The textbook equation: $\s...
Imagine a clinical trial setting where we have binary outcome Y and we are interested in the effects of treatment X. Lets say we also have additional explanatory covariates Z and W. Thus our logistic regression model is: $$ p_i = Logistic( \mu + X_i + W_i + Z_i ) $$ What's confusing me is that in simulations where y...
I need to proof a corollary of Hoeffding's inequality, and since I'm not used to doing proofs I really don't know where to begin. Hoeffding's inequality: Let $X_1,...,X_n$ be independent real-valued random variables, such that for each $i \in \{1,...,n\}$ there exists $a_i\leq b_i$, such that $X_i \in [a_i, b_i]$. Then...
For example if I have three different samples of red blood cells, and I created a frequency distribution of the red blood cell size for each sample how would I run ANOVA to compare the differences between each frequency distribution?
I'm computing the power of a statistical test using Monte Carlo simulation. My test statistic is asymptotically $\chi^2$ under the null hypothesis. When I am computing the power for a given iteration of my simulation, I use the $\chi^2$ distribution to see whether I should reject in that iteration even though the test ...
As the questions specifies, I am looking for the main assumptions of the ordinal logistic regression and what tests should I run in stata to make sure they are okay
I'm reading about Robust Standard Error Estimators for Panel Models from the developer of plm R package (Millo, 2017: 21). But my question is not about software. In the example I see that some heteroscedasticity robust standard errors are in fact less than those in benchmark OLS. I thought that we normaly expected robu...
There are many questions and answers on why $n-1$ is used instead of $n$ in sample vs population variance. However, I wonder why the population variance definition even has $n$ in the first place. The definition is given as $$\sigma^2 = \frac{\sum_{i=1}^n(x_i - \mu)^2}{n}.$$ What is the intuitive purpose of the $n$? Is...
I was calculating effect sizes for an analysis and noticed by chance that Pearson's $r$ calculated from Cohen's $d$ with a conversion formula is not the same as when I calculate the correlation given the raw data. Does anyone have an idea why it is like this? I've tried with random numbers several times and the two $r$...
I'm solving a linear regression problem. In a textbook that I follow, the author says that directly computing the OLS vector: $\beta = (X^TX)^{-1}X^T y$ can lead to problems when $(X^TX)$ is singular or ill-conditioned. Therefore, solving for $\beta$ via SVD is recommended. If I understand correctly, the problem with i...
I am an MBA student that is taking courses in statistics. Yesterday, I attended a statistics seminar in which some graduate students presented their research on some psychology experiments (e.g. response of mice to some stimulus). The students presented some theory behind the models they used - in particular, they show...
The motivation of this question is learn what to look for in deciding whether observational data can be used for causal inference (in the sense of Pearl). Wikipedia describes a natural experiment: A natural experiment is an empirical study in which individuals (or clusters of individuals) are exposed to the experiment...
When we compute a Ridge regression model, do we need to compute the intercept separately from the slopes? As you know, the estimated $\beta$ for the ridge regression model is given by: $\hat \beta = (X^TX - \lambda I_n)^{-1} X^T y$ But this formula is only for the slope parameters, excluding the intercept. I'm just ope...
Is variable normalization necessary in Ridge regression (for both X and y)? If so, what happens (mathematically) if we don't do it?
I'm calculating the Fleiss Kappa for inter-rater and intra-rater reliability. I have 3 raters and they rated 10 types of forests as 'tropical', 'temperate' or 'boreal'. This is done twice with the same 3 raters and same 10 forests, once in January and once in February. I'm using SPSS > Analyze > Scale > Reliability ana...
I have the following regression $$y = X\beta +u$$ where $y$ and $u$ are $(n\times 1)$ and $X$ is a fixed $(n \times k)$ matrix with full column rank and $\beta$ is an unknown $(k\times 1)$ vector of parameters. $E(u)=0$ and $var(u)=\sigma^2 V$ with $(n\times n) $ symmetric and positive definite non-diagonal matrix $V$....
In the scikit-learn library, Ridge class, there is a note that reads: "Regularization improves the conditioning of the problem and reduces the variance of the estimates." Given the expression of beta for ridge regression: $\beta = (X^T X + \lambda I_d)^{-1} X^T y$ How does the addition of $\lambda I_d$ to the moments m...
I would appreciate help with understanding why I get two different answers when I calculate MSEP (mean square error prediction) in two different ways using R, both for simple linear regression and multilinear regression. Background: I am working on a task where I have to carry out both simple linear and multilinear reg...
I was wondering if anyone could help me understand resampling for class imbalance. From what I have learned, class imbalance is usually a small data problem where the less prevalent class usually cannot be observed enough to really help inform a model to separate it. If the number of observations were sufficiently larg...
When I run this code to plot standardized residuals for a standard logistic regression: #### Standarized Residuals Fixed Model #### model.data <- augment(normal.model) %>% mutate(index = 1:n()) model.data %>% top_n(3,.cooksd) ggplot(model.data, aes(index, .std.resid)) + geom_point(aes(color ...
I am using Tobit regression approach to build a prediction model with a dependent variable censored at 0 and 1. Several R packages provide nice functions to train a Tobit model, such as censReg, vglm, AER::tobt, etc. I also searched up on the Internet on how to calculate predicted values of a Tobit regression model (be...
(Fair warning: I am not a statistician.) Let's say I run a bunch of trials. My (possibly) dependent variable is binary; my independent variable is continuous. For the sake of example, say each trial is {pass/fail, temperature}. Is there a relatively straightforward way to determine if pass rate is not associated with t...
Our response variable is something like Sales which should be very large(Mean at the million level), and one predictor is also numeric but with mean at ten thousand level. The other predictors are all dummy variables. From my perspective, there are too many dummy variables which mean linear model will not perform well ...
I am attempting to show that QDA implies a logistic regression model of the form $\log(\frac{P(Y=1 \mid X = x)}{1-P(Y=1 \mid X = x)}) = \beta_0 + \beta_1x + \beta_2x^2$, where there is only one covariate x Let $P(Y=1 \mid X = x) = p_1(x) = \frac{\cfrac{\pi_1}{\sqrt{2\pi\sigma_1}}exp(\cfrac{-(x-\mu_1)^2}{2\sigma_1^2})}{...
Suppose I define a custom loss function SpectralEntropy as follows: class SpectralEntropy(tf.keras.losses.Loss): def call(self, y_true, y_pred): result = y_true - y_pred result = tf.signal.rfft(result) result = tf.abs(result) result = tf.math.pow(result, 2) result = result /...
Given a categorical random variable $X = \{x_1,x_2,...,x_k\}$ with corresponding probabilities of each outcome $P = \{p_1, p_2,...,p_k\}$ (i.e. a multinomial): What are the most likely counts of outcomes aftern $N$ trials? Let's call the vector of counts after $N$ trials a state: $C_N = \{c_1^N, c_2^N,...,c_k^N\}$. Wh...
We are currently adding some basic functionality for directional statistics to SciPy. Directional statistics refer to data whose magnitude does not matter such as unit vectors. While implementing the directional variance, we noticed that there are competing definitions in literature. We would like some more opinions ab...
The background is that I have data and a number of independent variables. For each variable I want to ascertain the probability that the distribution of that variable's values is random for that data. For example, suppose I have a variable X, and I have a distribution of the possible values of X like this: X=1 : 5 even...
I have two ratios of four independent Poisson variables $R_1=\frac{\large Po(\mu_1)}{\large Po(\gamma_1)}, R_2=\frac{\large Po(\mu_2)}{\large Po(\gamma_2)}$. The Poisson variables are tallies, they are the cardinalities of four sets. $Set_1$ has $\mu_1$ elements, so it's cardinality, $\mu_1$, being a count, it's suppos...
In my experiment I had a treatment gradient with 3 levels. Where level 1 was assumed to be most toxic, level 2 less and level 3 even less. I used CoxPH in R and set level 3 as the reference treatment. Here arises the problem for me, I also want to compare level 3 with the other two levels and not just set the HR to 1....
I am trying to learn mixed models using lmer function and I am able to use it. But I am not able to understand what is going on in the backend like how it is taking care of fixed effects and random effects and the statistics behind it. All the source which I referred only goes through the syntax and not the backend pro...
I was looking at the Naive Bayes classifier models (Binomial, Multinomial and Gaussian) and trying to understand the theory behind them a bit better, but am unsure if I understand the MLE approach correctly and use the correct terminology. Let's use C for Class and W for word. Then the Bayes Theorem looks like this: $p...
I've come across a phenomenon from a simulation that I'm very curious about. But I don't know how to start my analysis. So, I am asking for some guidance. Thanks! Denote by $\mathbf{H}$ the principal submatrices (of order $K$) of projection matrix $\mathbf{P} = \mathbf{X} (\mathbf{X}^T \mathbf{X})^{-1} \mathbf{X}^T$. ...
I am trying to understand why changing the reference level of a factor changes the results of a model. Consider this example: library(liver) library(caret) library(glmnet) library(dplyr) data(churn) head(churn) # set reference levels churn$state <- relevel(churn$state, ref = "NE") churn$area.code <- relevel(churn$are...
In a paper I read, they are using a NN to estimate the heteroscedastic variance in a regression scenario (actually a bit more complicated than this, but irrelevant to the question). After they fit 1 NN for the mean, they use another NN $g_{w'}$ optimized by the squared error loss (with weights, and regularization): $$ ...
I'm studying BRML. In this book, a Dirichlet distribution is defined as $$ p(\alpha | u) = \frac{\Gamma(\sum_{q=1}^Q u_q)}{\prod_{q=1}^Q \Gamma(u_q)} \delta_0 \left( \sum_{q=1}^{Q} \alpha_q - 1 \right) \prod_{q=1}^{Q} \alpha_q^{u_q - 1} \mathbb{I}[\alpha_q \geq 0], $$ where $\delta$ is Dirac's delta, and Exercise 8.7 i...
I have understood the backpropagation algorithm along with the chain rule well enough that I can derive it on my own, but I don't understand where the elementwise multiplication came from and how does it affect the final result. When I derived it, I didn't consider it as elementwise multiplication, this is where I migh...
patients are randomızed to elther treatment, their pressures are measured at baseline, treatment is administered for two weeks and $\mathrm{BP}$ is then measured a second time. The treatment effect is estimated by the average change in $\mathrm{BP}$ for group A minus the average change for group $\mathrm{B}$. Suppos...
I have a problem building my lmer formula to perform an analysis. I have two groups (healthy subject and patient) and numeric values in different brain regions (8 regions of interest) with a total of 63 subjects. I want to know the difference in these brain values between healthy subjects and patients for all of the re...
I have a question regarding the ADF test. I ran a ADF test with drift with the urca library in R. The result implies a stationary series with drift, which is not possible to my understanding. How to interpret this result? Also what should be done if the first hypothesis (unit root) is rejected implying no unit root, bu...
So I'm considering a simple linear regression model with $p = 1$ predictor $$y = \beta x + \epsilon$$ where $\epsilon \sim N(0,\sigma^2)$. I want to use a generalised beta distribution of the second kind(GB2) as a prior for $\beta$ and an inverse gamma distribution for $\sigma^2$, and then sample from the posterior dis...
I am very much not statistics minded and could really do with some help figuring out what statistical test I should be using here: My premise is: Activity X can lead to outcome Y which in turn can lead to outcome Z. I want to look at whether Activity X leads to outcome Y and also whether that then leads to outcome Z un...
I went through this website https://www.displayr.com/goodness-of-fit-in-mds-and-t-sne-with-shepard-diagrams/ for shepard diagram. Right now I have a 20 dimensional data with 85 samples, I used some dimension reduction methods to get a 2*85 data. And I want to use shepard diagram to assess goodness-of-fit of my dimensio...
I have modeled a basic panel data regression model under fixed effects in Stata. Specifications and results are clear. But, now I want to write down the model in lets say general formation. I spent hours searching for an example, but all models are following a different syntax, I guess. So lets suppose, I have the foll...
I am working on a causal model using EconMl and this article as a starting point: https://towardsdatascience.com/causal-machine-learning-for-econometrics-causal-forests-5ab3aec825a7. In the visualization below (at the end of this article), a CATE confidence interval is shown to showcase the model performance. However, ...
I have an imbalanced data set. My goal is to balance sensitivity and specificity via the confusion matrix. I used glmnet in r with class weights. The model does well at balancing the sensitivity/specificity, but I looked at the calibration plot, and the probabilities are not well calibrated. I have read about calibrati...
I feel like I have been having a very dumb week trying to solve/research this problem and that I am missing an easy solution or that it is not possible. Given an equilibrium distribution (say from a Continuous time Markov chain) and the number of states is known, is it possible to find the transition rates/infinitesima...
I have a repeated measures dataset with multiple plants measured every month. My DV is growth, IVs are treatment and precipitation. Since I have measured by month, growth in my data has a high proportion of zeros for each measurement session, and is closer to a gamma distribution. I'm running a lmer and glmmTMB. modell...
Let R be the space of all the N! permutations of (1,2, ..., N), and let R = (R1,...RN) be uniformly distributed over R. The thing i don't understand is what "R = (R1,...RN) be uniformly distributed over R." mean
I'm working on a project regarding removing contamination from a 1D signal and I'm running into odd problems. The Dataset I construct the training set myself by taking 1D "pure" signals from one database, and collecting other "contaminant" signals from a different database. I make a contaminated signal by adding on a "...
I am looking at this post How to find the perplexity of a corpus. I understand the whole post, but the probability of a sentence appear in a corpus, in a unigram model, is given by p(s)=∏ni=1p(wi), where p(wi) is the probability of the word wi occurs. For a large corpus, even if I only calculate the probability of a ...
I have a list of items and ratings from 0 to 10, with decimal ratings so that possible ratings are 0, 0.5, 1, 1.5 ... 9.5, 10. I am using https://www.evanmiller.org/ranking-items-with-star-ratings.html, but that considers ratings from 1 to K. How do I modify it to consider 0 rating for items.
I have the following example data, where each row is an independent observation: A B C Y 10 22 6 2 4 60 2 0 12 8 10 3 ... $A$, $B$, $C$ and $Y$ are all positive integers. The variables $A$, $B$ and $C$ represent the number of samples from a corresponding Bernoulli distribution: $\textrm{Bernoulli}(...
Background Circular correlation is given by: $$R_{\operatorname{circular}} \triangleq \frac{\sum_{i=1}^m \sin (x_i - \bar x) \sin (y_i - \bar y)}{\sqrt{\sum_{i=1}^m \sin (x_i - \bar x)^2} \sqrt{\sum_{i=1}^m \sin (y_i - \bar y)^2}}$$ Example 1 I generated a data set with a circular correlation of 1.0000 and it looked li...
I would simply like to compare the frequency of two variables that come from the same sample. The variable longgain has the value 1 if a gain in the portfolio of an investor is held for longer than 200 days whereas the variable longloss has the value 1 if a loss is held for longer than 200 days. My hypothesis is: There...
I have question regarding kaplan meier curve to compare two curve I have Event variable ( which the patient have relapse or not ) the total number is 51 we have 16 events ( relapse ) and 35 censored . and when I run the kaplan meier : progression free survival analysis which is = 49% by the end of period of our observa...
My understanding of the Central Limit Theorem is that the distribution of the sample mean will tend towards normal, for random sampling with replacement. How reasonable is it for me to infer that if I have a bunch of samples but don't know if the underlying population is the same, a high skewness value is (perhaps circ...
I have a high imbalanced dataset and I fitted a logistic regression model on it. The calibration curve is: As you can see there is poor calibration after 50. Is the model bad or the problem is the unbalanced dataset? Can I do anything to fix this?
I am looking for blogs that focus on the mathematical theory of Statistics and Machine Learning, ideally at a research or "advanced" level. The blog doesn't have to be solely about these topics but ideally most of the posts would be exposing the mathematical theory of an idea/concept/algorithm that is either directly ...
I have question , If I want to investigate the effects of Factors on the overall survival and progression free survival which the best way to do that by using the log rank or cox regression ( univariable or multivariate) ? and why ? our study is retrospective data for patient with cancer they treated with chemo+ radio...
Inspired by the question regarding Bessel's correction, I wonder whether there is a general rule regarding applicability of maximum likelihood for parameter estimation. My guess is that the parameters estimated by maximising the likelihood in linear regression are optimal because they are independent. It seems intuitiv...
As I said in title, I don't understand why use the neuralnet package to create a regression model will produce different result at each time. The different results means each time, without modifying any codes, using the neuralnet will produce different predictions that I care. Ex: Assuming I am using nn = neuralnet(Y ~...
How can I transform the following dataset to a more linear representation? R code: x <- 1:20 y <- c(101, 84, 81, 80, 73, 69, 67, 63, 63, 62, 62, 61, 61, 60, 59, 58, 57, 57, 57, 55) d <- data.frame(x, y) ggplot(d, aes(x, y)) + geom_point() Here is a log version, almost no change: ggplot(d, aes(x, log(y))) + geom_poin...
Assume I have the below dataset, features M and N are numerical, label is binary. M N Label 2 3 y 6 1 y 1 12 y 3 9 y 11 15 n 7 13 n 4 8 n 9 10 n My decision tree with binary split only has 1 root node and 2 leaf nodes (no internal node) I can use M or N to make a split. What is the size(cardin...
Hi everybody, I have a question related to some analysis I need to do for a paper. For my dependent variable, I want to measure fruit and vegetable consumption. In the questionnaire that I use fruit and vegetable consumption is asked separately, respondent's have indicated on two questions how often they consume fruit ...
I have an AB test with a target variable (Y), M user features and N other features. The user features can be binary, multilevel or continuous. As an example, we can say that the target variable is the number of purchases following an email marketing campaign. The treatment is here "being sent an email" and the control ...
I am curious on how to replicate the results of a Cox model estimated in Stata in R. I get completely different results, and I think I understand why (but I am unsure of how to fix it), but before I discuss that, I will present a glimpse of the data I am working with along with the simplified syntax to illustrate my pr...
Currently I am analyzing a dataset using logistic regression, I ran it in R using the glm function to run a multivariate logistic regression with 12 predictors. Some of these are quite collinear as they resulted from feature engineering. I was thus not really surprised that my algorithm did not converge and turned out ...
Intuitively, it seems obvious, but I am struggling to prove it for the case where $X_1, ..., X_n$ are continuous random variables. I am aware that $E[c(X)|X]=c(X)$. So how would one show that $E[c(X_i) |X_1, ..., X_n] = c(X_i)$ and that $E[c(X_i)+a(X_j)|X_1, ..., X_n] = c(X_i) + a(X_j)$ for $i,j=1, ..., n$?
After going over this post about reward shaping, I still find it difficult to define it w.r.t to my specific problem. Suppose that I measure some state $s=\phi$, which is some angle. I also use actions $a=\tau$ that are motor torques. For example, given the state $\phi_0$, I would like to apply torque $\tau_0$, which w...