instruction
stringlengths
9
38.7k
I am trying to learn hydra like CNN architecture based on publication using AFLW dataset. I replicated results from repository and its fine. Moving forward, I added one another head/regression task into this architecture with my own additional annotations. Dataloader is fine and annotations are correct, however I'm get...
I've fitted an AR(1) model using the below code. library(forecast) library(plotly) Series <- c(6.89773674625742, 0.000530132677610595, 3.60550131815607, 2.61260697924526, -5.67819713941861, -4.86695619720548, -4.25371622897671, -2.83852411599092, -1.02142755625884, 0.0975249656270929, 2.41828420915933, 0.24080020904...
I want to evaluate different models (ARIMA, MLP, LSTM, regression, etc.) on their performance to predict/forecast stock prices in a period (horizon) of 7 days around month-end. The data for these stock prices is also non-stationary, so considering doing the forecast on the differenced price series. I have data on a mul...
Would the "extended" Negative Binomial have the same MGF as Negative Binomial? (See the definition of "extended" Negative Binomial below by Wikipedia) Could someone please help provide the derivation of the MGF for "extended" Negative Binomial? In this case should we treat X as a continuous random variable or a discre...
Background: I am working in identifying best practices for conducting a specific mechanical test in materials. This mechanical test determines a material property and consists in performing consecutive measurements of such property in the same sample. In the end of the test, the results are a set of measurements (the e...
I wanted to compare two lmer models. One included a random intercept, the other included both random intercepts and random slopes. Although the output of anova showed the second model had more explanatory power, I'm not sure I should accept it due to the fact that it had a boundary (singular) fit. Could someone please ...
This question comes from the basis that when running a bootstrap sample on a population whose distribution is normal, there would be higher chances for the sample to contain individuals revolving around the mean. Thus , when using this sampling scheme, the estimation algorithm (regression or whatever) would be predicti...
I need to show that OLS estimate is unbiased. I am familiar with OLS and the notation. However I found these equations in my material and I doubt whether this is correct. I understand that 'normally' an inverse term and a non inverse term multiplied, cancel each other out. It looks that that also has been done in the e...
I have some trouble finding the best ML approach to solve the following problem: I have a set of continuous variables representing how a specific medical procedure is conducted. I need to find the optimal threshold value for each variable to maximize the probability of a positive outcome. I already created a Random For...
I am using CausalPy (https://causalpy.readthedocs.io/en/latest/) to implement synthetic controls for Bayesian Geo-Lift. Goal is to test a business initiative/feature (on website) in let's say 1 EU country, and use other correlated countries as control to generate synthetic counterfactuals. I have different KPIs that I ...
Just have a quick question. You have to know by looking at the residual plot and the normal qq plot that the residual should be distributed as normal, average of residuals should be 0 and residuals should not have a discernible trend and residuals should have constant variance.Then, from these points, you know that the...
I'm reviewing a Topic about "Meaning of the p value and confidence interval" they gave an example about "The Coin Tossing Experiment" In the example I understand how to find "SE" and "The 95% confidence interval", but I don't understand how they find the P-Value in the Normal Distribution Table. They didn't give the ta...
Could you give me some examples of statistical experiment/analysis in which the statistical unit is the time? If I conduct a study on the number of people who have attended a bachelor degree over time, is my statistical unit the time? During a statistical course my Professor said something like that, and now I am not c...
I am trying to model what environmental data increases the probability of my response variable occurring. My data covers 30 years of daily observations. I have narrowed my predictor variables down with PCA to 3 continuous variables and month (temporal/categorical). My response is a binary presence (1) or absence (0). T...
I have a Survival Analysis problem. In this problem the patient participates with a medicine until this cure is rejected due to inefficacy or adverse effects. Of course the patient can continue until the end of study because the medicine worked for him/her (censoring). The difference here is that a patient who had adve...
In the code below, two binomial responses are simulated with the same probability of success ($H_0$) and the p-value of the 1-sided z-test is stored. This is repeated 10000 times. n0 <- 100 n1 <- 100 pi0 <- 0.4 pi1 <- 0.4 pvals <- sapply(1:1e4, FUN = function(i) { y0 <- rbinom(n = 1, size = n0, prob = pi0) y1...
I have a dataset with 5 raters and 129 nominal observations. I want to calculate Fleiss'K for inter-rater reliability and I need to use bootstrap to calculate the Confidence Intervals. I am using R Let this be our dataset # Set the number of raters and observations num_raters <- 5 num_observations <- 130 # Generate ra...
So the statement is: Adding a time trend can make an explanatory variable more significant if the dependent and independent variables have different kinds of trends, but movement in the independent variable about its trend line causes movement in the dependent variable away from its trend line. I don't really underst...
I am working with a time series of remote sensing images from a particular area. Temporal standard deviation (SD) of these images showed high fluctuations at some regions with SD of 1.17 while some show SD as low as 0.08. I am interested in categorizing/classifying these high and low variation regions in an unsupervise...
I'm trying to test the significance of 2 independent variables (b & c) in a regression model, whose values depend on another independent variable a. To make this easier to understand, let's say we're studying 5 different frogs which may or may not live in the area, and there are 100 areas under study. a is the number o...
My question pertains to this Cross Validated post, but I specifically aim to compare the effect size of an independent variable between categories of the dependent variable. In practice, I have a non-ordinal dependent variable with four categories representing cultural consumption clusters. I have three independent pre...
I have been reading Chapter 8.2 of the Interpretable Machine Learning about Accumulated Local Effects (ALE) plots. It includes the following formula which defines the ALE value for a given value of feature x_j: As I understand it, the second term on the right side is mean and it will be constant for all values of x_j....
Markov chains are typically described as memoryless as the next state depends only on the current state but not any of the past states. But wouldn't true memorylessness mean that the next state does not depend on any state? The way I view it, if the next state depends on the current state, then the system has a memory ...
I am trying to use a transformer decoder (LLM, for simplicity) to label a collection of texts, later to be used for training a classifier. I tried multiple 7B models, which I can save on my local machine and use for inference. Nevertheless, each tag (that is, making a query about a text) takes about 3-5 seconds. How co...
I have been tasked to approximate the error rate of a research procedure. The only data I have available are reports which specify the number of targets (n), the number of raters (k) and give pairwise inter-rater reliability (Fleiss' kappa) values. The 'true values' of the targets are unknown, as are the values that ra...
I am thinking of adding some perturbation to my convex optimization problem. The idea is straight forward like below chart. Supposed you are solving $\text{argmax} f(x) $, we want to find an $x$ that's stable even with some perturbation. If we end up with $x+\epsilon$, we are still getting a reasonable solution, not fa...
Lets say I have this type of data. For one of the series, I observed data until day 300. Can I use functional principal component regression to forecast next 50 observations? What is the best way to use partially observed data for one of the curves to predict where the curve will go?
I'm trying to understand the identification of the average treatment effect in Pearl's introductory paper on causal inference. We have the following structural equation model: \begin{align} z &= f_Z(u_Z) \\ x &= f_X(z, u_X) \\ y &= f_Y(x, u_Y) \end{align} where the exogenous variables $U_Z, U_X, U_Y$ are assumed mutual...
In logistic regression, is it possible to calculate the odds ratio of two variables? For example, I always see the odds ratio of only one variable being calculated (ex: e^b1) .... but is it technically wrong to do this for more than one variable ex: e^ (b1 + b2) ? Is this permissible?
Hi I will be very grateful for any help or ideas or hints. I have searched the internet but no suggestion seems to be able to help me. I am a bioinformatician and I mostly work with R. I have a dataset of over 20 thousand non-randomised observations which contains values for a vitamin, say vitamin y values alongside...
Assume we know the BBN (Bayesian Belief Network), how can we score the value of each additional piece of evidence that the system ingests? In simpler terms, here are two example use cases: Make an app to quantify a kids hot or cold guessing game? Make an app to reward detectives after the case is solved for the value o...
I'm working on a research regarding natural disasters across counties in the US. I'm using these events as exogenous shocks for my Difference-in-Difference analysis. One assumption for the DiD is the absence of anticipation. However, some disasters are not random and can happen within a particular period time of the ye...
I teach undergrad stats and every year one student asks "You can't have 1.5 children" (the mean for the dataset). I am flummoxed every time to create a sensical answer. I've tried: "no one person can, but overall the sample can"; I've tried making histograms and plotting it, etc, but it still puzzles some students ... ...
I can't find any information about it, and I've tried both solutions and they seem to work. But i have to differentiate the series (if not stationary) before using bats or msts?
According to the Wiki, Jensen–Shannon divergence (JSD) is bounded between [0,1]. I am having trouble understanding why this is. Let's say $p_1 ~ N(\mu_1,\sigma^2)$, and $p_2 ~ N(\mu_2,\sigma^2)$ (same standard deviation). Then $JSD(p_1||p_2) = \frac{1}{4}((\frac{\mu_1-(\frac{\mu_1+\mu_2}{2})^2}{\sigma^2})+(\frac{\mu_2-...
In my studies I frequently perform Two-way ANOVA followed by a post-hoc evaluation, it may be Sidak or Tukey test depending on the number of groups. I use Sidak for 2 groups and Tukey for 3 groups. I often use GraphPAD Prism. I will put my questions separately to facilitate. When I do a Sidak or Tukey post-hoc evaluat...
I have a multivariate dataset with M groups of data, each consisting of N iid measurements of p variables. Say I take the N measurements from a single widget, and M corresponds to the number of widgets I measured. I do PCA on each of the M groups of data and observe variation in the principle components (and their asso...
I have a scale that has 4 subscales. Each subscale has 5 items. For calculating Cronbach's alpha for the total scale, should I use subscale values (in this case it would be 4) or should I use individual item values (it would be 20). Thanks and would appreciate if you attach a link to any publication on this topic.
In linear/nonlinear regression we try to find the minimum for the sums of squares as a function of the model parameters. For a one dimensional system this is just a simple 2D curve. Parameter on the x axis, sums of squares on y axis. I was under the impression that estimates for uncertainties in the parameter estimates...
For purposes of validating a forecast model, I'd like to compare a GLARMA model that I developed to a null model that includes the same autocorrelation effects but lacks the environmental data. GLARMA are like ARMA, but they allow for count data as the independent variable. Here's a reference for this model type. Dunsm...
In my research, I have two categorical IVs and a DV: A factor with 4 levels (mindset, encompassing 4 mindsets) A factor with 2 levels (condition, encompassing 2 conditions) A DV which is a composite factor with 4 levels (4 subscales) I followed up with a MANOVA test with a Roy-Bargman stepdown to find out how the sig...
I want to test the following hypothesis: H1: Traditional business owners protect customers' personal information better than online business owners. Here, indepedent variable is business (2 groups: online owners and traditional owners) and dependent variable is Access to information (ordinal: Strongly agree to Strongly...
I would like to know and understand why an interaction in a linear model yields different standard errors than simple effects. Here is an example in R with $n=25$, no correlation between simple effects, and all $\beta = 0$. I recorded standard errors of regression coefficients in a model with an interaction term (SD), ...
I am trying to forecast an index option's implied volatility using a sliding window regression and I'm a little confused on how I can go about cross validating with respect to the training and test set size. What I have so far is I cross validate the training window size by fixing the test set to be 1. I then do my sli...
I have a variable that is a proportion. Let's say it is the proportion of boys in a classroom. I calculate its standard error as well. Suppose the value and its standard error is $0.1512$, and $0.0341$. I made these numbers up. In a paper, I would just write $$ 0.1512 \\ (0.0341) $$ I would like to display these number...
I am trying to fit a GAM model to predict CSAT (customer satisfaction scores on a scale of 0 to 10) which I believe are ordinal in nature. I used a categorical predictor (type) and two numeric predictors (duration, difference) which I believe have non-linear relationship to csat scores. gam_model = gam( csat_score ...
In a causal study, can treatment effect go up upon applying causal techniques when comparing with the naive / simple difference in means? I think this question is method-agnostic, but for transparency the method I was working with was matching + outcome model. To be more specific, my question is in 2 parts: Can treatm...
According to CLT, randomly selecting values from a distribution will result in a convergence towards a normal distribution. Does this mean that we can never figure out whether or not the underlying data is normal or not without seeing the full dataset? As an example, consider a dataset like: Could sampling ever allow ...
I have some data that looks as follows: import pandas as pd # Sample data df = pd.DataFrame({ 'user_id': [1,1,1,1,1,1,2,2,2,2,2], 'experiment_group': ['T', 'T', 'T', 'T', 'C', 'C', 'T', 'T', 'C', 'C', 'C'], 'metric_value': [10, 5, 8, 7, 10, 11, 9, 8, 5, 8, 9] }) As you can see: User 1 has 4 treatment exposures...
I am trying to find the expected minimum and maximum distance between consecutive points on the unit positive rea interval .I have tried the following so far :Given $n$ uniform random variables on the interval [0,1], let's denote the ordered variables as $U_{(1)}, U_{(2)}, \ldots, U_{(n)}$. The minimum gap can be found...
I need to estimate a generalized linear mixed model (GLMM). When using R, I need to choose a specific fixed effect (one of the independent variables in the model) to have a random slope according to a random variable such as subject ID. But when using SPSS, I can't choose a specific fixed effect to have a random slope....
I have a set of data where I want to test the hypothesis that the player pool (a specific sample) overbluffs or underbluffs. I am assuming that if the player pool overbluffs or underbluffs, they do it for all sizings. I have a separate sample for all sizings. For example, the theoretical bluffing frequency for a half p...
I have a complicated physical model that can produce a certain quantity (real-valued) for a large (in the 1000's) number of points (N). We assume that mean and variance of the model output is a good representation of the actual physical object properties but we don't know as we have not built them yet (please let me kn...
I'm trying to run a number of independent samples t-tests. I'm using the yuen function in the WRS2 package because my data are non-normal and ordinal. My sample size is 391, but the output of the yuen function gives df values of between 2 and 16.35 depending on the variable. I don't really understand what df means in t...
I am doing an extreme value analysis (EVA) but there is a nuance in my problem that I believe is not addressed in extreme value theory. I have not been able to find information about this in textbooks or on the web, so I am asking here. I am analyzing a pipeline that has corrosion on it, and I want to predict the maxim...
Let $X_k \overset{iid}{\sim} t(2)$. Is there any limit theorem about $\bar{X}$? I know $\text{Var}(\bar{X})$ doesn't exist, so I cannot use classical CLT. But I believe there must be other means to study it. I got this question when I was thinking about how quickly it converges to zero in probability.
Ok, here's the thing. I'm trying to compare performances in different running events (i.e. all registered performances in each event from 1990 to 2023), to estimate equivalent performances. After having tossed this data around for quite a while now, I need guidance about how to proceed or I will lose the rest of my hai...
If $y_1$, $y_2$, and $y_3$ are time series such that: $$y_1=y_2+y_3$$ Suppose all those variables were regressed against index $x$, so we get coefficients $r_{y_1}$, $r_{y_2}$, and $r_{y_3}$. In general, it should then hold that: $$r_{y_1}=r_{y_2}+r_{y_3}$$ I expect they should not equate since variance itself is not a...
I am trying to come up with a statistically sensible pooled kurtosis estimator that is based on pooled cumulant estimators. Specifically, I have unbiased estimators of the second and fourth cumulant in this form (1, p. 257): $$ k_2 = \frac{n m_2}{n-1}\\ k_4 = \frac{n^2 \left(-3 m_2^2 (n-1)+m_4 n+m_4\right)}{(n-3) (n...
I've run a model in R as follows: model1 <- glmer(outcome ~ predictor + (1 | groupID), data, family = binomial()) Like outcome, predictor is a binary variable. My understanding is that this model would only give me the random effects estimate of groups where predictor = 0 (because 0 would be the intercept), so I also ...
I am working on my Master's Thesis and I was fitting various glms on my data; and since I can't calculate adjusted R² values for my models, I opted for Nagelkerke's pseudo R². I used the rcompanion package and the nagelkerke() function to calculate these values for my various models, that I had stored inside a list. I ...
I am trying to simulate correlated data using the 'anysim' package in R. The software allows for correlations to be specified between categorical and continuous distributions. There are intermediate technical steps where it back-transforms a multivariate normal distribution to the original distributions. That's great s...
My response data is a ratio going from 0 to 1, inflated at 0 and 1. My aim is to build an explanatory model to test the influence of PROTECTION and JOUR (categorical fixed factors) on the response Ratio. I used GAMLSS to fit a model with the beta inflated distribution. I read that The beta inflated distribution is a fo...
I have data from two eyes that have been repeatedly measured across time (5 time points) for their intraocular pressure (IOP). Various measurements were taken including categorical and continuous data. Not all patients have both eyes eligible for the study, so there is a mixture of patients, some with 1 and some with 2...
I am trying to understand why they say that small samples have big variances. For example, suppose the population variance of some variable is 100. I take 5 samples and the variance is 156 ... in this case, the sample variance is bigger than the population variance. I then take another sample of 5, and its possible tha...
The expectation maximization algorithm maximizes the evidence lower bound given by the following equation: $$ELBO = \Sigma_zQ(z)log\frac{p(x,z;\theta)}{Q(z)}$$ Now, the mechanism of the EM algorithm is given somewhat by the following picture Here it is assumed that the elbo is a concave function. I can see log is a co...
Suppose I have data coming from a single variate distribution. I want to estimate how heavy the tail of the distribution is. For example, if the data comes from the Zipf distribution, I would want the estimator to estimate the $\alpha$ parameter. However, I would like a non-parametric estimator. What are some commonly ...
If we assume that our model contains a three-way interaction (xyz), but when we run the analysis, we only define a two-way interaction in the model (e.g., x*y), how can this omission affect our findings and interpretation? In a real analysis, suppose we have two models for two hypotheses: a. Y = x + y + xy (we only hyp...
In a simple linear regression, if y = b0 + b1x1 + b2x2 + b3x3....usually we interpret the beta regression coefficients individually. EX: if x1 is height and x3 is dollars ... we say that 1 unit increase in height has a b1 increase on the response y, and a 1 unit increase in dollars has a b3 increase on response y. As I...
Let’s say each sample consists of 300 units inspected for defects. I have historic data from 100 samples in the past that give me an idea of what I expect the defect rate to be. I have a new batch to sample. I pull 300 units at random and inspect. How do I include the historical data from those 100 samples with the sin...
I'm working with a mixture cure model in a panel dataset covering multiple products across several years. The time-to-event, defined as the duration between the auction start and product sale, is typically very short, often just a few minutes. If a product isn't sold, it's considered "cured." The same product can be so...
As an example, let's say that we have observations of the price of some good at various points in time and would like to predict the distribution of the price of the good one point in the future from the current price. Note that we are ignoring the implications of stationarity or non-stationarity and evenly or unevenly...
Background: According to Wikipedia, the PDF of the sum of two random variables $X$ and $Y$ is given by the convolution: $$f_{X + Y}(x) = \int_{-\infty}^{\infty} f_X(\eta) f_Y(x - \eta) \; d\eta$$ Therefore for the PDF of $X + X$ we have: $$f_{X + X}(x) = \int_{-\infty}^{\infty} f_X(\eta) f_X(x - \eta) \; d\eta$$ Additi...
I used inverse probability weighting to correct for selection bias in my sample. After including inverse probability weights in my model, I observed that the R2 actually decreased compared to the model without adjusting for selection bias. However, the main predictor of interest became more significant after including ...
I am working with Recentered Influence Functions (RIF) to estimate regressions in distribution. We have the following regression $RIF(F_y, \nu (F_y)) = \beta_0 + \beta_1X + \varepsilon$ where $\nu(F_y)$ is some functional $\begin{array}{r}\operatorname{RIF}\left(y ; \nu, F_Y\right)= \\ \nu\left(F_Y\right)+\int I F\left...
I would like to know what is the appropriate word for regression coefficients of log-transformed outcome(y) after taking the anti-log of regression coefficients. It is not an odds ratio or risk ratio. So I would like to know the appropriate name for these estimates after taking the anti-log of regression coefficients. ...
I need to isolate contribution of a single entity in a Division of Sums as shown below. For example, find the contribution of variable a in the following: (a 1 + b 1 + c 1) / (a 2 + b 2 + c 2) Example with numbers: Stock $ Earnings $$ Sales AAPL 10 100 MSFT 25 50 AMZN 5 50 Profit Margin = (10+25+5)/(100...
Say we have the following state space/structural time series model: $$ y_t \mid \mu, \sigma \sim \text{Normal(} \mu = \mu_t, \sigma^2_\varepsilon) \\ \mu_{t+1} = \mu_t + \eta_t $$ where $$ \eta_t \sim \text{Normal}(0,\sigma^2_\eta) $$ It is proven in Muth (1960) that the model outlined above is equivalent to simple exp...
In the page from a statistics book pasted below the authors make the algebraic leap from the LHS to the RHS of the equals sign here: $\large \frac{(x_1 - \mu_1)^2}{\sigma_{11}} - 2\rho_{12} \frac{(x_1 - \mu_1)(x_2 - \mu_2)}{\sqrt{\sigma_{11}}\sqrt{\sigma_{22}}} = \frac{1}{\sigma_{11}} \left[x_1 - \mu_1 - \rho_{12}\frac...
I am a bit confused by what is considered the direction for the principal components in PCA. For example: I do understand that the picture on the right hand side is correct. However, is the the PC1 direction just the northeast pointing arrow (i.e. direction is of increasing axis value) or is it double ended (e.g. it al...
If we want to test: population with a high level of education were less likely to contract COVID, which of the following regression(s) we should run? Explain whether each one is appropriate. LN is natural log. (1) CASES on POPULATION PHIGHSCOOL (2) LN(CASES) on POPULATION PHIGHSCOOL (3) LN(CASES) on LN(POPULATION) PHIG...
For such a latent space model $$z_t = A z_{t-1} + w_t$$ $$x_t = C z_t + v_t$$ where the noise is being drawn $w_t \sim N(0, Q)$ and $v_t \sim N(0, R)$ I have the derivation of the forward and backward pass equations for $\mu_{t|t}$, $\Sigma_{t|t}$, $\mu_{t|t+1}$ and $\Sigma_{t|t+1}$. Now add a new set of observed varia...
Let's say we have a multivariate time series that we would like to forecast future values of: $Z_t = (X_t, Y_t)$ where $X_t$ and $Y_t$ are real-valued time series and constrained by the inequality $X_t < Y_t$ for all $t$. If we believe that our multivariate time series, $Z_t$, can be modeled by a VAR/VECM process (pote...
The Literary Digest poll of 1936 is often mentioned to show the dangers of using convenience sampling. Are there other famous examples where a wrong sampling method led to erroneous conclusions? I ask not to question the existence of the problem, but because I'd like to vary the examples I give when explaining the issu...
I'm encountering a slight issue with my dataset, and I'd like to provide some context: I have a dataset with 1600 patients, and we've been monitoring their glucose levels on a weekly basis over a period of 30 weeks. Additionally, at the end of the 30 weeks, we conducted a unique blood test for each patient. Currently, ...
I have data from Stepped wedge cluster RCT with 2 level clustering. The outcome is error rate per patients (number of error/total number of orders). Patients are clustered withing wards and measurements are clustered within patients. one patient can readmit into different wards during the study period which makes the p...
I want to do a correlation analysis on a dataset of 28 samples. I want to correlate the age with the size of a reflex response. But I don't understand whether I should use Pearson's or Spearman's test. Because I don't know whether my data can be considered "normally distributed" or not. Shapiro Wilks "says" it is norma...
I have a highly imbalanced dataset and I'd like to train a simple ANN classifier on it. My model currently is a simple 2-layer feed-forward neural network with ReLU activation in between. After a few iterations, the model already "decides" that outputting the most seen labels is good enough and stops learning. To cope ...
I have a panel dataset with individuals on a waiting list for a specific event. The individual can either: still be on the waiting list, have died on the waiting list, be withdrawn from the waiting list or the individual have experienced the event. The variable that measures time is called days and measures the number ...
This may be a silly question but: Given a regression model that includes both main effects and an interaction term (Score of participants predicted by their attitude and motivation): model <- lm(Score ~ attitude + motivation + attitude:motivation) According to the model summary, only attitude effects behavior signifca...
Let's imagine that we want to develop an IRT model that describes the probability that a basketball player scores a basket when he shoots the ball from a certain distance. Distance is a continuous variable, and let us assume that this is not an experiment but an observation in a natural setting. That is, individual pla...
Assume $X\sim \mathcal{N}(\mu, \sigma^2)$ For a normal distributed random variable $X,$ what is the distribution of $c/X$? I had a look at ratio distributions but could not find it. PS: The issue originally was raised when I asked for the distribution of $1/\hat{E}[Z]$. I know from the CLT that the arithmetic mean $\ha...
In expectation maximization first a lower bound of the likelihood is found and then a 2 step iterative algorithm kicks in where first we try to find the weights (the probability that a data point comes from a certain hypothesized distribution) and then, assuming the weights found are correct the distributions are updat...
Is two-ways fixed effect better than one-way fixed effect? How should we decide between one-way FE and two-way FE? Is there any test for this purpose?
Say, I have a dependent variable $Y$ that I want to model with a linear regression and independent variables $X_i$. I am assuming that two of my independent variables $X_1$ and $X_2$ have an effect on $Y$. I want to model the variable $Y$ at a time $t_3$, $X_1$ and $X_2$ are collected at a time $t_2$. I am wondering ab...
I want to know if the relationship between x (continuous independent variable) and y (continuous dependent variable) is influenced by gender (binary variable) AND stronger for those participants who have high values in y (the dependent variable). For this reason, I split my participants into three equal-sized groups: d...
I am running a VAR model to predict the flow of consumer loans (dependent variable). I have three independent variables (consumption of durables goods, employment rate and households GFCF). Each variable has 76 quarterly observations. My four series are stationary in difference. Results are confirmed by ADF and PP test...
Let $A = (X_1, ... X_n)$ be a series consisting of long periods of ones interrupted with shorter periods of zeros, like $$A = 111111111 00000001111111111100000011111111111111.$$ The plot below (left) shows this kind of data but with larger number of points. Plot on the right shows the same data but the pattern is sligh...
My question is derived from a previous topic https://stackoverflow.com/questions/77287721/how-to-compare-several-matrices-and-calculate-the-percentage-difference-in-r/77287785#77287785 , where @ThomasIsCoding provided the excellent and simple answer. Now I need to calculate the statistical significance, that is, the p-...
I am looking to calculate what sample size I would need for my study by running an a priori power analysis. Is there any way (e.g an R package) I can calculate the required sample size required for latent growth curve modelling?