instruction
stringlengths
9
38.7k
Trying to understand GNNs better, I copied the code from this blog post from PyG documentation. I copied and pasted the code without modifications, which works as described in the post. It is a link prediction on the MovieLens dataset. After the training loop with a reasonable accuracy score, I want to use the trained ...
I have a question regarding the significance testing of an adjusted odds ratio vs. the significance testing of the adjusted difference between two proportions using a z-score. This is following the running of a logistic regression. Anecdotally the p-value obtained from testing the odds ratio is smaller, but I don't kno...
I'm currently reproducing a method on my data set. In the literature, training and test accuracies are generally high, mostly between 90% to 99%. I get a training accuracy of 100% and a test accuracy of 100%, too. I used SVM and k-NN with same results. However, I believe that something is not right ;) The type of data ...
If you can explain these, it will be highly appreciated! Thanks in advance 1)Here is the code S3 method for class 'formula' randomForest(formula, data=NULL, ..., subset, na.action=na.fail) ## Default S3 method: randomForest(x, y=NULL, xtest=NULL, ytest=NULL, ntree=500, mtry=if (!is.null(y) && !is.factor(y)) max(floor(n...
I am performing analysis on data of ~8,000 patients who have COVID. This is my scenario. I have information of each patient being classified as either severe or non-severe in how COVID-19 affected them. I also have a set of all the mutations that each patient had. Thus, I generated frequencies as such: Frequency = P(Ha...
I have panel data with an ordinal outcome that was assessed by two independent reviewers - i.e. each is unaware of the others' assessment. The time points for assessment are not necessarily concurrent, and the lengths of the series are not necessarily equal. Specifically, there are 4 possible levels where the 4th level...
I am taking a class and we are about to talk about Kalman filters and smoothing and I am trying to do some reading ahead. On the Wikipedia page for 'Smoothing (stochastic processes)' it says 'the smoothing problem (not to be confused with smoothing in statistics, image processing and other contexts) is the problem of e...
"Overfit" is a commonly discussed concept in ML community. However, I tend to feel that there might be abuse of using this terminology. I wonder what it means when we talk about overfit, especially when we are talking about "overfit on some data". Specifically, I learned that the text-book definition (from Elements of ...
I have a glmer model in R that does something similar to correct_response ~ time*kappa_score + (1|pid). Because I generally prefer plotting in python, I save model coefficients and emtrends data to disc and want to plot the interaction of time & kappa at two time points as a function of kappa. To do this, I am currentl...
I have taken body temperatures of 5 hens in March 2022 and body temperatures of the same hens in July 2022. I have also measured egg production, feed intake, and body weight for both months. I am trying to show that high environmental temperatures alter the hen's physiology, behavior, and egg production. Please help...
For my thesis I am analysis habitat use of animals. I want to compare habitat selection coeficients between groups, for instance between males and females or between different places. But I do not know of a statistical method that can do this. Does anyone know? Most habitat selection functions are based on clogit. Howe...
I have two main independent variables - gender (0/1) and extraversion (continuous) in a logit regression. In the full sample, the gender X extraversion interaction shows no statistical significance. However, when I split the sample into male vs female subgroups, extraversion is statistically significant (p<0.05) among ...
I have a question about the Diebold-Mariano test. I have different forecasting horizons (n-ahead = 1 to 40) and different forecasting origins (26). I.e. I employ a rolling origin evaluation approach. I want to compare the forecasting results of two empirical models. Now, should I: Compare all n-ahead=1 forecasting err...
Every day, I keep track of the processing times for each input to my CPU and create empirical cumulative distribution functions (ECDFs) based on this data. Let's assume I have 100 observations per day and I do this process for 10 days, resulting in 10 ECDFs each of which with 100 points. Now, the challenge is to estima...
I recently learned log-transforming a variable and it helps when our data is skewed. But, I also learned that the normality assumption of the data/variables is not required. The only requirement is the error being normally distributed. In that case, why would one log a variable? I used to think it was because the data ...
Scenario: Rats with condition and treatments. The response measurement is a gold standard measure of the condition. However, uncommonly, rats can die during the study. That means, technically, those rats are "censored", since the study goes on. It is not a survival study, so survival isn't the outcome. However, time is...
I am new to probability, and I am struggling with the right language to ask or google this question. I have a population of size $n$ and everyone is say some color. I want to verify that at least half the population is red to within some $\epsilon$ accuracy. How many members of the population do I need to query? I am n...
Originally asked on StackOverflow and now brought over here upon recommendation from another commenter. I'm an undergrad writing a very simple lab report in which I'm analysing some data on observed numbers of birds at two different study sites. I'm using R 4.2.2 to create the code to run the analysis. The exact data f...
EDIT: SOLUTION FOUND, SEE BELOW QUESTION I'm an undergrad writing a very simple lab report in which I'm analysing some data on observed numbers of birds at two different study sites. The exact data frame I'm using was imported off an Excel spreadsheet but I'll replicate the data frame here. Location <- c(rep("Leighton ...
The question "Develop a hypothesis, and constructed appropriate null and alternative/experimental hypothesis. a) Hyacinth bulbs are sold to a retailer in packs of 100 which claim to have equal numbers of bulbs producing blue and pink flowers. Test at the 10% level of significance whether the retailer has a right to com...
In a comment on this question, the user 'probabilityislogic' says "No, not MCMC this thing! Quadrature this thing! only 2 parameters - quadrature is the "gold standard" for small dimensional posteriors, both for time and accuracy". However I haven't been able to anything describing how to draw random variables using qu...
Suppose I extract $n$ samples $x_i$ from a Bernoulli distribution $$x_i \sim Bern(p)$$ Based on the samples, I want to estimate the probability that $p$ is below a certain threshold $t$ $$P(p<t \space | \space x_1,\dots,x_n)$$ How do I go about it?
I've looked into the Delta method and it looks tedious. I understand the computational performance gain to help when the dataset is quite large. I only have 200 individuals contributing data, so I believe that the bootstrap approach should be viable. Could I get a pseudo-code approach to defining a power analysis funct...
can you please explain in principal component analysis (PCA), why maximum variance means minimum information loss?
I have a population data. I observe two clusters in the distribution of one continuous variable from this population. I can easily group my data into two clusters with a threshold on this variable. I also have a hypothesis about these two clusters such that I expect another variable X to be significantly different betw...
Does anyone know of any references that show a proof of Minimax Lower Bound on Mean Squared Error for the average treatment effect in a Bernoulli randomized design? Take a population of $n$ units for which we apply a treatment $Z$ drawn from a Bernoulli distribution, independently for each unit ($Z_i \sim Ber(p)$). The...
I am analyzing adverse events rate in two groups, treatment and control group. There are about 10 different adverse events. Most of the rates are not significantly different between these two groups, however, the rates are systematically higher in the treatment group. What does that mean? Is it related to sample size? ...
I know that we want to have uncorrelated variables at the end if we apply the PCA. But, can you please explain why we want to still have the maximum variance?
I want to classify 120k customers into 5-6 clusters basis the product usage, say, hundreds of product features clicked and hundreds of product pages viewed. The data will be like a customer_id has clicked feature_1: 500 times, feature_2: 300 times, etc., viewed page_1: 200 times, page_2: 300 times, and so on in a timef...
I would like to ask it dose not require to consider the correlation of variables if using Gaussian mixture model for clustering, because covariance has already been considered in the model. So the further question is that MFA (Multivariate Factor Analysis) adds rotation based on PCA (Principal Component Analysis), whic...
One can find the distribution of $X+Y$ where $X$ and $Y$ are independent random variables using this formula $$f_{X+Y}(a)=\int_{-\infty}^\infty f_X(a-y) f_Y(y) dy$$ I'm wondering how to adapt this formula to find the distribution of $X-Y$. Is that correct? $$f_{X-Y}(a)=\int_{-\infty}^\infty f_X(a+y) f_Y(-y) dy$$
I am having confusion on how to evaluate and compare the quality of different regression models. For example, I understand that classification models are more straightforward to compare and evaluate as metrics such as F-Score, AUC/ROC, Confusion Matrix are all bounded between 0 and 1 . However, in regression models, ...
An energy-based model parametrized by $\theta$ is defined as $$ p(x; \theta) \propto \exp(-f(x; \theta)) $$ For my specific case, it is that $f(x; A, y) = - \langle x, Ax \rangle - \langle x, y \rangle$ and $x$ is over the hypercube $\{ -1, +1 \}^N$. I am looking for an efficient way of computing the expected value (ba...
let's say I have a project which involves predicting the likelihood of whether a specific project will meet their sales target or not. So, I have 2000 project records from Jan 2020 to Apr 2023. Some of this have already met their sales target in different months of 2022 and some are still in progress. So, now I am in t...
I have time series data at weekly level with 4 levels. Level 0 - Time Week on week Level 1 Job type - Day,Night etc Level 2 Location - Location to which job belongs Level 3 County - County under which location falls Population data is available at location level. unemployment data is available at county lev...
Suppose we have a table of a group of friend's preferences for food. Each person will receive a unique meal. What is the approach to sample from this preference table so that each time this group visits the restaurant, we satisfy their preferences based on these probabilities? The sums of the rows add up to 1, but sinc...
While correlating two variables, which have different number of samples in each, how can I find the df? Eg. Sample-A has 35 observations, Sample-B has 22 observations, How to calculate df (N)-2? Whether 35-2 or 22-2?
One metric used to measure the efficiency of sampling in monte carlo sampling (given a dataset of size $n$) is the effective sample size $N_{eff}$. *The efficiency of a sampling procedure depends partly in the effective sample size ESS for a raw set of N samples. The ESS is denoted by $N_{eff}$. In inverse transform s...
Assuming a sample $X_1, X_2, ..., X_n$, the sample variance is calculated as $s^2 = \frac{1}{n-1} \sum (X_i-\bar{X})^2$ The fact that there is $n-1$ in the denominator instead of $n$ is called the Bessel correction and ensures that $s^2$ is an unbiased estimator of the variance $\sigma_X^2 = \langle X^2 \rangle -\langl...
I am starting to conduct a meta-analysis on the effect of different raw materials on pellets quality (for bioenergy purposes) I have already the database of studies and my idea initially was to calculate standardized mean difference effect size using the value of "alternatve biomass" pellet (treatment) compared with th...
I am running a generalised mixed effect model with a binomial response for my thesis. The model estimated the chance an a subject in a certain group is a female. My final goals is to compare the groups by doing pairwise comparisons between the estimated marginal means. I use hunting season as a random effect since I as...
Good morning, I am currently following a class on Biostatistics and am currently struggling on an exercise. I am given 2 graphs $G1$ and $G2$. Then, assuming that $G1$ represents a NPSEM-IE, I have to either show that $G2$ also represents a NPSEM-IE or give a counter-example. First of all I am not sure about the model ...
I have the dataset: structure(list(n = c(0L, 3L, 0L, 0L, 1L, 1L, 4L, 1L, 0L, 1L, 0L, 1L, 2L, 0L, 2L, 2L, 1L, 1L, 2L, 0L, 1L, 1L, 1L, 2L, 3L, 1L, 0L, 2L, 5L, 1L, 0L, 1L, 4L, 0L, 0L, 3L, 0L, 2L, 2L, 1L, 2L, 2L, 1L, 4L, 1L, 0L, 1L, 2L, 0L, 1L, 1L, 3L, 0L, 0L, 1L, 0L, 0L, 1L, 0L, 0L, 2L, 0L, 0L, 2L, 0L, 2L, 3L, 1L, 2L,...
What is the critical value for pearson correlation df=190? The total number of samples is 192, so df is N-2 = 190. The tables have critical values for df 100, 150, 300, 500, 1000. If the df (N-2) falls in between (e.g. 145, 395, etc., which critical value should be considered to judge whether it is significant or not. ...
I have the following model (simplified here for the description). The obsvered variable is $y_i$ which is a linear function of some random variable $\eta_i$ and a random error term $\epsilon_i$: $y_{i} = \eta_i + \epsilon_i$ Now, $\eta_i$ is also a linear function of some random variable plus another random error term:...
Suppose I have 2 random variables: $X\sim \textrm{Bin}(m,p_1)$ and $Y\sim \textrm{Bin}(n,p_2).$ I want to find the distribution of $S=X-Y$ using the probability generating function ($PGF$) treating $S$ as a function of random variables. $$G_{S}(z) = G_X(z) G_Y(1/z)$$ Using the PGF for a single binomially distributed ra...
I'm trying to understand how a continuous Hidden Markov Model works and I am confused by the difference of the hidden states of the discrete latent variables and the mixture components in the emission probabilities. Initially, I was under the impression that the hidden states of the discrete variable corresponds to the...
I am trying to use mahalanobis transformation on a single variable that is autocorrelating with itself in a time series that goes from week to week over several years. The mahalanobis transformation is defined as this: "If S > 0 then S^(-1) has a unique symmetric positive definite square root S^(-1/2) The Mahalanobis t...
Suppose we observe the vector-matrix pair $(y,\mathbf{X})\in\mathbb{R}^n\times\mathbb{R}^{n\times d} $ which is linked by the observation model: \begin{equation} y=\mathbf{X}\theta^*+\epsilon \end{equation} where $\epsilon\in \mathbb{R}^n$ is the noise vector. In this setting the constrained LASSO is expressed as foll...
The data consists of a time series with daily frequency. It is basically temperature data, and I can see a clear seasonal pattern throughout the year. I would like to model this time series using statsmodels SARIMAX method. Since I have daily data and a yearly seasonal pattern, I chose s=365 in the seasonal order param...
I have two different models that give me different estimates on my data. The difference is not huge, but one model significantly shrinks the estimates towards zero. However, when I run leave-one-out out-of-sample predictive accuracy, the models perform roughly the same. Furthermore, when I calculate mean absolute error...
Suppose I have a time series that I model with double exponential smoothing as implemented in the R package forecast via the ets function. The formulas given for double exponential smoothing, i.e., $$ a_t = \alpha x_t + (1-\alpha) (a_{t-1} + b_{t-1}) $$ $$ b_t = \beta (a_t - a_{t-1}) +(1-\beta)b_{t-1} $$ illustrate th...
My datasets contain of 5 regional spot electricity prices and 2 fixed electricity prices. I also have a time variable going week to week from 2010 to the end of 2021. Is there any way to use the data I have available to use the Mahalanobis Transformation and have the autocorrelation from my variables removed? My goal i...
I have two variables $Y1$ and $Y2$ and the sample size is $240$. I computed Pearson's correlation coefficient in python with pearsonr from scipy.stats. The following are my results: Correlation coefficient = 0.0434, p-value=0.4687 The correlation coefficient indicates that there no correlation between $Y1$ and $Y2$, bu...
If I use the Benjamini-Krieger-Yekutieli (BKY) procedure for an FDR correction, is it possible for the critical P-value returned to be greater than the desired false discovery rate? I just tried applying the BKY procedure using this Matlab code from the mass univariate ERP toobox, I set the desired FDR to 0.05 and it g...
I want to design an RCT (randomised controlled trial) with interim analysis using the O’Brien Fleming interim stoppage criteria to control the Type I error. I wan to have 3 interim analysis and then the final one then at each analysis I need to have to following p-values to reject $H_0$: 0.00005 0.0039 0.0184 0.0412 ...
my question is: I need to calculate the MLE for the transition probabilities of a Markok chain of order 2 ≤ k < ∞. I've calculated the MLE for Markov chain of order 1 on a previous exercise; but I don't understand where to start for the higher order. If someone could help me, I'll be thankful.
I have an experiment where 6 subjects performed 20 different lifting tasks LT with 3 different knee braces KB. The emg activity emg of the rectus femoris is the dependent variable and LT and KB are independent within factors. I am only interested in the effect of the KB on the emg activity. Additionally, for some subje...
Let the true model be $$ Y = X_1\beta_1 + X_2\beta_2 + u $$ but $X_2$ is omitted, so we estimate $$ Y = X_1\gamma_1 + e $$ by a valid instrument $Z$, so $\gamma_1$ is the 2SLS estimator. Assume now, $E[\pmb{z}_ie_i]=0$ and $E[e_i^2\pmb{z}_i\pmb{z}_i']=V \succcurlyeq 0$. What is an additional condition under which GMM c...
I am fine-tuning CamemBERT model for text classification. I have a lot of domain specific words and a small dataset (10k sentences with 70 labels) and when I added tokens, it didn't help the model to perform better (probably because of my small dataset). When adding tokens with the add_tokens function, can we instantia...
I am running into difficulty determining the best way to analyze my data. So, as backgroud I have a dataset containing the variables MONTH, REGION, COUNT, and YEARS. MONTH, REGION, and YEAR and all factors with respective levels. My goal is to determine if COUNT significantly changes through the levels of YEARS. Howeve...
I have a dataset with different measures of plants (height, size of leafs, etc.) in 5 localities. I want to check if there is a relationship between those variables with temperature and precipitation. However, the only climate data that I have is in the form of rasters at a very gross resolution, so each locality has o...
I have been reading the book by Kimmel and Axelrod, Branching Processes in Biology to understand how branching processes are used to study tumor growth and cell mutations in biology. I have a basic understanding of the Galton-Watson and Bellman-Harris processes and their derivation. From what I remember, the subcritica...
My post is more about ideas than one specific approach. My problem is pretty simple, I have simulated two matrices of noisy data, basically following correlated negative binomial distributions, and my main question here is how to retrieve associations that I know are true. I am in a context of benchmark of method for m...
I want to test my data (a distribution of saccade-amplitudes, N = 25092) for unimodality with the Hartigans Dip Test, more specific the dip.test() function in the diptest-package in R. A paper I read by Mergenthaler & Engbert (2010) used the Hartigans Dip Test for the exact same purpose, but they only gave the followin...
Let's say an auction house holds $N$ exactly same copies of some valuable asset and holds an auction to sell them off. It knows that the attending public has some opinions about the value of this lot, which are distributed with a CDF $\Phi$. The auction house also decides to go for the following procedure: in each case...
I am doing my bachelor thesis and I want to analyse how capital structure affect profitability. I have panel data and I am unsure what kind of regression should I use. If I am only interested in variables and their coeficients, could I use multiple linear regression? Added a snip of how my data look.
I have several ranking distributions and would, for each one, like to fit a [Zipf distribution][1], and estimate the goodness of fit relative to some standard benchmark. With the Matlab code below, I tried to do a sanity check and see if a "textbook" Zipf rank distribution passes the statistical test. Clearly something...
Say I have three jointly Gaussian random vectors $X, Y, Z$ and I know $X \perp Z \mid Y$. I also know that $\mathrm{Var}[Y_i \mid Z] \leq \epsilon \; (\forall i)$ for some $\epsilon > 0$. Let's assume for simplicity that $X$ is scalar. Using the conditional independence it follows that $$\mathrm{Var}[X \mid Y] = \mathr...
My question is: what is the appropriate way to apply a kernel density estimator (KDE) to a 2D dataset that has a rotational symmetry? Specifically, I have the points ($x_i$, $y_i$) and want the density $\rho(x,y)$. However, I know that for this system, $\mathrm{d}\rho(r, \theta)/\mathrm{d}\theta=0$ in polar coordinates...
I understand that the homoscedasticity assumption is one of the Gauss Markov assumptions to get a BLUE estimator. Why is homoscedasticity crucial for justifying the usual t and F statistics?
Chuck loves playing pool. He hangs out at a sleezy bar and spends all day playing. Different people drop by to play against him at different times. Everybody who beats Chuck thinks they're the best pool player in town. The problem is that they all work at different times and can't play directly against each other. How ...
I'm approaching for the first time GLS estimators. Suppose that $\operatorname{Var}(u|x)=\sigma^2 h(x)$, where $h(x)$ is some function of the explanatory variables that determines the heteroscedasticity. Since variances must be positive, $h(x)>0$ for all possible values of the independent variables. Let's say, we don't...
I was reading example 3.2 on stratified sampling in Sampling: Design and Analysis by Lohr where a stratified random sampling design is proposed and compared with a simple random sample one. The point was estimating the total of the variable of interest. The simple random sample was about the 10% of the population ($n=3...
I am trying to sample from a bivariate normal distribution given above. If the proposal distribution is q(theta|theta prime) and theta prime = theta + U, where U is uniformly distributed over [a,b], what are the conditions on a and b?
I am training an AI to learn to play a game through reinforcement learning. The procedure has produced a set of $N$ agents: $A_1, A_2, \ldots A_N$. I wish to estimate a skill rating $\beta_i$ for each agent $A_i$, according to the Bradley-Terry model. In the Bradley-Terry model, the probability of agent $A_i$ defeating...
I have a model with the following formula: percent_discoloration ~ cv * year + zone_line where percent_discoloration is my response (a plant disease), cv is the cultivar (18 different levels), year (two years) and zone_line is a binary variable. I'm trying to compare the different level of cultivars (cv) to check whic...
I am working with GARCH models (and analogues) recently and have a serious autocorrelation problem to deal with. I made a research about robust estimation of standard errors for conditional variance models. However, all I can see is the applications of HC algorithms. I couldn't find a source about the HAC (neither an a...
I am working on data analysis. I divided my samples into five different groups (group A-E) by using some variables. and then, because group A can be further reclassified into group A+ and group A- and I did that, so there were 7 groups in total. My research goal is to compare the difference of group A+ and group A-, so...
I was wondering if there was a way to use Bayesian framework where you might favor more recent data over older data? Say you are doing work with 3pt shooting percentages where u might used historical data for the start of the new season as a prior but may want to add more "weight" to the newer data being introduced as ...
Consider an experiment where randomly selected experts from a set are asked to attribute Likert-scale ratings to randomly selected objects from two groups A and B. Now, suppose I want to test whether there is a statistically significant difference between the distributions of ratings for objects in groups A and B. Rati...
I was reading this article on Logistic Regression for Rare Events. Over here, a modification ("Firth's Correction") to the classical likelihood function has been proposed in which a penalty term has been added based on the square root of the Fisher Information. As we know, the square root of the Fisher Information is c...
I have to perform a normal MLR but my data set is very very highly correlated now what to What are the best methods to adress this issue I my final regression equation I don't want more that 3 or 4 independent variables I tried to add reciprocal data transformation column I tried to range scale I tried log In all cases...
I have some survey data on a population described by age, gender, and weight. It’s quite skewed so I want to reweight it to a known target population (a larger study) using post-stratification. Problem: some bins are absent in the smaller study (e.g. age 20-30, weight 120-150lbs, gender M). So when I try to map the pop...
I would like to measure the effectiveness of video advertising that are of a certain length of time and divided into parts. For example, suppose there is a video advertisement that can be divided into A, B, and C parts (Each part is 5 minutes), and viewers can start watching at any time and stop at any time. (Many view...
I am experimenting with the ca.jo function of the urca package and I am getting confused about the ecdet argument. In the documentation it is mentioned that ecdet has three possible values: none for no intercept in cointegration, const for constant term in cointegration and trend for trend variable in cointegration. I ...
I am reading the book: Shahjahan Khan. Meta-Analysis Methods for Health and Experimental Studies. Springer 2020. https://link.springer.com/book/10.1007/978-981-15-5032-4 On page 23, there are formulas for conversion of effect sizes for binary outcomes. I am quite lost at this point. Where do all these formulas come fr...
I am reading the book: Terri D. Pigott. Advances in Meta-Analysis. Springer 2012. https://link.springer.com/book/10.1007/978-1-4614-2278-5 On page 10, there is a formula for standardized mean difference: Is the only error there in the denominator of (2.10) and the line just after the formula? How can one explain the f...
posterior - predictive checks: a predictive model built based on a set of empirical observations $x$ so that $x$ may be compared against a set of prediction $\tilde{x} \sim p(\tilde{x} | x)$ Then, for posterior - predictive accuracy: a predictive model: the set of predictions $\tilde{x} \sim p(\tilde{x} | x)$ to be c...
I want to estimate a bivariate restricted probit model in R. In particular, I want to restrict the correlation between the models to 0. Using the GJRM package & function, I was already able to estimate an unrestricted model, however, I have no clue how to implement restrictions there. The biprobit command from the mets...
There are multiple sources to answer the above question. For example here it says Standard deviation tells us about the variability of values in a data set. It is a measure of dispersion, showing how spread out the data points are around the mean. So far so good, but I would like a clearer explanation with an example...
I'm interested in using Bayesian models to measure uncertainty in edge weights within social networks. Specifically, I have been trying to replicate how this package works but using brms: https://jordanhart.co.uk/bisonR/articles/getting_started.html When I use bisonR, the output generates edge weights that seem to refl...
Suppose there's a casino that has a game where you sample from a Cauchy (100, 1) distribution (mode is 100). If the sample is positive, then the casino pays you that amount, otherwise you'd have to pay the casino. My question is, what would be a value for which it's "rational" to play this game? Standard ways, like hav...
Imagine you are solving difficult Math problems and you expect to solve one every 1/2 hour. Compute the probability that you will have to wait between 2 to 4 hours before you solve four of them. I came across two solutions for this. 1st Solution: Let X be the number of 1/2-hour intervals we have to wait before we solve...
Consider the following model \begin{align} y_{i t}& =\beta x_{i t}+\varepsilon_{i t} \\\\ \Delta y_{i t}&=\beta \Delta x_{i t}+\Delta \varepsilon_{i t} \\\\ \tilde{x}_{it} &= x _{i t} + u _{i t} \\\\ \text{where} \\\\ x _{i t}&=\rho x _{i t-1}+v _{i t} \\\\ u _{i t}&=r u _{i t-1}+e _{i t} \end{align} According to th...
I have a question regarding Bayesian model averaging (BMA). Let M be a set of models 1...K. D are the data. Then the posterior probability of the Kth model has a following form: $$ P(M_{K}|D) = \frac{P(D|M_{K}) \cdot P(M_{K})}{P(D)} $$ I dont understand, how can I imagine the likelihood $P(D|M_{K})$. I know that the li...
I am trying to write a research method which includes a difference-in-differences study. I survey people's exam results in England & Scotland at t=0, t=1. The mean values of the results are: t=0, England - A t=0, Scotland - B t=1, England - C t=1, Scotland - D This would give a causal effect of (A-C)-(B-D) for the Di...
I am trying to see if there's a relationship between academic freedom (independant variable) and university rankings (dependant variable) using a fixed effects model. I managed to get some significant results, but the problem is that since academic freedom goes from 0 to 1, the coefficients are really extreme. For exam...
References https://otexts.com/fpp3/non-seasonal-arima.html https://otexts.com/fpp3/seasonal-arima.html Question According to the webpages, the formula of ARIMA(p,d,q)(P,D,Q)[m] with intercept and drift should be like below. However, the result of auto_arima function and the result I calculated using the formula below d...
I've performed an ordinary least squares on a data set with one variable. For simplicity, let's say I've fitted a polynomial function $$f(x)=a+bx+cx^2+dx^3.$$ I obtain the best fit and the standard error (via the covariance matrix) for each of the fit parameters. Now, I want to calculate the error in $f'(x)=\frac{df(x)...