instruction
stringlengths
9
38.7k
I am following this excellent tutorial: http://blog.christianperone.com/2011/10/machine-learning-text-feature-extraction-tf-idf-part-ii/ However there is one part that I do not get: If the output of a matrix multiplication in tf-idf is this [(0, -0.41, -0.41, 0), (0, -0.81, -0.4, 0)] Then how do you end up with this ...
The traditional approach to batch normalization is to estimate the mean and variance from the batch and use it to normalize the data at different layers, while keeping moving averages that you should later use at test/prediction time. My question is, wouldn't it be better to use the moving averages at training time too...
I search for a way to model future commodity prices, like heating oil and natural gas. It doesn't have to be very sophisticated, but rather easily to implement. Does anybody know a suitable approach? After theoretical examination, I plan to apply it to real data in R. Thus, implentation in a R package would be good. Th...
First, forgive my uncertain terminology. I think I have a cross-nested effect. I want to model mortgage origination in multiple MSAs (metropolitan statistical areas) vs. race, income, type of loan, etc. My basic geographic unit (random grouping) is the census tract. Each census tract exists within an MSA and within a s...
Considering we have four predict variables:x1,x2,x3,x4 and three response variables:y1,y2,y3. After learning the relationship between response and predict variables with training data, I want to obtain the y1,y2,y3 for any new given x1,x2,x3,x4. What methods can deal with this question?
Pair-copula is the way to model higher dimensional data with high complex dependencies, using only 2 varialbes at a time. Sampling from pair-copula is quite complex and need a careful understanding. The algorithm is as follows (for c-vine of 3 variables): $x_1$ = $u_1$ # Is that to start algorithm since our variables ...
I know some machine learning algorithms can output the probability of predicted labels of an input sample. For example, give a sample with three possible labels, a probability tuple (0.2,0.3,0.5) can be outputted through some probabilistic learning algorithms, such as logistic regression or probability estimate tree. T...
Why does this interpretation make sense only when we keep other variables constant ? After all those coefficient weren't learnt that way(keeping other constant), so unless there is strong multi collinearity why would we need to fix the other variables' values for this interpretation to make sense, have we not already ...
Suppose we want to explain an experiment with the following model: $$Y \sim \beta_1 X + \beta_2R + \varepsilon$$ where $X$ are endogenous variables and $R$ is a randomized treatment level. To interpret the outcome of an OLS fit of this model as causal it seems like we want to verify different assumptions: (1) $ R \per...
I am just now moving on to GLMs after the standard models. In the standard model, y = Xb + epsilon and epsilon is assumed to be normally distributed. That means we can write y - Xb = epsilon and then we can minimize the lhs using some suitable norm given the normality assumption. In a GLM, these residuals are nowhe...
I have the power consumption of 1000 companies in a city for the last one year. The granularity is by day. What I need to predict is the TOTAL power consumption of these companies for the next month by day. I am confused whether should I build models on the aggregated power consumption of these companies. If I aggregat...
I have a single time series, unevenly spaced. I would like to perform change point detection on it. Does it mean a non-parametric method is needed? Any pointers to which method would be valid? Also, it has only 70 data points. The 'change point' package in R implements PELT, SegNeigh & BinSeg, any opinions?
I came across this term while reading a research paper but could not make any sense out of the information therein. Can someone please shed some light on what exactly does this mean ? The paper that I was referring to - Models and Algorithms for Stochastic Online Scheduling by N Megow, M Uetz, T Vredeveld (2006). In Ma...
Let $\beta$ be parameters in a regression ($\mu = X\beta$), $\hat{\beta}$ the estimated parameters, and $V$ the estimated covariance matrix. I want to simulate from the posterior distribution (assumed to be multivariate normal). What is the best way to obtain (very approximate, since the posterior distribution is appro...
Say I am running a phylogenetic generalised least squares (PGLS) regression with one predictor. A model will return me a coefficient with a standard error - corrected for phylogenetic relatedness. I also know there is uncertainty surrounding the phylogeny is use, so I run the same model multiple times using a sample o...
I would appreciate if someone explains the difference in a very simple manner as I am a beginner in python and Machine Learning.
I am trying to interpret/explain a result that I obtained while generating a posterior distribution, and maybe add some informations to what I had so far. The environment that I am using is the following: Where T is my sample size. I am generating this posterior using different initial samples from which I estimate th...
I've fitted a non-exponential family GLM regression model with the response distributed as a t-distribution with $\nu$ degrees of freedom, scale $\theta$ and mean $\mu = X\beta$. We estimate $\beta,\nu,$ and $\theta$. I get $\theta = 0.6$, $\nu = 4.9$, and also my $\beta$ values. I want to check my distributional assu...
I need some hint for how we can simulate data similar to a fitted generalized additive model. In case of a linear regression model for example, consider the regression model below is fitted to a set of data with n observations: $$ y_i = \beta_0 + \beta_1x_{1i} + \cdots + \beta_mx_{mi}+\epsilon_i \quad ; \quad i=1,\cdot...
I have yield data of a crop for 10 sites and 15 years. I will try to reproduce the data here. site <- rep(c("A","B","C","D","E","F","G","H","I","J"),each=15) year <- rep(1996:2010,times=10) yield <- runif(150,1000,4000) water.stress <- runif(150,-20,20) dat <- data.frame(site,year,yield,water.stress) I model yield as...
I need a short description about a part of a general backpropagation equation. Following this excellent article: Output layer bp equation $ \delta_{j}^L=\frac{\partial C}{\partial a_{j}^L}\sigma^{\prime}(z_{j}^L) $ Where: $\frac{\partial C}{\partial a_{j}^L}$ is a partial derivative of a cost function. For example Quad...
I wonder what is the difference between these two kind of priors: Non-informative Improper
I am planning an experiment where I test whether having a picture affects whether users prefer Coke to Pepsi. (The research question is actually different, but I'm using Coke and Pepsi to simplify things) Both Coke and Pepsi come in cans and bottles, and maybe different can/bottle designs can interact with the presence...
I would like to simulate from a multivariate distribution with mean vector $\mu$ and variance matrix $V$. I am only interested in $\mu[1], ...., \mu[k]$ and their simulated values. Does it make a difference if I draw from $N(\mu, V)$, and then extract the first $k$ values, or first extract the first $k$ values from $...
I would like to perform simple linear regression on a data set ($y_i = a x_i + b + \epsilon_i$) with $N \approx 50$. However, my residuals $\epsilon_i = \epsilon_i(x_i)$ exhibit heteroscedasticity as well as non-normality. My first intuition was to perform some kind of robust regression to give less weight to outliers...
I frequently read that ARIMA models must be fitted on stationary data. But stationarity does not ensure ergodicity, which I understand is necessary to deduce population parameters from a single time series sample. Why is ergodicity not a requirement for ARIMA modeling? Do we just assume it? Also, is there an example of...
New user & first time poster. I'm finalizing my dissertation and am searching for similar examples as my project or some way to justify one of our analyses. (I'm also open to better analysis ideas for possible publication later on if anyone has suggestions). I'll try to keep my introduction to the study brief but infor...
I am currently reading a paper in which the authors are constructing an estimator for a cumulative distribution (like) function (some context here), without going too much into the details they have the following convergence result for the estimator $\hat N_n(t)$ of $N(t)$ $$ \sqrt n(\hat{N}_n(t)-N(t))\overset{\mathcal...
I am computing the following probability: $\Pr \left[ \sum_{j} (P G_j R_j) \le T\right]$, where $P$ is a fixed number, $G_j$ is a random variable i.i.d. $\forall j$ and $R_j$ is a term that depends on index $j$. Knowing that $P$ is fixed I can write: $\Pr \left[ \sum_{j} (P G_j R_j) \le T\right] = \Pr \left[P \sum_{j...
I am working in an environment where each transition rewards 0 except for the transitions into the terminal state, which reward 1. My question is, how should I define the value of the terminal state? Right now I just initialize all values to be 0, but since the terminal state has no transitions it remains 0 while the s...
In deriving ${Var}(\hat{\beta_1})$ in simple linear regression model, I came across following derivation. Why are the variances of non-random terms zero below? \begin{align} \text{Var}(\hat{\beta_1}) & = \text{Var} \left(\frac{\sum_i (x_i - \bar{x})(y_i - \bar{y})}{\sum_i (x_i - \bar{x})^2} \right) \\ &= \text{Var} \le...
Let's call a kernel function $K$ a function that satisfies $$a_i = \int_0^1 K_i(t) f(t) \; \text{d}t \qquad i = 1...N$$ I have a simulation that outputs $a_i$ and $f(x)$ (and other information) based on different inputs. I want to figure out what the kernels $K_i(x)$ are from that information. Is that possible?
As per scikit-learn's example on the interpretability of the learning curve, the following figure suggests that the SVM model requires more training examples to improve the validation score. My question is, how is the need for more training examples justified when both the training score and the validation score are n...
Say you do this in R: g <- rgamma(5000, 4) t <- rt(5000, 5) So, now you've got data from the gamma and $t$-distributions. Then you model these. I use 'gam' from 'mgcv'. m1 <- gam(g ~1, family=Gamma) m2 <- gam(g ~1, family=scat) m3 <- gam(20 + t ~1, family=scat) # add 20 to get positive values m4 <- gam(20 + t ~1...
I fit a LM model. It looks ugly, residuals are too skewed. I refit with a GLM using a skewed distribution. But now I still need to check whether this GLM fixes the skew or not. How can I do this? Use AIC to compare the two fits: if the GLM is better, it should have less AIC. Use a normal qq-plot to check the residual...
Some implementations of decision trees (eg cran/tree) can split on categorical variables where the split separates the variable into 2 groups: > library("tree") > df <- read.csv('https://forge.scilab.org/index.php/p/rdataset/source/file/master/csv/datasets/Titanic.csv') > tree(Survived ~ Class, data=df, weights=Freq, ...
Suppose $ \{ X_i \}_{i=1}^{T}$ are states of a markov chain and let $P_{\theta}(X_1, ..., X_T)$ be the probability of observing the path when $\theta$ is the true parameter value (a.k.a. the likelihood function for $\theta$). Using the definition of conditional probability, we know $$ P_{\theta}(X_1, ..., X_T) = P_{\...
In reading a blog post HERE, I encountered a comment which I'm trying to validate here. Specifically, the the blog says: In a paired-samples t-test design, the population standard deviation of the difference scores (i.e., scores resulting from subtracting scores in each group from that in the other group) is √2 times a...
Is it fair to say Cross Validation (k-fold or otherwise) is unnecessary for Random Forest? I've read that is the case because we can look at out-of-bag performance metrics, and these are doing the same thing. Please help me understand this in the context of RF for a classification problem. Thank you!
The Snitch in the game of Quidditch is famously elusive. It is hidden in one of n boxes, location uncertain, and, for k = 1, . . . , n, is in box k with probability $p_k$. If it is in box k, a search of the box will only reveal it with probability $α_k$. Now suppose a search of box i has been conducted and the Snitch h...
For OLS, $\hat{\beta} = (X'X)^{-1}X'y$, and $\text{var}(\hat{\beta}) = (X'X)^{-1} X' \sigma^2 I X (X'X)^{-1}$. I can reproduce these "by hand". For WLS, with heteroskedastic errors and weights in diagonal $W$, $\hat{\beta} = (X'WX)^{-1}X'Wy$, and $\text{var}(\hat{\beta}) = (X'WX)^{-1} \hspace{2 pt} X'W \hspace{2 pt} \t...
I have $(X_i, Y_i)$ as random vectors for $i=1,2,3,\dotsc, 10$. All $X_i$'s and $Y_i$'s are uniformly distributed. My question is about the definition of $R$ which is a random variable such that $R=1(X_i, Y_i)$. $(X_i, Y_i)$ here is a subscript of 1. I just do not know what 1 means. Thanks.
In a GLM, how should I interpret the difference between using sum of the model's Pearson residuals model's Deviance to assess the fit of my model? Is the former more "flexible" since I can estimate a dispersion parameter? I feel like the Deviance provide a more parametric assessment since it takes the form of the ML ...
So I have a large data set regarding honeybees. I have three measurements, activity count, internal temperature of a hive and external temperature outside a hive (also the time when measurements were taken, but that isn't important at this stage). Activity count is a pure count of bees. Data set looks like: Activity |...
Background and Problem I recently ran a Bayesian multivariate epidemiological meta-analysis on prevalence estimates for several disorders. This analysis included a probit-based model to deal with the individual patient data (N ~ 1600) I was able to dig up. In addition to providing an estimate of the individual prevalen...
Let's say that you have a fair coin, and someone offers to pay you a fixed amount for every time the coin shows heads, and you will lose the same amount if the coin shows tails. Once you have the coin, you're allowed to toss it as many times as you want. When you stop, the amount you receive or owe is determined based ...
I am currently learning about conditional probability from "The Book of R" by Tilman Davies and I'm having trouble understanding a conditional probability problem. The problem is as follows: You randomly draw a card, and after replacing it, you draw another. Let A be the event that the card is a club; let B be the even...
I have been trying to construct a Correlogram in R for which I have installed the corrplot package. I have been trying to combine the correlations along with the significance test so that I can visualize which of the correlations are insignificant. I have taken the mtcars dataset and have typed the following commands: ...
Suppose I have two temperatures in an experiment, $\theta_a$ and $\theta_b$, which theory predicts should be equal up to an offset. Is there a simple word to describe this relationship? I have considered the following: $\theta_a$ and $\theta_b$ are separated by a constant offset $\theta_a-\theta_b$ is constant $\theta...
I am working on a high profile manuscript which will go into a journal oriented on translational or medical science. In the paper, several ROC curves have been presented to show the performance of machine learning models in detecting a particular disease. As estimates of the performance, I have given AUC values and con...
I have solar panels and have been logging their output in a Google spreadsheet. The only data I collect is the following: Reading Date kWh Where kWh is the cumulative reading on the meter. I don't perform a reading every day, sometimes weeks or months can pass without me taking a reading. In total I have 144 readin...
Does structural equation modelling inherently test the significance of the indirect effect (i.e. the mediator)? For example, other methods of mediation such as regression use bootstrapping to test the significance of the indirect effect. I do not know much about SEM so I'm wondering whether this is tested inherently in...
I have a sample of observations (n) representing individual evaluations (positive/negative) of pieces of text (n texts). Each individual can evaluate more texts (thus there are m individuals with m < n). I would like to test if the population mean (ratio of positive evaluations) is $>0.5$. My initial idea is to comput...
In our introduction to statistical inference, the lecturer said In statistics we assume a certain type of probability model generates observed data and we use a collection of observations to estimate which particular model is most plausible, ... This does not seem sensible to me. How can one just "assume" a certa...
let $\{X_n\}$ be a sequence of random variables does having finite limit for $\operatorname{E}(X_n )$ is equivalent to convergence of sample mean $\mu_n = (x_1 +x_2 + \cdots+ x_n)/n$ ? my approach is intuitive : if a sequence converges in probability so should its mean ? m i correct ? $\lim_{n\to\infty} \operatornam...
I mean: the Huber/White/sandwich estimator of standard errors. It seems to me that, in the case of continuous outcomes, robust estimators of standard errors are rather simple, given that variance of residuals for each observation is calculated as the squared (estimated) residuals from the regression. But I can't figure...
Basically what the title says. I have run a logistic regression with an ordinal independent variable (scale from 1-7) and get an odds-ratio of 2. I am unsure of how I interpret this? Do I find the odds of being in the "yes category" of the binary dependent variable given that the independent variable is 1 and then repo...
I am using a multilevel regression model with a multinomial outcome (i.e., three unordered categories) as dependent variable, assigned the numeric values 0, 1, and 2. 0 being the reference category. The model can be seen below: My question is: Is it possible to compare the odds ratio effect size for Variable 1 on b...
Let's consider $N$ different musical instruments. For each instruments, $k$ notes have been recorded at different frequencies. $M$ audio descriptors have been extracted from every instrument and every frequency. Therefore, for each frequency we have an $N\times M$ matrix: $ A_1 = \begin{bmatrix} s_{11}^1 & s_{12}^1 &...
I have binomial outcome data with predictors that are binary factors (presence/absence) and predictors that are continuous variables. I know to scale continuous variables, but what is proper way to present the continuous variable effects beyond saying that, for every standard deviation of the variable, the log-odds rat...
I have two time series; (1) with average daily temperature (which is negative in Q1 and Q4 on some days) and (2) gas consumption of a client: A part of the process I am trying to achieve is to calculate the relationship between gas consumption and temperature. I expect the consumption to be higher on average when it'...
I have aggregated(total) youtube videos views. I have take log of that views. And calculated autoregressive koefs that can be used for the video views predictibility tests. Let say I have aggregated daily views array for each video. Koef for each video is calculated as: koef = aggregatedViews[60] / aggregatedViews[3...
Consider the generalized regression model (in my case a probit, but I'll leave it more generally): $$ E[y|X] = F(x'\beta) $$ where both $x$ and $\beta$ are ($K \times 1$) column vectors and $F$ is some function (in my case a c.d.f, and we call its derivative $f$). We can easily derivate the marginal effects as: $$ \fra...
Assume I have two points in $R^2$: $P_{t=0} = (x_1, y_1)$ and $P_{t=1} = (x_2, y_2)$ at $t=1$ I want to calculate the heading angle/orientation of the particle. Both points have measurement noise of N, and the noise is constant. To calculate the orientation: $\theta = arctan2((x_{1} - x_{2}), (y_{1} - y_{2}))$ However,...
I have an experimental treatment with 16 conditions. In each condition, subjects are given $2 and asked to divide it (in 1 cent increments) between themselves and another entity. The entity is different across conditions (sometimes it is another subject, sometimes it is a charity, etc). The objective is to find how the...
I have a study where schools' 4th graders are randomized into treated and controls (at the school level, i.e. there are treatment and control schools). Within each treated school, treatment follows a sharp cut-off rule which also allows for a sharp regression discontinuity (RD) approach. In contrast, among 3rd graders,...
I would like to make a predictive model to classify some test data set. So I'm thinking of utilizing several different models and find out the best one(by misclassification or other measures). I know that validation is an important step in the process to give us an accurate, out of sample performance. My question is, i...
Consider vector $y_t$: $$y_t = \mu_0 + \delta d_t + x_t,$$ where $x_t$ is a zero mean stationary process and $d_t = I(t \geq T_B)$ with $1 < T_B < T$ and $I(\cdot)$ being an indicator function. I have to derive mean of $y_t$ and argue whether it is weakly stationary or not. Since mean of $x_t$ is zero, we have that ...
The problem is the following: Buses arrives according to a Homogeneous Poisson with arrival tax of 5 per hour. Each bus can contain 20, 21, 22... 40 passengers with eaqual probability. Write an algorithm to simulate the number of passengers in 1 hour. Write an algorithm to obtain 500 values of passengers. I kno...
I have noticed a difference in post-hoc results produced from a repeated-measures ANOVA and a linear mixed model. Here is reproducible code: library(lme4) library(lmerTest) library(multcomp) library(agricolae) data(ham) #LINEAR MIXED MODEL WITH RESTRICTED MAXIMUM LIKELIHOOD model <- lmer(Informed.liking ~ Gender * Pr...
I have been recommended the logit link for data in (0,1) since it's interpretable... how? I am using the logit link function for data which is continuous (i.e., this is not logistic regression ... think beta regression.) That is, I have the following model$$EY_i = \mu\\ g(\mu) = X\beta \\g(x) = \text{logit}(x)$$ and $Y...
I was experimenting with the relationship between the errors and the residuals using some simple simulations in R. One thing I've found is that, regardless of the sample size or error variance, I always get exactly $1$ for the slope when you fit the model $$ {\rm errors} \sim \beta_0 + \beta_1 \times {\rm residuals} $...
While reading this awesome paper I got stuck to understand the SCST model as depicted bellow: My questions are: Are $h'_0$ and $h_0$ the same? The same to $c'_0$ and $c_o$. If not what are they respectively? By "current model" and "reference algorithm"(the second one as depicted) do you mean the same model as the s...
I am using this forum for the first time and hope to get comments on my question that I have been struggling to answer for quite some time now. My dependent variable is a bounded variable Y [0 to 1] and I am using a GLM with a probit link. This variable is measured at time t. The main independent variable is a binary ...
I have one concern regarding a time series forecast. I have panel data from which I computed the monthly mean. These monthly variables are now itself random and have a relatively high standard error and weird distrubtion (basically uniform) Now I'm wondering, what method I could apply in order to predict the macroeco...
This is supposed to be a rather rudimentary combinatorics problem, however, I can't seem to wrap my head around it. The Problem There are 40 distinct items, one person can pick (up to) 3 items. To reduce complexity, one could also assume that each person will pick exactly 3 items. For any single pair of items, I would ...
Suppose I have 3 columns and n rows. Each row represents a school and the columns represent variables of interest and have ordinal ranks (1,2,3,4....n; 1 being the best and n being the worst). Furthermore, the weight (significance) of each column is known - e.g. 0.25, 0.5, 0.25. The question is: for a given school, can...
I have some SNP data, and wanted to investigate the association between mother's SNPs and a phenotype in their children. In my model, the child's phenotype is the response variable; mother's SNP is the predictor variable. I also adjust for multiple confounders, such as mother's nutrition status during pregnancy etc. Mo...
The imputed data I have from imputedata <- mice(data, m=2, seed = 12345, maxit = 10) are different from the first 2 imputed data sets obtained from imputedata <- mice(data, m=5, seed = 12345, maxit = 10) I was not expecting this difference and was unable to find details explaining it in https://www.jstatsoft.org...
I plotted the learning curve using the false-positive rate (FPR) as the scoring function. The function was of course adjusted to reflect the lower FPR as the higher score. The resulting learning curve looks something like this: What do I make of this curve? More samples is bad? But less samples would also mean over-fi...
I have two computational methods (A and B) that have a random behavior each, i.e., if you run the same methods 10 times, you get 10 different results (usually with a small variance). To compare both methods, we selected 5 different databases (its hard to get more) and ran method A and method B, 10 times each, on each o...
I have a logistic model where I modeled an independent variable at both first order only and then as a second order polynomial (via the poly function in R). I noticed that the p-value for the IV decreased significantly from 10^-4 to 10^-77. However, when I look at the summary output for both first and second order term...
So I was asked by a reviewer to provide the "P-value" for my random forest regression model. I tried to do some research on this, and only found methods to produce p values for each split condition (like in 'party' package), and p-values for variable importance (like in 'rfPermute' package). I find it hard to trust th...
As far as I studied, the Bayesian approach is the most correct in Machine Learning. Thought, I solved an exercise where it was required to find out the decision boundary in predicting two different classes, assumed to be generated with a 2D Gaussian distibution. Here is is the Bayesian approach. The boundary is: $$C_1 ...
I have a binary feature that i want to use it with textual features i.e. one grams. I use logistic regression and TF/IDF for representing text. So i simply add a unique feature, say ss or oo, to text of each instances. But in practice, i see adding more number of these features to instances, say two oo or ss or more ge...
reading a sociology paper (https://link.springer.com/article/10.1007/s11577-015-0343-4, german) for a course today, I stumbled upon the following equation: It's supposed to describe a 2-level "random intercept" (intercept-as-outcome) regression model where j denotes a level 2 group and i denotes level 1 case within a...
I would be grateful for some input on an analysis I am doing. I am looking at medical data set. I have to main outcome variables, organ failure and mortality. I have multiple predictor variables. I have generated a cox model. I want to look at mortality and organ failure during the entire length of admission and at 3...
Can someone please give me a reference where I can find more info on the method of Poisson maximum likelihood maximization with smoothing hyperparameters Here we want to find the parameters Ws and βs are called the smoothing hyperparameter. Does anybody know what's the name of this method?
I have a dataset of about 26,000 words along with their gender tags [m, f or any]. Which ML algorithm should I use for Gender Tagging/Classification purpose. How should I go about it? What should be the input features? Given a word , it's POS tags and in some cases the singularity I am trying to predict the gender of...
I have a model that is trained on n classes and has more than 95% accuracy on the test set. The model is going to receive a mixture of images that are either from one of the n classes or from unknown classes. My guess / expectation was that in the latter case, the distribution of values on the last layer (softmax) woul...
I'm using Keras with Theano backend (for results reproducibility) which aims to give a one step ahead of a time series. It takes lagged sequences from 16 different time series (one of which is the target time series) and fits a network with an initial Dense Layer, then a GRU layer and finally a Dense Layer too receive ...
I've always had trouble understanding ANOVA (regressions make much more sense to me, and are more powerful, so why bother with ANOVA?). But I've been reading a book on the history of the gene-environment interaction debate, and I wanted to make sure I understand how ANOVA works. So let's construct some simulated dat...
What is the procedure for estimating the population covariance matrix from many incomplete sample covariance matrices? For example, say my data consist of 7 flavors of time series, A-G. My goal is to estimate the population covariance among all 7 flavors. However, each of my (many) observations and thus my sample covar...
I've fitted a regression model $$y_i = \beta_1x_i + \beta_2z_i.$$ Both $x_i$ and $z_i$ are known to have a positive effect on $y_i$. So, one would expect $\beta_1, \beta_2$ to both be positive. However, in my case, $\beta_1 > 0$, and $\beta_2 < 0$. Is this caused by colinearity? $x_i$ and $z_i$ are kind of correlated....
I have three distributions of topic obtained by Latent Dirichlet allocation: theme_1 = {cat*0.7, dog*0.2, pet*0.1}, theme_2 = {salad*0.5, fish*0.3, chicken*0.2}, theme_3 = {cuisine*0.4, food*0.3, tomato*0.3}, I need to calculate the coverage of each item in a document having a word count vector for example: d1 = {D...
I have lots of photo diodes of the same type and I want to investigate them with the help of a mixed model with R (I just made my first steps via some tutorials). First of all I would like to know how I start respectively how I specify the model. For each photo diode I have about ten measurement data points (current/am...
Suppose a sample from the normal distribution, the canonical statistic is: $\boldsymbol{t(y)} = (\sum y_i, \sum y_i^2) = (v,u)$. The distribution $f(u|v;\theta)$ forms an exponential family. In my book the explanation to this is: Given $\sum y_i = n\bar{y}$, $u$ differs only by a constant from $\sum(y_i - \bar{y})^...
I want to fit the nested linear-nonlinear Poisson models to the spike train of a neuron. How can I test the model performance by computing how much the log likelihood increase from a fixed mean firing rate model? i.e., what test can I use to see if the increase was significant? Is it possible to use the one-sided sign...
I have been doing AB tests for quite a while. I use either a Fisher Exact Test or a Welch t-test depending on if my data is expected to be binomial or Gaussian, respectively. These produce p-values which I am happy with. I also include the difference in the statistical means which is essentially the expected size of ef...
I am trying to choose which statistical test(s) to use for my study. It is a retrospective cohort study comparing the outcomes of 2 different surgical oncology techniques (Let's call them Treatment X and Treatment Y). The primary outcomes are local recurrence, metastasis, and mortality. Note that these are all dichotom...