instruction
stringlengths
9
38.7k
I have a dataset containing 400 variables (chemical compounds, amount classes) with values 0,1,2, or 3 and 50 entries (species). Can I use hierarchical cluster analysis to get a dendrogram that shows similarities between different entries? There are a lot of 0's, about 80 % or more, in the dataset. Which package in R...
We designed a study manipulating two factors: one factor (FACTOR1) has 2 levels (A,B), the second factor (FACTOR2) has three levels (C,D,E) . Because in psychology we often have to carry out unreasonably time-consuming experiments we planned to split the experiment (3by2) in two experiments (2by2) in which participants...
I have used rstanarm GLM model without the intercept like below in R GLM_Model <- stan_glm(formula = output ~ X1 +X2+X3 +X4 +X5 +X6 +X7 +X8 +X9 +X10 + Y1 +Y2+Y3 +Y4 +Y5 +Y6 +Y7 +Y8 +Y9 +Y10 + Z1 +Z2+Z3 +Z4 +Z5 +Z6 +Z7 +Z8 +Z9 + Z10 + 0 , data =...
Robust PCA (as developed by Candes et al 2009 or better yet Netrepalli et al 2014) is a popular method for multivariate outlier detection, but Mahalanobis distance can also be used for outlier detection given a robust, regularized estimate of the covariance matrix. I'm curious about the (dis)advantages of using one met...
I am helping a colleague with some multi-level analyses and am getting stuck on how to set the model up and could use some advice. Students were classified as belonging to either "TD" or "SL" group ("Group"). They then completed 4 different conditions where they had to remember and repeat back words from a list or li...
In showing that OLS provides a conditionally unbiased estimate of error variance, namely that $\operatorname{E}(\hat{\sigma}|X) = \sigma$, where $$Y = X\beta + \epsilon, \quad \epsilon_i \in N(0, \sigma^2)$$ you get the terms $\operatorname{E}(\epsilon_i \epsilon_j | X)$ in a summation which are suppose to disappear un...
I am writing a support vector machine with 1-norm soft margins in Python, using the quadprog quadratic programming package. As far as I can tell, by using the Gaussian kernel I should be guaranteed a positive definite Gram matrix, but when I pass my Gram matrix (here, labeled "H") into quadprog it is telling me that it...
I thought that since the conjugate prior of Poisson distribution is gamma, we needed to use that when assigning prior distributions to the beta coefficient. MCMCpack and rstanarm both specify a multivariate normal distribution. Can someone explain the reasoning behind that?
I have some time series data represented by a collection of curves, as shown in the following diagram, I want to determine the mean and covariance over time of this collection of curves. I don't know where to start, any guidance would be appreciated!
my issue is this: I'm trying to find the proof for a famous therorem I've been told during a lecture at the university. This are our guest stars: $X_n \sim N(0,1)$ is a vector of iid random variables; $A,B$ are two $mxn$ matrix $ AB'=0$ We want to proof that $AX$ and $BX$ are two indipendent normal vector. We know th...
I am new to PCA and am having trouble understanding some parts of the methodology. In multi-factor models you can run regressions like: Stock Return = A(1)*Size + A(2)*Market Return + ... So in this case, you have a clear understanding of what is driving the stocks return. Now, when you have a system of say 100 stocks...
For a univariate real-valued random variable I am pretty sure that the converse holds. Consider a multivariate $\mathbf X$ with values in $\mathbb R^n$ with measure $\mu(X)$ and its multivariate CDF is: $$F_X(a_0,\dots, a_n) = \int_{-\infty}^{a_0} \dots \int_{-\infty}^{a_n} \mu(d\mathbf x)$$ , then the univariate ran...
Below are the sequential steps/question regarding my problem: I am attempting to specify a VAR model in order to analyze impulse response functions. In plotting my first variable (Figure 1) I expected the seasonality because of the monthly frequency. However, the stability of the trend surprised me. I included the fitt...
I get that for z > 0 , the gradient of the ReLU function is 1 , hence the gradient descent algorithm can proceed faster. But what happens if z < 0? How would the gradient descent algorithm proceed then?
Is it standard operating procedure to preprocess features using feature standardization --- $x' = (x-\mu)/\sigma$ --- before training a neural net that implements batch normalization? My intuition says yes definitely do this, normalization across the entire training set is different from normalization across a batch, b...
I am assisting in the creation of a churn classification model and would like to use a random forest as it is a model that I understand fairly well. I have prepared a large dataset (~600,000 observations) which includes a fairly balanced distribution of active and churned customer records. I have already run a random f...
I want to estimate a monthly released financial value between 0 and 150. To do so, I have lots of daily stock data. What would be a good way to use the information of the temporal evolution in my regression? I obviously could compute the average of all days in a month, but I would lose a lot of information. Lets say I'...
I read that an RNN given a lot of text to read can learn to generate text which matches brackets (....) {...} [...] etc. How does the RNN "know" that it has to close a bracket? Or is this just a fluke that we're reading too much into? Where does it store the "state" that the bracket has been opened and so needs closing...
Our data is n=4 and we are looking to test whether it is > 0. We use one-sided Wilcoxon signed rank test because it is non-parametric and apparently should handle low sample size better. Using MATLAB: >> data ans = 0.0709 0.0366 0.1228 0.0775 >> p = signrank(data,0,'tail','right') p = 0.0625 One-sided t-test...
I have the following linear equation: Dummy dependent variable = dummy main independent variable + control variable 1, absolute value of changes (also between 0 and 1) + control variable 2, sigma (also between 0 and 1) I want to know how to exactly write the logit and probit regression equations in a formal academic co...
I'm currently trying to understand this paper https://arxiv.org/abs/1707.01926 The author defines convolution on a graph (p.5) and later constructs Graph Convolutional Gated Recurrent Unit.(p.6) The problem is that author uses graph convolution for h_t-1 when it is only defined for signal on a graph of size equal to a...
This may be too much of a simplistic question: but is it correct to say that it simply doesn't make sense to compute averages/means of data that is fundamentally multimodal? That is, there is not one unique mean/variance? Thanks!
I was given a set of data and was asked to use Stata to perform matching by using propensity scoring method. Since I only learned probit and logit model when facing binary dependent variable in my introductory Econometrics model, I only thought about using probit and logit model to get the propensity score. However, th...
I don't understand what the probabilities for an election actually mean. I was reading this piece but I still don't get it. What could it possibly mean to say that candidate A has 70% chance of winning while candidate B has 30% chance of winning. There is no randomness at any point of the election. Votes are not random...
The kernel trick gets used very heavily in SVMs. And it is impressive: not only can you get the inner product in a larger-dimensional space (including an infinite-dimensional one) that comes from a transform $\phi$ through calculations solely in the lower dimensional space, but you can do it without ever even knowing ...
I have black-box access to some function and I want to compute the derivative about the point X. Is there a method that does this?
A popular textbook on meta-analysis (1) discusses how to convert a correlation, $r$, to Cohen's $d$ (i.e., the standardized mean difference): I became confused about how to interpret the resulting $d$, not knowing what the two "groups" under comparison would correspond to. The derivation that I could find for this for...
I am trying to simulate the compound Poisson process using the next algorithm that I found in a textbook on stochastic processes. Let $S_0 = 0$. Generate i.i.d. exponential random variables $X_1, X_2, \ldots$ Let $S_n=X_1+\cdots + X_n,$ for $n = 1, 2, \ldots$ For each $k = 0, 1, \ldots,$ let $N_t = k,$ for $S_...
A research team studied Y, the percentage of voters in favor of a candidate. The random variable Y had standard deviation o = 50%. A random sample of 800 voters was selected, and their average was y-bar(800) = 52.3%. What is the 95% confidence interval for E(Y)? The answer is: 52.3% +- 3.46%. Can anyone help me figure ...
In a paper: Topics over time, method of moments was applied to estimate $\alpha$ and $\beta$ for a Beta distribution. My question is that how $\alpha$ or $\beta$ should be calculated if there are no samples or just one sample? If there are just one sample, the variance will be zero so that the formula can not be used ...
I'm having some trouble with this problem. The way I'd go about solving it is: $56.2 +- 2.576 * \frac{53.6}{\sqrt5}$ However this does not give me the correct answer which is: $56.2 +- 15.07$. Can some one help me out? EDIT: I worked the problem out with the guidance from below: 56 +- 4.604 * (7.3212/sqrt(5))
I have data which looks like the following, only larger: Frequency Indicators (1) (2) (3) mean 1 4 140 27 2.13 2 5 126 34 2.18 3 40 66 46 2.04 4 5 108 57 2.31 5 2 113 57 2.32 I need to...
I am trying to estimate the next quantity using Monte Carlo method. I have the next well-known quantity called the Crámer-Lundberg risk process, given by the expression $$Y_t=x+ct-Z_t$$ where $Z_t=\displaystyle\sum_{i=0}^{N_t}X_i$ is a compound Poisson process, i.e $X_1,X_2,...$ are independent identically distribute...
This is my first post here - I'm not a statistician by training though I have a machine learning background, so please correct any erroneous usage of statistical terminology if you see any. Currently, I have a (linear) regression problem I'm trying to solve - ~5000 predictors and ~200 examples which is an extremely ill...
Let there be two regressors $x_1$ is binary (i.e., takes on values $0$ and $1$) and $x_2$ is categorical with $3$ categories ($A$, $B$, and $C$). Write $E[y|x_1, x_2]$ as a linear regression. So being a linear regression, then $E[y|x_1, x_2]$ must be linear in $x_1$ and $x_2$. So we can write $E[y|x_1, x_2] = \...
I have read this derivation. $$L(f)\equiv{lng(f|DX)}=nln(f)+(N-n)ln(1-f)+const \;(4.69) $$ expand L(f) in a power series about $\hat{f}$.The first terms as $$L(f) = L(\hat{f}) - \frac{(f-\hat{f})^2}{2\sigma^2}+... \;(4.70)$$ , where $$\sigma^2 \equiv\frac{\hat{f}(1-\hat{f})}{N},\; where \;n = Nf$$ But I can not get tha...
I understand that regression discontinuity determines changes in the fitted line (or coefficient) at the point in a variable which defines whether the person received the treatment/intervention. It has been said that, as such, RD is a form of instrumental variable regression? Does this mean it is a special case of regr...
I am trying to estimate the parameters of an unknown probability density function. The function is binomial; so for every $x$ value, you get some probability of success vs failure. I figure I will perform some type of regression to estimate the parameters based on a group of samples. So, given a previous set of $n$ sam...
Okay so I am having some trouble with this problem. Let's say two variables G and C jointly follow bivariate normal distribution. With G having mean 480 and SD 100 and C having mean 320 and SD 60. Now I can solve problem like P(G < 360) or P(G - C < 400). What I'm having trouble on is P(G = 400). How do I find the prob...
I'm trying to derive a likelihood ratio test for a random sample from a $N(\mu,\sigma^2)$ population ($\mathbf{\theta}=[\mu;\sigma]$ are unknown) and this test: $H_0: \mu=c\sigma, \quad H_1: \mu \neq c\sigma$, where $c$ is a known constant, I'm a little confused how to find the restricted maximum likelihood estimators...
I have data in the following format for transition of people between various places A to B : 100 A to C : 50 B to C : 10 B to A : 2 C to D : 60 and so on I dont have frequencies of complete journeys but only frequencies between 2 places. Now I understand that in Bayes Nets the assumption is that the next step depe...
I am working on forecasting weekly revenue of 10,000 sectors. Applied basic time series models and average RMSE(in thousands) on hold-out set (last 32 weeks) as below. In my view, ma12 and ETS(ANN) models seems reasonable. 1. Please let me know techniques to reduce RMSE. 2. Which other time series models can be trie...
I tried to ask in SO, but they told me to ask here. I have a big dataset like this: RELATION<tab>SENTENCE color<tab>The cat is black color<tab>My dog is white place<tab>Des Moines is in Iowa place<tab>Des Moines is the capital of Iowa is-a<tab>Des Moines is a city is-a<tab>3D printer is a type of printer is-a<tab>New B...
Let $Y_0$ and $Y_1$ be both identically (not necessarily independent) normally distributed with mean $\mu$ and $\sigma^2$, i.e., $Y_i \sim N(\mu, \sigma^2)$ for $i = 1, 2$. Let $\rho$ denote the correlation between $Y_0$ and $Y_1$. Show that the conditional expectation $E[Y_1|Y_0 = y_0] = (1-\rho)\mu + \rho ...
I am working on a heart failure project to look at rate of prescribing change over time. Because the data does not contain date of diagnosis, so a patient study entry date is defined as the first time when a patient uses the heart failure specific drugs such as some beta blockers. However the change in the use of beta ...
Computers have for a long time been able to play chess using a "brute-force"-technique, searching to a certain depth and then evaluating the position. The AlphaGo computer however, only use an ANN to evaluate the positions (it does not do any depth-search as far as I know). Is it possible to create an chess engine that...
At the moment I have two matrices in R which both hold a number of products and their time series based on 2 variables(Sales and Inventory) There are 4000 products per set and all time series have t-75. I want to cluster the products together on the basis of both variables. I have looked at Tclust package, PDC, and mo...
If the p-value is greater than 0.900, should you reject $H_0$ at the 0.10 level?"
Suppose $Y$ is discrete and only takes on non-negative integers and that the conditional distribution of $Y$ given $X=x$ is Poisson, that is, $$P(Y=y|X=x) = \frac{\exp(-x'\beta) (x'\beta)^y}{y!}$$ where $y = 0, 1, 2, \cdots$. First compute $E(Y|X=x)$ and $Var(Y|X=x)$, does this justify a linear regression mo...
So I have two datasets from two different groups (blackbirds and song thrushes), with the same 4 variables (Foraging, Singing, Alarm, Aggressive). I've been struggling to find a good way to compare the data in these different sets, the sampling that was conducted is called scan sampling, so it's just a recording of obs...
Experiment: You are given a large population of real numbers. For simplicity take the whole numbers from -n to n. Take two independent random samples x and y of size k and sort them (each one individually). Compute the linear regression $y=a+bx$. Question: what are the expected values for a and b? What does the distri...
I'm working through the Cho 2014 paper which introduced encoder-decoder architecture for seq2seq modeling. In the paper, they seem to use the probability of the output given input (or it's negative-log-likelihood) as the loss function for a input $x$ of length $M$ and output $y$ of length $N$: $P(y_1, …, y_N | x_1, …...
I know that given $X$ and $Y$ being independent variables and both coming from normal distributions, then $Z=X+Y$ also comes from a normal distribution. I was wondering if If I have two conditional distribution $P(Z|X)=N(z; \mu_{X}, \Sigma_{X})$ and $P(Z|Y)=N(z;\mu_{Y},\Sigma_{Y})$, and I define some distribution $Q(Z)...
In equation (5) on page 3 on this paper a conditional probability is rewritten using Bayes' formula. I started using this answer Can I rewrite conditional probability of three variables like this? To get $p(\lambda_1, \lambda_2, n | X_{1:N}) = \frac{p(\lambda_1, \lambda_2, n)}{p(X_{1:N})}$ But I got stuck immediately. ...
I sometimes encounter symbols in statistics whose symbol carries a "squared". In other areas, like for example mechanics, you give the quantity you are interested in a normal letter and then define your formulas so that you can rearrange them until the quantity you are interested in stands as a normal letter at the lef...
Wikipedia says that p-values are uniformly distributed over [0,1] if the null hypothesis is true and for continuous data. What is the expected p-value distribution if the test statistic is discrete? E.g. occurrences in an enrichment analysis.
I want to evaluate a policy introduced in the UK - a fund that has provided cash to coastal communities to generate jobs and gdp growth. All coastal regions are eligible - as such i know what areas have been treated and not since 2012. Is Propensity score matching a suitable technique to compare treated regions (coasta...
I have constructed a Neural Network to predict a function of i inputs. ie: \begin{align*} y = f(x_1, x_2 .. x_i) \end{align*} The network is working really well and gives me a good approximation of the mean at each point and extrapolates perfectly to the points where I have no data. Now I believe the true y to be norm...
I wanted to understand Singular Value Decomposition (SVD) hence consulted a few resources. In general I came across 2 different forms of SVD and hence got confused as to which one is correct or whether both are equivalent etc. The 2 forms I came across are : 1) Page 45 of deep learning book (http://www.deeplearningb...
I am doing a gene ontology enrichment analysis and end up with an unexpected distribution for my p-values. My questions: Why does this happen? Can I anyway use the p-values to interpret if terms are enriched? How can it be corrected? I am not a statistician and appreciate simple answers. HERE ARE THE ANALYSIS D...
I ran a log-linked gamma glm and noticed that the estimated coefficients and AIC did not change when I update the model with a dispersion parameter. However, I did noticed that the standard error of the estimated did change. This brings me to question what other results does the dispersion parameter affects. Does it af...
I'm running a post-hoc test after GLM model by library(multcomp), the results shows, Simultaneous Tests for General Linear Hypotheses Multiple Comparisons of Means: Tukey Contrasts Fit: glm(formula = survival ~ quality + quantity, family = binomial, data = Survival2) Linear Hypotheses: ...
Suppose I have two Dirichlet distributed vectors $X$ and $Y$ such that $ X \sim \text{Dirichlet}(\alpha) $, $ Y \sim \text{Dirichlet}(\beta) $ with fixed vectors of hyperparameters $\alpha$ and $\beta$. I need to evaluate and compare the "spikiness" of resulting vectors. To this end, consider random variables $ A = X \...
I'm trying to run a regression model for data with 150 features. I'm eliminating redundant features to prevent over-fitting and produce a model that is easier for illustration. There are two features that I'm not sure how to handle, a real variable and a categorical variable. x1 is a measure of distance c1 depending...
I'm facing the following situation: We conducted a marketing campaign with three groups: 2 test vs 1 of control, where two different type of coupons sent to the two test groups, 3 euros vs. 6 euros. I understand that the best way to test the difference in proportion is a GLM model with binomial distribution. The datas...
I am a novice in statistics and understand more the concepts than what is going on "under the hood", so please excuse and naivety. I am trying to prove whether a R² value for a specific regression model is "statistically significantly" better than another one. Here is a basic background of the experiment. I will refer ...
Given that $X_i\sim N_p(\mu,LL^T+\Psi)$ where $\mu_{p\times p}$ is the mean vector $L_{p\times p}$ is the loading matrix and $\Psi_{p\times p}$ is the matrix of specific variances. Find the joint distribution of $(F_i^M;F_i^R)$ where $$F_i^M=(L^T\Psi^{-1}L)^{-1}L^T\Psi^{-1}(X_i-\mu)$$ $$F_i^R=L^T(LL^T+\Psi)^{...
I am searching momentum. And below animated gif shows one advantage of momentum. And the momentum is expressed like this: $\mathbf{W}^{k+1}$ = $\mathbf{W}^{k}$ – η $\frac {\partial E}{\partial \mathbf{W}}$ + γ$\mathbf{W}^{k – 1}$ My question is why can the momentum escape from the saddle point after losing the magnitu...
First of all, I cannot find information if one should include or exclude a constant term in the VAR(p) model. Is there any relevant literature on this issue? The problem is that I have to specify if there is a constant or not for the the lag selection, estimation and IRFs as well. Secondly, I am having hard times decid...
I'm new to Bayesian and PyMC3 and I am trying to predict a chance of failure very similar to this example (the part example:Challenger Space Shuttle Disaster): http://nbviewer.jupyter.org/github/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/master/Chapter2_MorePyMC/Ch2_MorePyMC_PyMC3....
For a normal likelihood $$ P(\mathbf{y}|\mathbf{b}) = \mathcal{N}(\mathbf{Gb}, \mathbf{\Sigma}_y) $$ and a normal prior $$ P(\mathbf{b}) = \mathcal{N}(\mathbf{\mu}_p, \mathbf{\Sigma}_p) $$ I'm trying derive the evidence (or marginal likelihood) $P(\mathbf{y})$ where $$ P(\mathbf{y}) = \int P(\mathbf{y, b}) \, \mathrm{d...
Short version Imagine I run the exact same experiment $n$ independent times and get $n$ times the same result. Can you put a lower bound on the probability of getting the same result the $n+1$ time I run the experiment? Long version I'd like to check that a computer program is deterministic and I don't want to read th...
I am looking at a simple set of data that details the occurrence of a stock market trade for a particular hour of the day. So, based on the data avilable, I have created a grouping for every hour (0-1, 1-2, 2-3, etc...). The only information available other than the exact time that the trade was made (which is what I u...
I am trying to do transfer learning to reuse a pretrained neural net. I got the tensorflow faster rcnn official example to work, and now i would like to reuse it to detect my own classes. This is the repo im using https://github.com/tensorflow/models/tree/master/research/object_detection I have a dataset of ~2k images ...
Say I have two training data of email titles with 10000 entries each. One of them have 2000 ham and 8000 spam, while the other have 5000 ham and 5000 spam. Will predicting any random email with the 2:8 training data tend to go for spam? Also is this necessarily a bad training data compared to the 1:1?
I'm not a statistician, but I'm very interested in statistics and I'd like to buy a book to keep as a reference. I have a few books on specific subjects (such as The Elements of Statistical Learning for machine learning or Bayesian Data Analysis for...well, Bayesian Data Analysis :) I was also looking for a more generi...
For a set of miRNA gene expression data from different cancer patients I produced some heatmaps with R. The goal is to examine which miRNAs are up/downregulated depending on different parameters (state, occurence of brain metastases, etc). I could not figure out whether to use euclidian distance for the calculation or ...
I am analysing a variable (DV) as a function of an experimental manipulation (X), presented in different visual contexts.The DV varies by subject and context. I have repeated measures per subject and context at the different levels of X. To capture by-subject variation in the DV, I add a random intercept/slope for each...
Suppose I have a variable that looks like this [[[1., 2., 3.]], [[7., 8., 9.]]] I have read this is a rank 3 tensor with shape [2, 1, 3], but I don't understand where these numbers come from. In particular, what is the meaning of the 1 in this shape?
I wand to detrend some spatial data "A" with respect to two parameter "B&C". What is the best procedure to detrend A without loosing its anisotropy. Theoretically values of "A" should be anisotropic and has no trend with respect to "B" & "C". The real measured value of "A" show some trend with respect to "B" & "C". By...
I am wondering what is the right NN structure when the aim is to classify distribution function. Let's for example consider two $p$-dimensional probability distributions $D_Z$, $D_X$ (for example $D_Z\sim N(0, 1)$ and $D_X\sim N(0,2)$). Let $X, Z\in\mathbb R^{n\times p}$ be the matrix composed by $n$ samples of the ...
This is based on the example in section 8.3.2 in Izenman's Modern Multivariate Statistical Analysis, using the Wisconsin breast cancer data. This is a binary classification problem, classifying data as either "malignant" or "benign." Here is the R code I have been using, which generates the correct coefficients. The da...
I need more information about uniqueness of LASSO solution when using $\ell_1$ penalization with likelihood functions. I read on many sources that this solution is unique given that the columns of $X$ are in general position, so that it is sufficient for the predictors to be continuous variables. Anyway, I guess this i...
I have been reading about percentage of variance explained. As nicely put in this blog post variance is hard to visualize and not directly comparable to the mean. https://assessingpsyche.wordpress.com/2014/07/10/two-visualizations-for-explaining-variance-explained/ So I wonder, since from variance we can calculate stan...
It is often recommended to subsample randomly if class sizes are unbalanced in classification - especially when classification accuracy is used. My question however: How often should the subsampling be done? For instance, if I subsample 10 times and then average classification accuracy over these 10 repeated classifica...
Purity is defined as $\mbox{purity}( \Omega,\mathbb{C} ) = \frac{1}{N} \sum_k \max_j \vert\omega_k \cap c_j\vert$ where $\Omega = \{ \omega_1, \omega_2, \ldots, \omega_K \}$is the set of clusters and $\mathbb{C} = \{ c_1,c_2,\ldots,c_J \}$ is the set of classes. If we assign points randomly to cluster, what is the e...
In a context of decision tree splitting, it is not obvious to see why the Gini impurity $$ i(t)=1-\sum\limits_{j=1}^k p^2(j|t) $$ is a measure of node t impurity. Is there an easy explanation of this?
I am fairly familiar with the practical application of principal component analysis (PCA). PCA tries to find the first PC, for example, by minimization of the sum of squared perpendicular distances of x1, x2, . . . , xn from the lower-dimensional subspace. However, as far as I understand PCA does not add any 'value' a...
We are trying to do an individual level impact evaluation using experiments. The intervention who's impact we are studying was at the town level. Unfortunately, we do not have a baseline control group (town or individual). To identify a control group we are conducting a PSM at the town level to identify a control group...
Suppose you want to assign a noninformative prior to the following event: The next tree that we will encounter is a: Spruce Pine None of the above We don't have any prior information, so we are tempted to give each choice the same probability value, i.e. 1/3. But is this the right approach? Are there some general pri...
I've been searching for some time for a correlation metric analogous to the Pearson correlation value for numerical vs numerical features, or Cramér's V for categorical vs categorical features, but this time for categorical vs numerical features. This is my toy data example in Python, where the categorical variable is ...
I am investigating the income of a region and am given intervals of income, e.g. 0 to 99,000 kr (first over interval) 100,000 to 199,000 (second interval) etc, and the last interval is ''over 600,000 kr'' I'd like to make a box plot to get an idea of the skew of the data and just because I have done so for other indica...
Is there a reason why all the variance weights from a Poisson GLM are equal when a square root link is used? That is (on R): glm(Y~X1+X2+X3+X4, family=poisson(link=sqrt), data=df)$weights Always returns equal weights for all observations when a square root link is used; but different weights when the canonical (log) l...
Given that I can simulate $X \sim Beta(a,b)$ on $(0,1)$, how can I simulate $Y \sim GBeta(a,b)$ (generalized beta) on $(p, q)$ for arbitrary $p, q \in \mathbb{R}$? Is it just $Y = (p-q) X + p$
I have mean litter size values reported from a number of studies. They are count data, but because I'm using the averages, they aren't integers (although they are the means of count data). It seems like a Poisson or Negative Binomial GLMM using the study site as a random intercept would the most appropriate choice fo...
Hope you can help me with my 2 (or 3) questions here below. I want to add/sum some variables having different units. I decide to standardize (Z-scores) the values and then, once transformed in Z-scores, I can sum them. The problem is that all my variables distributions are not approximatively gaussian. I know that my d...
I was wondering about the ethics of using lasso regression for variable selection and then simply entering the selected variables into a standard regression. Is it kosher to do this?
Looking through the 'Elements of Statistical Learning', a book I want to master in the future, I noticed the first few pages discuss k-nearest neighbor and Bayes optimal classifiers. Is a Qubit classifier also possible; one that decides the probability of each class from the set of possible classes for every point? You...
What is the name of the operator that takes a categorical vector and transforms it to the binary representation using one-hot encoding? I am wondering since I am writing a scientific paper and need a proper name for that.
Lets assume I have a distributions of outcomes $A=\{a_1, a_2, a_3, \ldots, a_n\}$. I also have a probability function $P$, with $\forall a\in A, P(a)\in[0,1]$ and $\sum_{a\in A}P(a) = 1$. Now let assume I run my experiment $n$ times. I'm talking a REAL experiment where I don't know the full range of $A$ nor the details...