instruction
stringlengths
9
38.7k
I'm estimating 15 parameters of my model using a Bayesian approach and a Markov Chain Monte Carlo (MCMC) method. My data after running a MCMC chain of 100000 samples is therefore a 100000×15 table of parameter values. I want to find 15-dimensional Highest Density Regions of my posterior distribution. My problem: Clust...
Say I am plotting the following interaction: mpg ~ cyl*disp (from the mtcars dataset in R). If I am interested in the effect of disp would I make disp the moderator or the IV in the interaction plot to best show the effect of disp on mpg? Would I then say: Title: Conditional effect of cyl (IV) on mpg (DV) for values o...
Background (sorry, a bit long): The log-likelihood of observations from a (simplified) exponential-family distrib look like: $$l(y) = \sum{(y_i\theta_i - b(\theta_i))}$$ and suppose that the linear predictor is canonically linked to our model and that **we have just a single parameter $\beta$ ** - i.e. $\beta$ is a s...
The paper on GANs contains the following excerpt: Early in learning, when $G$ is poor, $D$ can reject samples with high confidence because they are clearly different from the training data. In this case, $\log(1 − D(G(z)))$ saturates. Rather than training $G$ to minimize $\log(1 − D(G(z)))$ we can train $G$ to m...
I'm using PyWavelets (aka "pywt") to understand the discrete wavelet transform, and I'm trying to construct a crude power spectrum of a sinusoidal time series with frequency components of 1/8 and 1/32. The length of the series is $2^{10} = 1024$; the first 200 points are plotted below: The problem is, I can't figure ...
I have a question about the running time of the accept/reject method to sample from discrete distributions. I'm sampling from two distributions built like this: draw $n_{outcomes}$ number from an exponential distribution (Pareto with $\alpha = 2$ in the second case) compute the sum $Z$ divide each number by $Z$ That ...
The paper on GANs says the discriminator uses the following gradient to train: $$\nabla _{\theta_d} \frac{1}{m}\sum^{m}_{i=1} [\log{D(x^{(i)})} + \log{(1-D(G(z^{(i)})))}]$$ The $z$ values are sampled, passed through the generator to generate data samples, and then the discriminator is backpropogated using the generated...
I have a probabilistic function f(x) which returns True or False depending on its input x. The input x is an integer on the range [1,28] and is chosen uniformly at random. f(x) behaves as follows: If x == 15 or x == 20, return True with 50% probability otherwise False Else If 15 < x < 20, return True Else return False...
Let $(X_{1}, \dots X_{n})$ be a random sample of a random variable $X$ with pdf: $f(x|\theta) = \exp{(-(x-\theta))}\mathbb{1}_{{(\theta},{\infty)}}(x), \enspace \theta > 0$. How do I find the pivotal quantity and an approximated confidence interval with level of confidence $\gamma \in (0,1)$ for $\theta$ based on a s...
My question: should I do CV even for a relatively large data set? I have a relatively large data set and I will apply a machine learning algorithm to the data set. Since my PC is not fast, the CV (and grid search) takes sometimes too long time. In particular a SVM never ends because of lots of tuning parameters. Thus ...
I am trying to build a generalized linear model in R for some count data. Basically I have counted the number of animals per unit after having them presented with a treatment (for all units there was a 6 week exposure). That is, depending on treatment there could be more, fewer or the same number of animals after the t...
A practicing statistician I know advocates strongly against cross-validation, claiming that he would rather build the model on the entire dataset and make sure the underlying statistical assumptions are rock solid, as opposed to cross-validating his models. With solid statistical foundations, he argues the models shoul...
Let's say we have a neural net with: 5 input neurons some arbitrary amount of hidden layers 3 output neurons Let's say we're using minibatches of size 32. So, if we input a 5x32 matrix into the neural net, we will then get out a 3x32 matrix of output activations. Assume we are using a simple MSE loss function. We ...
What is the difference between repeated measures data and longitudinal data? My answer I think that for repeated measures data, the dependent variable can be measured more than once for each observation, but each time that is measured, it can be of form regardless or not. In longitudinal data, the dependent variable a...
I have a prediction tool which ranks 56 models of proteins based on computation. I also have the correct ranking of those structures based on the closeness to actual structure of the protein. If I rank the structures based on my prediction method and compare them to the correct ranking, say 5 of top ten structures in t...
I want to make a hypothesis test about equality of survival curves. The curves below are from Kaplan-Meier estimate. I read in some place that when there are crossing survival curves the Log-rank test it is not appropiate. What test I should use in this case?
A discrete probability distribution has the following property $$ P(X \ge x) = {x^{- E(x)}} $$ where $x$ is a positive natural number and $E(X)$ is the finite expected value of the distribution. This is a power law distribution where the exponent turns out to be the expected value of the distribution. Question: I am ...
Recently I'm helping a company building a model predicting if the web visitor is a potential high value customer based on visitor's web behaviors. To make the model easy to understand, I suggested to start from a decision tree model. However, the technical leader in the company asked one question: Why not just find pas...
I'm doing a dimension reduction, I would like to know which approach is separating better the classes, and How I can measure this? I have two approaches: How can I prove that my approach is separating 'better' than with PCA and How I can see which classes are more entangled with another. P.s.: I don't want to use any c...
I am calculating inter-rater agreement between two scales. If I have two scales which measure the same concept but are slightly different in length (the technician questionnaire is a few questions longer than the patient questionnaire) do I need to standardise the scores first? If yes, would you just z-score it? And, w...
I just watched 2 different tutorials and there were 2 different formulas used 1.Z=(X(Bar) - mu )/Standard Deviation 2.Z=(X(Bar) - mu )/Standard Error Please let me know what is the difference, and which one is correct ? Thanks
Now I'm having a hard time having a grasp on the difference between fixed and random effects of regression models. I believe I understand it's recommended to use random effects if you consider heterogeneity of slopes, when the data is nested among hierarchical levels, etc. But here's the question. Why don't we just pu...
We know that standard error is the standard deviation of the sample mean from true mean. If we assume that our population follows normal distribution then the distribution of sample mean will follow t-distribution where every point of t-distribution along the x-axis is the set of possible sample mean one can get for ev...
I'm building a sentence classifier with a Convolutional Neural Network (CNN) architecture. I would like to do the word embedding outside of my CNN using a pre-trained model such as GoogleNews (which is based on word2vec). I'm wondering if it is worthwhile to add part-of-speech information to this model and if so, how? ...
Stock prices are not stationary processes during all week or all day. For example EURGBP has low variability at night in Europe but during working hours is changing much more dynamic because of market liquidity. I want to collect history data (15 minutes interval), calculate ARIMA coefficients and get prediction in R. ...
I recently encountered the following problem. Suppose I want to predict y from X with regression analysis. The data is given in groups (for example by country). My assumption is that some groups are very similar and can be learned together but others are very different. I don't have enough data to do regression for ea...
I am trying to prove that $2^n = \sum_{k=0}^{k=n} \binom{n}{k}$ using $\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}$. (Exercise v-a in Appendix 1 of Jim Pitman's Probability.) I prove it by induction and in the final step I end up with terms $\sum_{z=-1}^{z=p-1} \binom{p-1}{z}$ and $\sum_{k=0}^{k=p} \binom{p-1}{k}$...
the OLS estimators of the short-run parameters are $T^{1/2}$ consistent. What is the$T^{1/2}$ consistent ?
Sample of a 25 soldiers was asked if they eat a breakfast daily And necessery to find probabily distrubution where the proportion of soldiers that eat a breafast daily will not be different more than 0.3 from a mean. Solution : I use a $ \widehat{p} $ parametr - sample proportion , sample size is $n=25$ , $\widehat...
I was wondering if anyone had recommendations for papers or resources on bayesian analysis of frequentist hypothesis testing and use of p-values? Brad Efron has this quote One definition is says that a frequentist is a a Bayesian trying to do well, or at least not too badly, against any possible prior distributi...
Let $Z$ and $X$ be a real-valued random variables. Is it true that $\mathbb{E}[Z|X](\omega)=\mathbb{E}[Z|X=X(\omega)]$ ? If so, why ? P.S : I'm looking for a rigorous mathematical proof, not intuitive examples.
I have some troubles trying to set up a multilayer perceptron for binary classification using tensorflow. I have a very large dataset (about 1,5*10^6 examples) each with a binary (0/1) label and 100 features. What I need to do is to set up a simple MLP and then try to change the learning rate and the initialization pat...
I was reading Think Bayes book and chapter about Approximate Bayesian Computation where the author uses a bayesian approach to calculate mean $\mu$ and standard deviation $\sigma$ of height in US population (which is assumed to be normally distributed). It starts with a uniform prior of hypotheses $(\mu_1,\sigma_1),(\m...
I am having a lot of trouble understanding how best to check for over dispersion in a model with many possible explanatory variables. I have a data set consisting of one response variable and 4 continuous variables. (Insurance claims as response, accidents, population, population density, no. people killed as possible ...
The initial function of log-likelihood of multinomial probit model with $J$ alternatives: $ ln \ell=\sum_{i=1}^N\sum_{j=1}^{J-1} y_{ij} \cdot ln \Phi(\sum_{k=1}^Kx_{ik}\beta_{kj})+ ({n_i-\sum_{j=1}^{J-1}y_{ij}}) \cdot ln[1-\sum_{j=1}^{J-1}\Phi(\sum_{k=1}^Kx_{ik}\beta_{kj})]$ Then, the first derivative of $\dfrac{\parti...
Some distributions are said to be heavy-tailed. It seems that one definition of a heavy-tailed distribution is that its tails are heavier than the tails of an exponential distribution. However, how does one exactly define the tails, since the different distributions have different numbers of parameters? I suspect that ...
I'm analyzing data from an experiment where participants responded to a large set of stimulus. Such stimuli were divided intro three experimental conditions. The dependent variable was the response time. My doubt is how to report mean response times if I'm analyzing the data with linear mixed-effect models. When I anal...
Background: When we consider a continuous random variable $X$ and consider some independent realisations of $X$, I am told that the realisations must be unique since $\text{Pr}(X=x)=0$. When we consider the long run frequency interpretation of probability, where $\text{Pr}(A)=\frac{\text{ Number of times you get event ...
I have a choice variable, which is either A or B or C. But apparently C is hardly chosen. And for me it seems like it more "happens to be chosen". I want to estimate which some continuous covariates, whether or not number A or B is chosen. But the mere presence of "choice alternative" C (even if it has only very few o...
1) Could you enumerate few main reasons for weak (statistically non-significant, like p > .05) results ? After running multiple regression analysis. 2) There is one construct, which plays a role of a dependent variable. However that construct composed of several attributes (measured on ordinal scale), thus there are se...
Suppose $X$ is random variable with PDF $f(X)=2(x-1)$, $1 \le x \le 2$; $Y$ is a random variable with a triangle pdf with minimum at $2$, mode at $2.5$, and maximum at $3$. Is it possible to define a random variable like $Z$ which is the summation of $X$ and $Y$? ($Z=X+Y$, $X$ and $Y$ are independent) In this situati...
I'm reading David Barber's book on Bayesian Reasoning and Machine Learning. At Section 9.5.4 he covers Chow-Liu trees, and I am having difficulties understanding the flow of the equations after he introduces KL divergence as a way to find the best approximating distribution. I have typed out the problem below. Consider...
If the formula for a hypothesis test is $$ z = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{\sigma^2_{x_1}}{n_{x_1}} + \frac{\sigma^2_{x_2}}{n_{x_2}}}} $$ And the variance for a binomial variable is given by the equation $$ \sigma^2 = np(1-p) $$ Then why is the sum of the variances given by $$ \sigma_{x_1 - x_2} = \sqrt{\f...
I want to predict the outcome of one data row and accuracy of the model is 50%, so if I re-predict it for 3 times in a row then what happens to the accuracy? Will it be 87.5% (50+25+12.5)? Or will it remain 50%? I am working with decision tree for supervised learning. I am extracting parameters from image from a sa...
Edit: changed the title, removed call for opinions This post compares several methods of encoding categorical data. Binary encoding (convert categories to integers, then to binary; assign each digit a separate column) seems to provide the best combination of predictive accuracy and dimensionality control. However, the...
Suppose we have a random vector $\mathbf{X} = (X_1,\ldots,X_n)$ or sample with pdf or pmf $f(\mathbf{x};\theta)$, where $\theta \in \Theta$ is an unknown parameter (or vector of parameters), whose specification completely determines $f(\mathbf{x};\theta)$. As far as I understand, a statistic is just a a random variabl...
Kruschke's Bayesian book says, regarding the use of a beta distribution for flipping a coin, For example, if we have no prior knowledge other than the knowledge that the coin has a head side and a tail side, that’s tantamount to having previously observed one head and one tail, which corresponds to a = 1 and b =...
I'm using python's statsmodels VAR library to model financial time series data and some results have me puzzled. I know that VAR models assume the time series data is stationary. I inadvertently fit a non-stationary series of log prices for two different securities and surprisingly the fitted values and in-sample forec...
I have a binary response variable that was measured at irregular time intervals for a number of individuals. I want to fit a GLMM that accounts for the time-series covariance within individuals. I know that this is possible for Gaussian response variables by using the corCAR1 autocorrelation structure in the nlme pack...
I want to apply the unit root test to the original equation before writing it in the Dickey-Fuller form. The original equation is: $$ Y_t=b Y_{t-1} + u_t. $$ I want to test for unit root directly by testing if $b=1$. I read in Enders's book "Applied Time Series Econometrics" that this is equivalent to the Dickey-Full...
Given a bag of six marbles with two colors, red and blue, what is the probability of drawing a set of three such that there is exactly one blue? In the past, when given a problem such as this I would construct a tree diagram at each decision point and manually count the number satisfying the condition. But as examples...
Usually, the validation error is higher than training error, but are there any cases when they are equal?
A manufacturer has developed a new type of bicycle frame which will be sold with a 2-year warranty. To see whether this is economically feasible, 20 prototype frames are subjected to an accelerated life experiment to simulate 2 years of use. The proposed warranty will be modified only if fewer than 90% of such frames w...
Sensitivity is given the disease, the test is positive, i.e. $P(T^+ | D^+)$. Suppose the sensitivity of a test is 0.99. Then $1-P(T^+ | D^+) = 0.01$ But what does this $0.01$ represent? $P(T^- | D^+)$ or $P(T^+ | D^-)$?
I've made this Bayes net based on a problem and I'm trying to find the probability of W but I'm stuck. I know I probably have to use Bayes theorem backwards through to find $P(W)$, but I'm not sure how to go about it. Any hints would be greatly appreciated.
I was provided with the following: $X_1,\ldots,X_5$ are independent random samples from a distribution with mean $5$ and standard deviation $3$. Then I was asked to find the mean and standard deviation of $\bar{X}=\frac{1}{5}\sum_{i=1}^5X_i$. Where I am at so far, the mean is still 5, and then to get the sd in it the ...
I am investigating animal behavioural states using Markov Chains, and want to test differences in the transition probabilities between my control and impact groups. However, I’m worried about small sample sizes and choosing the correct test for comparing proportions. I have five possible behavioural states for a ‘cont...
Suppose that I have bivariate data, and I need to model the bivariate dependence structure using a copula. Suppose further, I do not know what the best-fit copula family to my data is. Hence, I can use any selection method such as AIC or MLE and so on. To use these methods, I need the estimated value of each copula fam...
Let's say that you want to build a model that predicts two possible outcomes with a probability for each. To be clear, i'm not talking about a problem where the target variable is binary and you want to model p(x=1) vs p(x=0). I mean the target variable can take on any value, but has a bimodal distribution. Rather than...
I'm a total newbie here. Hope this makes some sense! I have a two-dimensional dataset. One dimension is composed of unordered strings. At the moment, they're not important. For all uses and purposes, they may as well be random strings. The dimension I'm interested is composed of monetary floating point numbers. What I'...
I'm trying to use an algorithm to determine which of many metrics is the one with the largest excursion value from a baseline dataset. For simplicity, let's say I have two measurements. MetricA has a historical value of 20%, 1 std deviation= 5%. MetricB has a historical value of 0.2%, 1 std deviation=0.2% Both measurem...
I was reading the book by Ross on Stochastic Processes. In the chapter of renewal process while proving elementary renewal theorem they showed $\liminf_{t\rightarrow \infty} (m(t)/t)=1/\mu$. Here $m(t)=E(N(t))$ where $N(t)$ is the counting process and $t\in(0,\infty)$. Now as $t\in(0,\infty)$ $m(t)/t$ is not a sequenc...
I have a number of different groups (on the order of 100). Each has many members (on the order of 1000) but the groups are all different sizes and range from 100 to 1000+ in size. Each of these groups is divided into a control set and a test set. The control set did not receive a treatment, and the test set received...
Can any one explain me how can I choose the pen.value and penalty for the single change point detection i.e., for At Most One Change (AMOC). Is there any books that contains rich explanation of these parameters?. I'm not able to figure out when exactly to use what. It would be helpful if you explain it with an example....
Inside modern computer, there are thousands of performance counter events that can monitor various utilization such as cache bandwidth, I/O bandwidth, CPU stall cycles, etc. Usually, with any application, there are a few parameters that we can configure to get different results. I want to detect which performance count...
I am repeatedly surprised by how often these three things appear while any ML discussion is there: Log-Likelihood: I understand the max likelihood principle, why log? Softmax: Why softmax everywhere? Is it tied to log-likelihood in any way. Sigmoid: Why sigmoid function only in NNs? Please help me understand/direct m...
Let's assume a stochastic simulation or test with a control variable. The task is to visualize the distribution to demonstrate the effect that is being researched. The objective is to get smooth plot, without losing the resolution on important effects. For smoothness the plot needs to be interpolated. Simulation or tes...
Are there any heuristic/theories showing that on what kind of Bayesian models the convergence of Gibbs sampling is fast/slow? For example, from my limited experience, I feel (may be wrong) when a model has many "triangle relations" (A->B, A->C, B->C), the convergence is likely to be slow. The practical value for this ...
I am struck with seemingly easy problem, but I haven't found a suitable solution for several weeks now. I have quite a lot of poll/survey data (tens of thousands of respondents, say 50k per dataset), coming from something I hope is called complexly designed survey with weights, stratification, specific routing and so o...
First, let me set the scene. For each AFL match played, the umpires of that match decide who they deem to be "best and fairest" players on the ground. They allocate 3 votes to the most deserving player, 2 votes to the next deserving and 1 vote to the 3rd most deserving player. Towards the end of the season these votes ...
I have time series data on temperature, both hourly and daily. I want to forecast the time series. Is it possible to combine ARIMA model and Exponential Smoothing methods to achieve the goal? Would this be feasible? auto.arima(afex_d) ets(afex_d) auto.arima(ets(afex_d)$fitted) Edit (new information from a comment): I ...
I am in the process of learning machine learning/regression on the job so while I have some basic understanding of the algorithms, I'm a beginner so please go gently on me. For what it's worth, I've read An Introduction to Statistical Learning cover to cover and feel I have a good understanding of the concepts. I've al...
I have been studying SVM lately, following Andrew Ng's CS229 lecture notes. I can understand most of the notes. But for the case where the KKT condition is satisfied at alpha = C, I am not sure what that means. I know that for alpha = 0, the KKT condition is satisfied with inequality constraint, namely, the point lies ...
I have 45 coral colonies undergoing three different treatments (n = 15) and surveyed their average survival after 1,2 and 3 months. I believe I cannot use Kaplan-Meier, as I do not know the exact time of death. In addition, mortality was low and usually only partially (e.g. 20% of a colony). The survival data look some...
I'm using a Gaussianity assumption over 500-dimensional data in my work and I wanted to check the validity of my assumption. I developed a transformation that relies on this assumption and I have good results (I work on face recognition) that's why I wanted some statistical validation or if it can be improved using for...
Suppose we have a bunch of marginal distributions $$F_1,...,F_n$$ which have some unknown joint distribution. My understanding of the importance of copulas is twofold: By always using the Probability Integral Transform to map our marginals to a multivariate distribution on $[0,1]^n$ with uniform marginals. It means t...
I have data that turn out to be describable by a lognormal distribution. However, I feel like the peak value (mode) of the lognormal distribution would be more representative of the data points. Is there an analytical expression for this, and what kind of dispersion measure would be most suitable to report along with i...
To begin with, I must admit, I am completely new to statistics. There are many discussions on CrossValidated on the optimal ways to compare the central tendency of two independent populations, which violate normality and homogeneity assumptions. Among the most useful threads I may cite the following: Mann Whitney test ...
I am trying to do theoretical calculations for a problem where I have microRNA of size 20, with a probability of 0.7 of getting a purine, if I have 100 of these microRNA what is the probability that the average number of purines will be greater than 15. I am not allowed to use monte carlo on this. I had been thinking s...
Can explanatory variables determine standard error of the intercept and the coefficients in a least squares regression? if we have more explanatory variables, standard error is going to be small?
While studying Gaussian copulas, I have stumbled accross a question which seems to result from wrong reasoning. In the arguments below, where have I gone wrong? Let $c(u, v)$ denote the density of the bivariate Gaussian copula: \begin{equation} c(u, v) = \exp(\alpha + \beta \Phi^{-1}(u) \Phi^{-1}(v) + \gamma (\Phi^{-...
I've been asked to run a model using gradient boosting or random forest. So far so good, however, the only output that comes back in terms of variable importance is based on the number of times a variable was used as a branch rule. I've now been asked to basically get coefficients or somehow quantify the impact that th...
All examples I've seen for predicting $P(B|A_1 \& A_2 \ldots \& A_n)$ assume that $A_1$, $A_2$, etc., are all mutually exclusive. What if I want to predict $B$ but have overlapping $A$'s? For example: B = it rains given A1 = there are clouds in the sky A2 = humidity level is over 80% A3 = it is currently "the rainy ...
I have derived intraclass correlation coefficient (ICC) values to determine interobserver agreement between three judges, using three separate methods. Using method A, I am getting ICC 0.918, method B gives me 0.78, and method C gives me 0.847. I want to know if the ICC from method A is indeed higher statistically than...
Imagine that I measure 9 times a certain physical properties (which I know its exact value is 11) and the outcomes are: $$X_i = 10, 11, 11, 10, 11, 12, 10, 11, 12$$ If I analyse $X_i$ as a random variable I can compute it's expected value and variance as it follows: $$\mathbb{E}(X_i) = \frac{1}{9} \sum X_i = 11$$ $$Var...
I am new to machine learning and I wanted to get a feel of neural networks by constructing an identity DNN. It takes an one hot vector say [1,0,0,0] and should output the same one hot vector [1,0,0,0]. I am stuck with this seemingly trivial problem for quite a few hours. No matter what I do, the network doesnt seem to ...
I might be misunderstanding something, but are poisson or negative binomial models with an offset term for population size (rate models) and independent variables that are rates as well endogenous? In other words, is the denominator directly correlated with all of the independent variables concerning population? Probab...
There are already posts about warnings from R dealing with logistic regression and linear separation such as this one. I just wanna make sure if in Python Scikit Learn this problem is all solved by the L1/L2 regularization part in the optimization function. In other words, it's safe to say users will not get any infini...
Conventional logistic regression expresses log odds as a linear expression of predictors, i.e., $\beta'x$. And the problem reduces to using linear classifier $\beta'x=0$ to classify. But sometimes the training set is apparently nonlinear (may be tested using linear programming), for example, if I even visualize two alm...
Assume X $\sim$ Np($\mu$;$\Sigma$), where we know that $\Sigma$ is diagonal. Given an independently identically distributed sample of size n, how can I find a Maximum likelihood estimator for $\mu$ and $\Sigma$?
I have a response variable that I would like to explain with several predictors. The response variable is all positive continuous data. Some of the predictors are discrete while others are continuous. I plot the density of the response and visually these look very much as a Weibull distribution. In R I use fitdistr to...
I will be doing a logistic regression to determine if a number of variables influence whether or not a patient received a certain health care service. I will likely have approximately 500 or so observations, and there will likely be far more zeros (patient did not receive service) than ones (patient did receive service...
Playing around with the Boston Housing Dataset and RandomForestRegressor (w/ default parameters) in scikit-learn, I noticed something odd: mean cross-validation score decreased as I increased the number of folds beyond 10. My cross-validation strategy was as follows: cv_met = ShuffleSplit(n_splits=k, test_size=1/k) sco...
Much is being made today about the effect of exercise on BMI in young people today. A study was conducted to assess the factors affecting exercise. Study participants were asked ‘How many minutes per week do you participate in moderate or vigorous exercises.’ One of the study questions focused on what factors might co...
I used to think that "random effects model" in econometrics corresponds to a "mixed model with random intercept" outside of econometrics, but now I am not sure. Does it? Econometrics uses terms like "fixed effects" and "random effects" somewhat differently from the literature on mixed models, and this causes a notoriou...
I'm writing a code to fit some data (with x_errors and y_errors) to a model with three parameters a, b and c, using the ODR method with scipy.odr. The fitting procedure is good enough, however I find that the standard errors on the estimated parameters out.sd_beta are different from the sqrt of the diagonal elements of...
Consider a linear model $$y = X\beta + e$$ One can express the estimator for $\beta$ as $$\hat{\beta} = A^Ty$$ It is stated in Hansen's Econometrics that $$\mbox{Var} (\hat{\beta}|X) = \mbox{Var} (A^Ty|X) = \mbox{Var} (A^Te|X) = A^T D A$$ where $D$ is variance-covariance matrix with variances of error term on the diago...
Background: I am performing a pattern matching on some data which is being generated real time. I perform the pattern matching on this newly generated data at every 1 second. Every time a match is performed by the pattern matching algorithm, it gives me the value of best match along with some statistics on how good the...
Must the graph of a linear model always be a straight line of the form $y=mx+b$? I think that yes, but am checking, whether there might be some exceptions.
Background: I have a gene expression dataset (p=6000) which I am using it to predict weights of participants (n=31), with elastic net in glmnet package in R. To estimate the bias of the model, 10-fold cross validation is used: the model is built in training set and the error (residual = actual weight – predicted weig...