instruction
stringlengths
9
38.7k
Hopefully this isn't too silly a question but I'm wondering how in independent component analysis when we've got independent coefficients then we identify parts of a face such as eyes, mouth, nose, etc. What exactly does the independence of the coefficients have to do with this? Isn't it more to do with the independenc...
How did we get this formula? Can you explain it with visualization if possible? $$\text{Using properties of f distribution } f_{(1-\alpha), (\nu_1,\nu_2)} = \frac 1 {f_{\alpha, (\nu_2,\nu_1)}}$$
The article plots for every 100 women that use a certain type of contraception method the number of unplanned pregnancies over time. https://www.nytimes.com/interactive/2014/09/14/sunday-review/unplanned-pregnancies.html?_r=0 In particular at the end of the article they say: The numbers are calculated as follows: $ \m...
I'm a bit stuck with the following. Assume $X$ ~$N(0,1)$ and $Y$~$N(1,1)$. Is $Y$ stochastic bigger than $X$? And the same question goes for $X$~$N(0,1)$, $Y$~$N(0,4)$.. I simply don't have a clue how to approach it. Can one please guide me? Thanks!
What are the reasons that in fictitious self-play only average(not the best-response) strategy converge to the Nash equilibrium?
As stated above, How does one show mathematically that adding many variables in a linear regression will only increase R-squared ?
I (think), I understand how LSTMs are roughly working. I need some clarifications though. Since there can be an output at each time step, the "output dimension" (in the sense of many to one or many to many, I don't know how to name it besides "output dimension") can't be bigger than the number of time steps, is that ...
Some particular independent variable has low p (high t value) as a linear regressor. That means (if I understand correctly) that I can trust it has some effect on the dependent variable, and then I look to see what effect it has. Normally I would take the coefficient from the regression output and divide it by the mean...
One thing i never really understand is why kernel trick is called 'kernel'. Kernel means: the central or most important part of something. synonyms: essence, core, heart, essentials, quintessence, fundamentals, basics, nub, gist, substance; what's the connection between above definition and 'make low dimension samp...
In almost most papers and tutorials about VAEs, the reconstruction loss term is shown in this, Bernouli ditribution cross entropy form: $$ C=\frac{1}{n}\sum_{x} (y\ln(x) + (1-y)\ln(1-x)) $$ However, it is usually said that other cost functions are also possible. What are they, and what requirements they should meet, be...
I've been asked to solve a problem for a project. I'm working on Python or R. I need to approximate a function with multiplayer perceptron (neural network). The function is: $y= 2\text{cos}(x)+4$ on the interval $[0,10]$. After reading a lot about perceptron and neural network for the approximation of functions, I foun...
Is there a way to rate the results provided by Naive Bayes algorithm? I mean, if NB detects "I love to play football" and label it as "tennis", is there a way to improve the detection by saying to NB "no, it's not tennis". Same if I want to say "that's correct!" if NB labels it as a football. I think if a detection is ...
$\newcommand{\logit}{\operatorname{logit}}$I have the following model: ${y}_{j}\sim \operatorname{Bin}({n}_{j},{\theta}_{j})$, where ${\theta}_{j}={\logit}^{-1}(\alpha+\beta{x}_{j})$, for $j=1,...,J$, and with independent priors $\alpha\sim {t}_{4}(0,2^{2})$ , $\beta\sim {t}_{4}(0,1)$. And finally we use J=10, and ${x}...
It is not very clear for me the calculation steps of PRESS statistic. What I have found: 1)we set aside the $j_{th}$ observation $⟨x_j,y_j⟩$ from the training set(It means, that we just remove the point $j$ from our model) 2)we use the remaining $N−1$ observations to estimate the linear regression coefficients $β^{−j}$...
I am working on a movie pizza data set movie data set example(single row) Date Day Elite Seats Premium Seats NOM7 UM Pizzac 11/12/2012 "Tuesday" 230 300 2 4 5 NOM7 <- Number of movies whose release day is less than 7 days till 11/12/2012 UM <- Unique Movies on 11/12/2012 Now I wou...
I'm doing a comparative study, measuring the number of times a user presses a key in 13 different scenarios, split systematically over two different interface types (A and B). Data was recorded for multiple users in a within-groups design. I'd like to test the significance of interface types on the keypress frequencies...
I applied lasso regression for variable selection, and out of 10 variables lasso selected 4 variables. fit.lasso=glmnet(x,y,alpha=1) plot(fit.lasso,xvar="lambda",label=TRUE) cv.lasso=cv.glmnet(x,y) coef(cv.lasso) Suppose after this command, we get 4 variables which have non-zero coefficient value, i.e: x1, x2, x3, ...
So we have normal scores aka rankings on the x-axis, called theoretical quantiles and on the y we have the sample quantiles, but how do we calculate them, if we assume that the data derives from a normal distribution? If the result of plot will more or less look like a linear line, then our sample derives from the norm...
I want to compare two correlation coefficients sharing a common variable in repeated measures setting. Suppose $r_{XY}$ is the correlation between $X$ and $Y$ and $r_{XZ}$ is the correlation between $X$ and $Z$. How do I test the null hypothesis that $\mathbb{E}[r_{XY}] = \mathbb{E}[r_{XZ}]$ (equivalently $\mathbb{E}[...
We have panel data and we are interested in a simple panel spatial model: $$Y_{it} = \alpha + \rho WY_{it} + \beta X_{it} + \mu_i + \epsilon_{it}$$ The maximum likelihood fixed effects estimator is what we need. How do we model heteroscedasticity in the ML function? How about autocorrelation? Can someone provide a hel...
As far as I understood, R squared explains how much the variation in Y is explained by its linear association with X. And it's used as an indicator for goodness of fit of a linear model. Then when should I use r (Pearson coefficient)? How is it useful?
I am using currently random forest and SVM for a binary classification problem. Especially with random forest it's easy to get the importance of all variables. But is it also possible to get the relevance for each variable in individual predictions? I don't need a detailed rule how the result was calculated, but whic...
I have 1000 cards on the table, R1 are red and B1 are blue. You have 1000 tokens on the table, R2 are red and B2 are blue. Each turn, you get to pick a token, and I randomly choose a card with uniform distribution. If they have the same color, you get 1 point. Either way, the chosen token and card are both thrown awa...
I have used a "adabag"(boosting + bagging) model on imbalanced dataset (6% positive), I have tried to maximized the sensitivity while keeping the accuracy above 70% and the best result I got where: ROC= 0.711 SENS=0.94 SPEC=0.21 the results aren't Inhofe especially the bad specificity. any suggestion on how to improve ...
I have a sample data whose histogram shows a two peak distribution. So I generated two distributions which is the Mixture (average) of two (1) two weibull distributions (2) two normal distributions I would like to check which of the two distributions is closer to my sample data. Is the anderson-darling test sufficient...
Let's suppose we collect a dataset $\mathcal{X}$, say $\mathcal{X} = (x_1,\ldots,x_N)$, i.i.d. samples from the R.V. $X$ with unknown probability density $p(x)$. Our goal is to estimate an expectation (i.e. a statistical functional): $$ Y = \Bbb{E}_{p(x)}[f(x)] = \int f(x)p(x)dx $$ To do this, a standard parametric...
Suppose we have two categorical variable: C and B. C has 3 levels(0,1,2) and B has 3 levels(0,1,2). Each participant is exposed to each of these variables under a latin square design such that under each session each participant experiences all the three levels under category C and also all the three levels under categ...
Say I have a panel data model with several waves: $Y= \beta_0 + \beta_1 * female + \beta_2 * employment + \beta_3 * wave + \epsilon$ where female is a dummy that takes 1 if $female$ and 0 otherwise and $employment$ is a dummy that takes 1 if employed and 0 otherwise. I am using an OLS model to calculate the predicted v...
A white noise sequence needs to have 0 mean, uncorrelated $\epsilon_t$ and $\epsilon_{t+k}$ and constant variance. A martingale difference sequence has 0 mean and uncorrelated $\epsilon_t$ and $\epsilon_{t+k}$. Is it possible to show that all Martingale Difference Sequences have constant variance? In general, is it tr...
An MA(q) model is $X_t = \mu + \sum_{j=1}^q{a_j \epsilon_{t-j}} + \epsilon_t$ where $\{\epsilon_t\} \sim WN(0, \sigma^2)$ Is it necessary for $\{\epsilon_t\}$ to be i.i.d white noise? My guess is that it is not necessary because one example of an MA(q) model is the k-period long return $r_t[k] = r_t + r_{t-1} + r_{t-2...
It's believed that at least 75% of workers in a factory are supporting a new initiative from their union. The survey says that 360/500 workers voted in favour. Can Ho (null hyp) be rejected with $p=0.75$ with $\alpha$ de $5\%$? This is my procedure: $Ho \leq 75%$ $H1 > 75%$ $1-0.75 = 0.25$ in order to get a value from ...
I'm a bit confused about something that I've seen in several engineering papers. Suppose we have a random variable $X$ with unknown distribution $p(x)$. We're interested in the value of a statistical functional $$ y = \Bbb{E}_X[f(x)] = \int f(x)p(x)dx $$ To estimate $y$, we'll collect an i.i.d. dataset $\mathcal{X}=...
In this blogpost "The Unreasonable Effectiveness of Recurrent Neural Networks" the author says, that he is training "a 2-layer LSTM with 512 hidden nodes" for character prediction. So it will look somewhat like y1 = rnn1.step(x) y = rnn2.step(y1) What I dont get: What are these 512 hidden nodes in a context of an LST...
I've read many threads on this website try to understand why we need to break the data on hand into 3 parts, the training, validation and test data set. I am still thinking it is enough just to break the data set on into into 2 pieces, i.e., the training and validation, then I can fit different models on the training s...
In the book Forecasting with Exponential Smoothing by Rob J. Hyndman it is said that the analytic formula for the forecast variance for the step h in a AAN model is $v_{n+h | n} = \sigma^2$ for $h = 1$ and $v_{n+h | n} = \sigma^2(1+\sum_{j = 1}^{h-1} c_j^2)$ for $h \geq 2$, where $c_j = \alpha + \beta j$. The forecast...
I am using a service quality survey for my dissertation (Teeroovengadum et al., 2016 HESQUAL). My sample size is 138 (studied population appr. 1100) and thus I did a factor analysis of the 48 items. I got 10 factors total, which have different number of items in them. I was interested in running a regression analysis a...
Problem: For an AR(p) process, $X_t = b_0 + b_1X_{t-1} + ... + b_pX_{t-p} + \varepsilon_t$ the Yule Walker equation takes the form $\gamma(k) - b_1\gamma(k-1) - b_2\gamma(k-2) - ... - b_p\gamma(k-p) = 0$ I wish to show that the solution takes the form $\gamma(k) = c_1\alpha_1^{-k} + ... + c_p\alpha_p^{-k}$ where $\alp...
I have a serious doubt about one characteristic of the two-sided test: Suppose we have a random variable: $ X \sim \mathcal{N}(\mu,\,\sigma^{2}) $ where $\sigma = 0.4$ but $\mu$ is unknown. We want to test: $H_{0}: \mu = 3$ against $H_{1}: \mu > 3$ The thing is, that this random variable $X$ is a Proportion. Is the...
When creating an SVM, if the training set is too large, can we use partial set of landmarks? For example, if the training set is 1,000,000, it may be too computationally hard to use SVM, since there would now be 1,000,000 new features for the SVM. Could we do something like use a random 1% of the features? We could use...
I am trying to find the dual optimization problem for the following adaptive SVM. $\mathbf{w}_t$ are the weights of the target SVM. $C$ and $B$ are regularization parameters (constants), $\mathbf{w}_s$ are the weights of the source SVM (constants) and $\mathbf{\xi}$ is a slack variable.
If I plot the feature importance of my xgboost model I get for example f10,f3,f7,f99,... as the most important features. Now I decided to remove f3 and I imagined the new feature importance would be f10,f7,f99,... but what happened is: f10,f18,f99,f50,... Xgboost seems to choose an entire different approach or somet...
This question is based of David Robinson's excellent illustration of using the Beta distribution to estimate a (baseball) batter's season batting average in the middle of a season. To recap, the proportion of hits to at bats (aka batting average) is assumed to be (conditionally) Beta distributed with parameter values ...
In what units are coefficients in survreg's dist=exponential? I'm getting the following output: Call: survreg(formula = Surv(x, delta) ~ z, data = expdatauusi, dist = "exponential") Value Std. Error z p (Intercept) 0.876 0.431 2.04 0.041835 z -2.112 0.639 -3.30 0.000952 Sc...
While working on Davidson and McKinnon's Econometric Theory and Methods, I was encountered with where $X = [X_1\ X_2]$, $M_X$ is the annihilator matrix for $X$, $M_1$ is for $X_1$ and so on. In particular, I couldn't get the second equality. How can we get $(M_1 - M_x) = M_1X_2(X_2^TM_1X_2)^{-1}X_2^TM_1$? I tried but...
Can some one provide an example on what is k-holdout and k-fold cross validation.
Lets say I have a dataframe that looks like this: groups <- floor(runif(1000, min=1, max=5)) activity <- rep(c("A1", "A2", "A3", "A4"), times= 250) endorsement <- floor(runif(1000, min=0, max=2)) value1 <- runif(1000, min=1, max=10) area <- rep(c("A", "A", "A", "A", "B", "C", "C", "D", "D", "E"), times = 100) df <- da...
I have a theoretical question. I have implemented a recommender system using collaborative filtering method. There, I am using cosine similarity method to calculate similarity between two users. I have user-item ratings matrix and I get two raws(user feature vectors) and calculate cosine similarity. As an example consi...
If $X \sim N(1,4)$ find $\mathbb{P}(1<X^2<9)$ If $x=2$ is the unique mode of the $X \sim \Gamma(2,\beta)$ distribution, find the parameter $\beta$. Well I tried transformation to solve this problem. Set $Y=X^2$ and I actually found the pdf of $Y$ but when I try to calculate $\mathbb{P}(1<X^2<9)$, I just can't calcu...
I have a question about negative binomial versus poisson in the presence of an over-dispersed dependent count variable, but with the need to include fixed effects for the cross-sectional component. My understanding is that one of the benefits of the Stata command xtpoisson, fe is that it does not suffer from incidenta...
I am running an intraclass correlation to test for non-independence of the responses of individuals in dyads. I am running the intraclass correlation, as recommended by Kenny, Kashy, and Cook in Dyadic Data Analysis (2006), because my dyad-members are indistinguishable. I have calculated the intraclass correlation, and...
Quick background: I require to obtain a single 'score' for comparison between experimental and simulated data. The parameter being tested is the height of various parts (num = 5) of the model. For the experimental data, I will have the mean and standard deviations for each of the parts, whereas for the simulated data i...
I want to use the EM algorithm to do clustering under a missing labels regime. The assumption I am making about the missing data is that it's distributed according to Bernoulli distribution. So for the complete data likelihood we have: $$ P_{X,Z}(\mathcal{D}, Z; \theta) = \prod_{i=1}^{N}P_{X,Z}(x_i,z_i; \theta) = \pr...
Here i am attaching plot of random-forest in R please help me to interpret. Why does this graph have a negative slope?
Can Mean Square Error (MSE) be applied to decide which model is better?-i have two tables that present the residuals of two different models with the same number of parameters(29).
I am analyzing a certain hormone metabolites from the populations of free-ranging animals. The total samples (N) that I have collected, have a few repetitive samples from some individuals. Will these samples influence the result? What statistical tool should be used to check the influence of such samples?
How can I calculate the mean, step-by-step, in R?
I am trying to implement the agreement score illustrated here. In particular, Equation 1 states that the contribution of sample $i$ to the agreement score of rater $j$ is $$ \hat{s}_{ij} = \frac{n_{i, g_{ij}} - 1}{(\sum_{g=1}^3n_{i, g}) - 1} $$ where $n_{i,g}$ is the observed number of raters giving grade $g$ to sample...
Question I am looking to understand what possible common statistical continuous distributions exist with support [0,1]. Background In my work I often come across data which are bounded between 0 and 1 (both inclusive) and likely skewed to the right. This data mainly consist of sales converted into percentages between ...
I am trying to solve the following problem. Prove that for $X_n\sim \operatorname{Beta}(n,n)$ , $X_n $ converges in probability to $\frac {1}{2}$. This is what I tried: Since as $ n\rightarrow \infty$ , $\mathbb{E} (X_n)\rightarrow \frac {1}{2}$ , and $ \operatorname{Var}(X_n$) $ \rightarrow 0 $ $\implies$ $X_n$ ...
Let $M$ be a n x k matrix which is the outcome of a subjective test, where $n$ is the number of samples and $k$ is the number of raters. Values in $M$ can range from 0 to 1 with a step of 0.1. Since the number of samples is high and the evaluation procedure is long, each rater evaluated only a subset of samples. Sample...
Everywhere in the theory of neural networks, authors saying that idea came about by observing the work of the human brain. But I can not believe in that. I guess, everything is much simpler and neural networks is specific functions of math's series. Proof of this is the existence of the Weierstrass theorem and Taylor s...
I receive the following results of a Durbin-Watson test in R. lag Autocorrelation D-W Statistic p-value 1 0.7302306 0.5348529 0.00 2 0.4735212 1.0428875 0.00 Alternative hypothesis: rho[lag] != 0 does it mean, Null hypothesis is rejected and residuals are not autocorrelated as D-W statisti...
What are the necessary and sufficient conditions for $α_i<β_i$ such that the independent $\operatorname{Uniform}(α_i,β_i)$ distributed variables $X_i$: (1) converge to $0$ in distribution? (2) converge to $0$ almost surely? The $\operatorname{Uniform}(α_i,β_i)$ variables $X_i$ are not identically distributed. For 1 we ...
I have been struggling with ordinal regression for a bit now and would like to ask for some help. My outcome will be an ordinal variable made up out of 4 groups of which 1=good to 4=bad. My data consists of all nominal, ordinal and continuous variables and I have cleaned my data, and it is ready to be used. However I b...
I am running preliminary tests on the two dimension data set. This data set contains 108 data points, and I was wondering whether my data may be considered independent or time-dependent. I test using multivariate normality test such as roystonTest, mardiaTest, hzTest; they all seem to reject that my data belong to a ...
Edit: I apologize if the question is considered to broad. In fact, it is concerning a very specific task in bioinformatic analysis of high throughput data set, and in my opinion the problem presented here, albeit not formulated formally, is very specific. In HT data sets in biology, such as transcriptome profiles, very...
I have trouble selecting the correct regression model for my data. Let's call my dependent variable Y. It can take values from 0 to 5 depending on how many corresponding documents have been published. A value of 0 means none of the five documents were published, and that is really bad. On the other hand, 5 means that a...
I am using a first difference estimator for my panel data. The panel has people whom I observe over time. I want to include a 'time fixed effect'. I argue that this should be possible, as long as I interpret it slightly differently than a standard time dummy. So basically: y_it-y_it-1=gamma_(t,t-1)+beta*(x_it-x_it-1)+...
I would like to know if my two-dimensional data set to follow any of the following distributions such as the mixed multivariate normal model, multivariate t model, multivariate non-central t model. Are there well-known tests to know if I may apply them to my data set?
I am using annual county-level data to predict a headline national figure that is the sum of the counties. For this problem, I applied a Random Forest regression model to the county-level data to predict my scalar target for each county for the subsequent year. After meta-parameter tuning the model achieves $R^2$ in ex...
I am trying to predict demand of Automobiles at dealer and Variant level. I have 2 year, 2 months daily sales data. I need to predict demand at monthly level based on daily data for Enquiry. Just to make it more clear, if I am on 5th of March 2017 so based on enquiries so far, earlier sales data etc. I need to predict ...
I am looking for empirical approximations and guidelines on how many operations are required to run a linear model on a given amount of data, or if it's even feasible. Let's assume we use QR decomposition to solve least squares and use Newton-Raphson (fishier scoring) to solve generalized linear models. The kind of an...
I have started to work with GAM in R and I’ve acquired Simon Wood’s excellent book on the topic ("Generalized Additive Models An Introduction with R"). Based on one of his examples, I am looking at the following: library(mgcv) data(trees) ct1<-gam(log(Volume) ~ Height + s(Girth), data=trees) I have two general questio...
Let's say I have a data set where there are some people sitting and some people standing. One of the variables in my data set is the amount of weight a person is holding on their lap. However, a person who is standing does not have a lap, so the question is meaningless for them. (I apologize that this is the best examp...
I am trying to create a graph representing a trend in binary value distribution. I thought of my own solution but it somehow doesn't feel right. Here's what I'm trying to convey with my graph: I have a list of items that are either correct or incorrect, and their order is random. I am comparing a couple of scoring algo...
I have been using BSTS package for quite a while and I have found it pretty effective with respect to ARIMAX models. I was wondering whether it would be possible to share regression coefficients in the regression part (the equation being: $Y_t = \mu_t + \mathbf{x_t} \boldsymbol{\beta} + S_t + \epsilon_t$, with $\mu_t$...
Background: I have the following data: 27% of the respondents to a survey are interested in a product. Of that 27% which is interested: 59% are 15-24 years old. 18% are 25-34 years old. 6% are 35-44 years old. 4% are 45-54 years old. The rest are outside these age ranges. The probability of being in each age range i...
For example, if I have 12 participants who responded in a particular way to a task, and 7 participants who responded a different way. I want to compare the response time between these two 'groups' of respondents. Will having an unequal sample size impact the t-test? Does the independent t-test make assumptions about sa...
Suppose I have a kind of panel data set, where we track the investment totals of a great many customers, which may be highly variable, and is measured on a monthly basis over the course of 7-10 years. While we are ultimately interested in forecasting the total level of investment of all of our customers, for various re...
I am currently trying to understand what is involved to train a Hidden Markov Model (HMM) with Forced alignment. Forced alignment, as far I understand, is to align the audio file with the utterance at a word level or phonetic level. What I don't understand is how a HMM is being trained by forced alignment. Normally t...
I’m working with a very large data set of auto loans (and monthly performance) to analyze the likelihood of default or prepayment based on different borrower or loan characteristics or macroeconomic factors. I’ve developed cox proportional hazard models in R that seem to fit well. I would like to use the model to br...
I'm taking a course in coursera about neural networks. I understand the relation and difference between "Sigmoid Neurons" and "Stochastic Binary Neurons", but I don't how could you adapt "Rectified Linear" to Stochastic. They said you could imaging the output: $$ \texttt{z} = b + \sum_i (x_i * w_i) \\ \text{(where } b ...
Background: I have a 2-dimensional 2-class classification problem, the following training sample vectors are given: $$D_1 = \left\{ \begin{bmatrix} 0 \\ -1 \end{bmatrix}, \begin{bmatrix} 3 \\ -2\end{bmatrix}, \begin{bmatrix} 0 \\ 2 \end{bmatrix}, \begin{bmatrix} -2 \\ 1\end{bmatrix}, \begin{bmatrix} 2 \\ -1 \end{bmatri...
It's clear to me by inspection that if we fix $\beta = \frac{1-\mu}{\mu} \alpha$ (thereby fixing the mean) and let $\alpha \rightarrow 0$, the Beta distribution approaches a Bernoulli($\mu$) distribution. For example: par(mfrow = c(1, 2), oma = c(0, 0, 1.5, 0)) xx = seq(0, 1, length.out = 1000) mus = c(.2, .7) for ...
Context: I'm familiar with the problems of collinear regressors-- i.e. the general model fit is interpretable but a direct comparison of the predictors is not. I have 2 regressors that are highly correlated and would like to know the relative contribution of each regressor on my outcome variable. Question: What is...
I have been reading up about Q-learning, and I have a question about how the value iteration is computed. From my understanding, the algorithm updates the q-value of a state-action pair, after that action has been taken. So let's say that action a moves the state from s to s'. The q-value, q(s,a) is equal to the value ...
I understand that generative adversarial networks (GANs) can synthetically reconstruct the input using a generator and a discriminator in a zero-sum game. However, I feel that I do not fully understand the mathematics or usefulness of GANs. Are there any good tutorials or explanations on understanding GANs? I have foun...
I have some data and a model, e.g., $H_0: \xi \sim \mathcal N(\mu_1 > \mu_0, \sigma_0)$, $\mu_0, \sigma_0$ are fixed, in other words, this is the similar to the situation with "unequal means, alternative=greater". How can I calculate the likelihood of the data under this model? Numerical integration could help, but of...
How do you interpret a survival curve from cox proportional hazard model? In this toy example, suppose we have a cox proportional hazard model on age variable in kidney data, and generate the survival curve. library(survival) fit <- coxph(Surv(time, status)~age, data=kidney) plot(conf.int="none", survfit(fit)) grid() ...
Context: I'm currently writing my bachelor thesis and have decided to focus on what factors that contribute to students that have risky alcohol habits at my university. I am planing on doing a big survey to gather data about the students habits. First Possible Approach: Since the classification problem is alcohol consu...
If data are missing completely at random (MCAR), then obviously multiple imputation (MI) won't serve its lauded function of lessening bias in your findings, since there's no bias to lessen. However, perhaps it will increase efficiency, and make an uncertain finding more certain. I know that if you do it right, then MI ...
I am assessing the relationship between a state law and a health outcome's incidence in a given state and year using multiple years of data. If I use within and between fixed effects (creating a dummy variable for each state and year) should I still adjust for potential confounders at the state level such as demographi...
I have a dataset with numerical (continuous) and categorical variables. I want to fit an artificial neural network. To do so, I have transformed my categorical variables by using the 1-of-k method, so I now have a bunch of binary variables. I am using the Neuralnet package in R to fit my ANN model. From a theoretical p...
Background: I am working with a data set that requires a transformation. It's prevalence data so I have proportions to deal with, and as the proportions are quite low, I'm using the Freeman-Tukey transformation. My aim is to perform a meta analysis on the prevalence data. I have transformed the proportions, and found c...
Given Hamming distance $H(x,z)$ between two equal length string of length $n$, define a kernel as: $$ K(x,z) = \begin{cases} 1 - \frac{H(x,z)}{n} & \text{if both x and z have the same length $n$} \\ 0 & \text{otherwise} \end{cases} $$ Question: How do I prove that it is a kernel? Attempt: It is symmetric for sure, bu...
Context: I have a dataset in which I am analyzing whether a patient having 1 disease (binary) influences the number of other diseases the patient has (ordinal; range = 0-7), which is the outcome variable. Questions: Is the number of other diseases the patient has in fact ordinal? What regression method would I use to...
I am learning how to use libsvm through sklearn.svm in python. I read here about what happens and why when you change the C value as part of your model. My intuition from what I've learned would be that lower C values would use less support vectors to make a more general classification, while higher C values would use ...
By running the following Bayesian regression model using SAS 9.4: PROC GENMOD DATA = TRAININGSET; CLASS X; MODEL Y = X /DIST = POISSON LINK = LOG; BAYES NMC = 1000 SEED = 1234 COEFFPRIOR = NORMAL; RUN; I found the following warning in the LOG window: WARNING: There is still significant au...
I'm working with a Negative binomial regression in STAN. I would like to make predictions on a test set, but looking at the reference I can't find a negative_binomial random number generator. Is there any way to do so without saving mean and overdispersion distributions and sampling from them in R ?
I'm trying to understand how loss_metric class in dlib calculates the gradient. Here is the code(full version): // It should be noted that the derivative of length(x-y) with respect // to the x vector is the unit vector (x-y)/length(x-y). If you stare // at the code below long enough you will see that it's just an // ...