instruction stringlengths 9 38.7k |
|---|
Let's say $y$ is known, is there any way to compute the number of trials N such that $P(\theta_N<\theta_0|y)=0.95$ ?
For the sake of the example, let's say #successes $y=0$ and prior probability $\theta_0=0.001$ with prior $Beta(1,500)$. One solution is to test all value of n until pbeta(0.001,1,500+n) $\geq0.95$. Afte... |
Let's say I have the following strings and associated target variables:
PVADDHJ 98.58
LMIJLFPA 98.89
PNI 97.86
YZDYI 100.98
OXFBI 100.99
OPGWQJ 102.43
JDUKN 100.76
ZWDTXHZ 100.09
URJFIT 98.05
VWYWBWUIR 99.76
Python code to generat... |
Larry and Tony work for different companies. Larry's salary is the $90th$ percentile of the salaries in his company, and Tony`s salary is the $70th$ percentile of the salaries in his company.
Which of the following statements individually provide(s) sufficient additional information to conclude that Larry`s salary i... |
I am trying to perform model explainability for the best performing model using LIME for a classification problem. The y variable is whether a tumour is malignant or benign. Same question as (https://stackoverflow.com/questions/75867990/using-lime-in-r-to-explain-the-best-performing-model)
This is my attempt below:
mod... |
I'm working through time-series forecasting, using models such as ETS, ARIMA, and vector autoregression as described in several texts (for example, Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. OTexts.com/fpp3).
I've created a hypothetical wh... |
I am trying to test whether sleep improves over the course of a treatment intervention.
Through surveys sent periodically across 6 months, people self-report how many days per week they had difficulty falling asleep and how many days they had difficulty staying asleep, which are then added together to give a range of v... |
An order for bottles of vitamins from a certain mail order company costs $\$ 12.04$ per bottle plus a shipping cost of $\$ 4.80$ regardless of the number of bottles ordered. Over the past year, the company has received 100 orders for bottles of vitamins, The standard deviation of the numbers of bottles per order for t... |
I have a set of measurements over time at specific locations with treatments applied to different locations. I'm interesting in testing whether locations have different responses to the treatments overall. Each location may have different 'starting points' so I care about slopes of a linear model, not intercepts or mea... |
I'm modeling rate data using Poisson regression and I want to assess the model assumption of mean = variance. I understand that for Poisson regression it's the conditional means that equal the conditional variances for different levels of the predictor variables.
Suppose below is some random example data from one of th... |
I am trying to train a SVM model for my statistical learning course. The problem is a binary image classification problem (wildfire, nowildfire). This is the rigorous amount of testing that I have done so far:
Initially I started by training the model using the library which was rather easy. Then I toyed around some m... |
I am new to R studio. I tried to use the regression model.
I used the semi-log model due to the normality.
I summarised the results of the regression. And I found that two variables (called v1 and v2) had 0 predict (estimate) values. V1 and V2 are continuous variables as the control variables. And I used the independen... |
For a 2x2 scenario, to determine misclassification we can obtain positive and negative predictive values from a logistic regression model where the outcome is the true value and the exposure is the measured value. I can demonstrate what this might look like in R:
set.seed(123)
true <- rbinom(2000, 1, 0.30)
measured <- ... |
I have a dataset containing two types of variables. These are - numerical and sequential variables( example is shown below). How can I give both of these variables simultaneously as input to machine learning models like, Xgboost.
Sample Data-
V1
V2
Target
1
[1,2,3]
1
5
[2,3,4]
1... |
I am struggling to work out if the following is true.
Let $\{A_\epsilon\}$ be an indexed set of events in a probability space. Does it hold that:
$$\forall \epsilon > 0, \mathbb{P}[A_\epsilon]=1 \implies \mathbb{P}\bigg[ \bigcap_{\epsilon > 0} A_\epsilon\bigg]=1$$
If not, can I add any conditions (such as the $A_\epsil... |
Background
I've been running a couple of lmer() models with different data and noticed something I cannot really grasp.
The models range from simple to more complicated
(e.g. DV ~ continous_between_Case_Variable + categorical_within_Case_Variable + categorical_between_Case_Variable + (1|Case) )
Given the categorical pr... |
I am trying to model a time series with R using the auto.arima() function. I understand there is no need for the autoregressive variable to be stationary as this is taken care of by the "integrated" part. However, when extending the model with exogenous variables using xreg, does the same rule apply to them, or do I ha... |
The procedure for an ANOVA is really straightforward; you compute the between group variance and the within group variance, divide your results to get an F statistic, and compare it to your critical value.
But what about ANCOVA? I can't find an exact procedure anywhere. Can someone show me a piece of code to find the F... |
Here's the formula for a continuous case (taken from this great answer):
\begin{align}
\text{AUC}
&= \int_{-\infty}^{+\infty} \big( 1-F_1(\tau) \big) f_0(\tau) d\tau
\end{align}
Since a coin assigns scores from $\{0,1\}$ to each instance of positive and negative class with probability 0.5 we have (adopting formula ab... |
I'm trying to work out some explanation for a result I'm seeing where I have the Kaplan-Meier plots for monthly customer churn risk. In aggregate, it looks fine, but I've broken it down into subgroups based on whether the user has previously churned before, i.e. canceled and resubscribed.
A couple things that might be ... |
When training a VAE, one aim to optimize function $\mathcal{L}$, defined as:
$$\mathcal{L}\left(\theta,\phi; \mathbf{x}^{(i)}\right) = - D_{KL}\left(q_\phi(\mathbf{z}|\mathbf{x}^{(i)}) || p_\theta(\mathbf{z})\right) + \mathbb{E}_{q_\phi\left(\mathbf{z}|\mathbf{x}^{(i)}\right)}{\log p_\theta\left(\mathbf{x}^{(i)}| \math... |
I recently read this passage from a website and I just can't work out the math.
Overall, it says you can be 93.75% confident of having the true median parameter within an interval, obtained from a random sample of 5 out of a 10 000 population.
Could someone guide me to obtain this value?
Here's the original passage:
P... |
I have two logistic mixed-effects models, nested within each other and differing in only one fixed variable:
mod1<- glmer(y ~ x1 + x2 + (x1 + x2| subject_ID), data = dat, family = binomial)
mod2<- glmer(y ~ x1 + (x1 + x2| subject_ID), data = dat, family = binomial)
I use the R function anova to compare the two with te... |
I am looking at one kind of measurement in 4 groups Young males, young females, senior males, senior females. Whereas I am mainly concerned at looking at the differences between young and old, I don't want sex as a confounding factor which is why I added in the additional sex groups and basically doubled my sample size... |
I was carrying out LDA (linear Discriminant Analysis) and noticed that the Scaling matrix produced by R is not normalized. Here is an example:
(res <- MASS::lda(Species~., iris))
Call:
lda(Species ~ ., data = iris)
Prior probabilities of groups:
setosa versicolor virginica
0.3333333 0.3333333 0.3333333
Grou... |
I have some legacy code in larger block of looped code that compares models.
It essentially boils down to this similar example:
library(lme4)
data("iris")
test1 <- lmer(Sepal.Width ~ Petal.Width + (1|Species), data = iris, REML = FALSE)
extractAIC(test1)
Which in this case gives the result:
> extractAIC(test1)
[1] 4.... |
I have a sample of cancer patients, of whom 41% died due to the cancer and only 9% died from competing events. So the number of deaths due competing events is fewer than the number of deaths due to cancer. Is it possible to use techniques used to deal with class imbalance in the Fine and Gray competing risk model? If y... |
In an experiment I'm running, I'm trying to determine if my light brightnesses are "clumped" or not. During the experiment, stuff will change rapidly from light to dark in a random way, but sometimes there are "clumps" remaining.
How do I differentiate between conditions where there are the same mean and standard devia... |
The question is related to another previous question.
I am interested in the process described in the text below the links. For curiosity, I ask myself whether it is a good option or not and the purpose of this question is to discuss about it. None of the following links reply to this question:
Is normality testing 'e... |
I have been analysing and plotting some different Gaussian curves in R to help me visualise them for a project I am working on. One such expression is the following:
In R I have plotted this with by writing the following function:
f2Liu <- function(x) {
exp(-0.5*(x / 10000)^2) - exp(-0.5) / (1 - exp(-0.5))
}
When I... |
I came across this conditional proability equation (from this paper: https://ccn.berkeley.edu/pdfs/papers/CollinsFrank2013PsychReview.pdf) and I cannot understand how the RHS gives the LHS:
$P(r_t|s_t,a_t,c_t)=\sum_{TS_i}P(r_t|s_t,a_t,TS_i)\times P(TS_i|c_t)$
For more context, $r_t$ is the reward obtained when performi... |
I analyze clinical research data,
This is a comparison of two treatment groups. The outcome is a continuous variable. We decided to adjust on predictors of outcome in imbalace, in posthoc (We assume it even though not recommanded). These are just robustness analyses, if not exploratory. There are two adjustment variabl... |
Since, estimator is a function on a statistical(or any?) data to estimate an unknown parameter, will it be valid (or is one allowed to) to define your own estimator, like your own parameter..
|
Despite there are multiple questions about it, I cannot figure a solution about my problem. I have built a simple neural network classifier on the MNIST database. I have divided it in training, validation, and test sets. Then on the first two sets I have obtained the hyperparameters, in particular the number of epochs ... |
I would like to estimate marginal effects of two different variables.
In STATA, I have a two-way fixed effects model of type:
xtset region year
reg y x1 x2 c.x1#c.x2 x3 x4 i.region i.year [aw=pop], robust
In turn, I create the margins based on a specific set of quintiles from the variables, obtaining a 25-rows matrix ... |
Here's my idea and doubt
There are two purposes of machine learning, inference, and prediction. In prediction, we are interested in finding a model to give us the best accuracy when we try to find the forecast for a new data point. In inference, the idea is to understand the relationship between input variables and out... |
I am trying to perform an apriori power analysis to estimate sample size for a Poisson regression model. The background is that a RCT is proposed to compare the rate of pill consumption between two methods (standard vs new) of administering drugs. Supposing in the standard method, people usually consume 2 pills per day... |
My project is based in a clinical trial in which we measured in gene expression in three groups (OO, NUTS, LFD). The individuals (n = 151) are almost equally distributed and the variables to measure are at baseline and 12 months after the intervention
I am not an expert but I have read about PCA. The idea of using PCA... |
I am currently studying the Naive Bayes method (a classification method) and I am having quite some trouble classifying it as a hard or soft classifier. Below follows a quick introduction on the method and my thoughts about this question.
One of the disadvantages of Bayesian Decision Theory is the fact that we need to ... |
I have trouble understanding the documentation for the glmmtmb package (https://cran.r-project.org/web/packages/glmmTMB/glmmTMB.pdf)
On page 26, in the details on the beta-binomial distribution, it says:
Beta-binomial distribution: parameterized according to Morris (1997).
$V = \mu(1 - \mu)(n(\phi + n)/(\phi + 1))$.
... |
I am currently working on a logistic regression, where innovation is my independent variable and correlation is my dependent variable. I have some other independent variables and interaction terms but this is my main effect.
How do I test for endogeneity? And is there a syntax in R?
Thanks you a lot in advance.
|
When conducting a 2-way fixed effects ANOVA, there are essentially four null hypothesis statistical tests (NHSTs) that can reasonably conducted with just the ANOVA tables. The first is the omnibus test: ¿is the overall model statistically significant? The next three are about the effects: ¿are the two main effects a... |
I am trying to forecast using the SARIMA model. I have used
auto.arima(ts,seasonal=T,trace=T)
but the prediction I'm getting is just the previous years values shifted up:
Clearly the 2020 values are just the 2019 values but raised. I'm not sure why this is happening?
The model it fitted was SARIMA(5,1,4)(0,1,0)365. T... |
I'm wondering how to go about fitting the following linear mixed model in R. Suppose I have three variables: response, subject and treatment. I observe 4 responses per subject, and a subject is either assigned to treatment or isn't (binary indicator). I want to fit the linear mixed model with covariance structure
$$
\t... |
Suppose that you had subjects learn a series of sentences and then recall the subject noun from each sentence.You manipulate the type of imagery included in the sentence (FACTOR A), ordinary and bizarre imagery.You also manipulated the amount of complexity of the sentences (FACTOR B), low and high complexity.Each subje... |
I was given a dataset consisting of 80 curves which are given as individual points. The curves represent the decline of batteries untill they are no longer useful. The objective is to model a curve which fits this data the best and predict the lifetime of a battery.
I have tried polynomial regression so far, in what o... |
I draw a single sample from a given standard normal distribution: $Y \sim N(0, 1)$. I also draw $n$ samples from a different normal distribution: $X_i \sim N(\mu, \sigma^2)$ for $i=1...n$. What is the probability distribution of the rank of $Y$ among all $(n + 1)$ samples? i.e. what are the probabilities that: $Y$ is l... |
I have an MLR model created in R, regresses the dependent variable y, against the following explanatory variables: age (numerical), hair colour and eye colour (categorical with 5 categories each), birth month (categorical with 12 levels), and gender (male/female).
In building the model, I am only concerned with the coe... |
I am faced with a classification problem where I wish to predict 2 binary variables, say x and y. x and y are dependent in the sense that one conditional probability vanishes: P(y=1 | x=0) = 0. I am looking for a model that is able to incorporate this assumption, which is, of course, reflected in my data.
As of now, th... |
I have three datasets of continuous data. Is there a convenient metric for the "binnedness" of the data? How "lumpy" it is?
I'd like a single number to allow me to distinguish between these three datasets (generated by the R code below).
library(tidyverse)
sds <- c(0, 2, 6)
dataset_1 <-
c(
rnorm(25, mean = 20,... |
I'm trying to regress one set of hurricane numbers per year onto another, as a way to estimate the proportion of the hurricanes that hit the US, and the uncertainty around that proportion, all in the context of using a Poisson distribution for the distribution of the number hurricanes hitting the US.
I'm using the R co... |
Can Kaplan-Meier plots be used for feature selection when building a multivariable survival model (e.g. Cox PH)? Would a visual assessment (no separation/crossing curves) suffice or would it have to be based on something more formal like log-rank test?
I'm in a situation where I have access to very large amounts of cli... |
I coded a version of the adaptive lasso that does model selection for arch(q) (hopefully garch(q,p) soon) processes.
It optimizes over a grid of 4 parameter.
right now it works with:
LamdaT <- seq(.5,1.7,by=.2)
gamma0 <- 2#seq(.25,1.75,by=.25)
gamma1 <- seq(.25,1.75,by=.25)
gamma2 <- seq(.25,1.75,by=.25)
is the... |
Say a policy was introduced in 1 Jan 2013. I have yearly data from 2012 to 2019 and would like to implement a difference-in-differences model. I am exploiting variation in female intensiveness of firms prior to the implementation of the policy given by $ShareFemale_{i2012}$. $PostAmendment_t$ is a dummy variable which ... |
Here is a simple case of my problem. I want to predict the temperature for 5 meter for next days. I am using two features. Temperature and humidity ( I assumed that I have the humidity for tomorrow). So, I have a problem with normalization.
here is a type of my data set. The training data is for 10 days. So, what is th... |
I made a generalized linear model with an inverse gaussian link.
glm(lone_total ~ class + age + basic_needs_covered_id,
data = mod_data_lone,
family = gaussian(link = "inverse")
)
I have chosen this family and link because of the diagnostic plots, which were bad for inverse.gaussian(link="1/mu^2") or... |
I am struggling with effect size calculations for the Wilcoxon test for one sample in R.
My data:
item1 <- c(1,5,3,4,4,2,3,2,1,4,5,4,3,1)
dt<- as.data.frame(id=1:14, item1)
My Hypothesis:
$H_0: \theta \le 3 \quad vs. \quad H_1: \theta > 3$
With this data I get 3 null differences ($item1-3$) and thus $n$ becomes $11$... |
Dears,
Let's assume, that I have a study like this:
longitudinal, 3 time points, T1, T2, T3. Let's assume T1 is post-intervention.
2 interventions, A and B
2 categorical covariates: Cov1 (2 levels: Cov1.1, Cov1.2) and Cov2 (2 levels: Cov2.1, Cov2.2)
The covariates DO NOT interact with each other.
I want the interacti... |
TL;DR: I am working with binary classifications. I have different models I want to compare their performance out of the box. I read that accuracy is a poor metric, and Brier score or log loss should be used instead. However, I also read that the Brier score should not be used when comparing logistic regression vs. rand... |
Let the following multilevel problem, where we try to predict the credit card balance of individuals $y_i$:
$$
x_{i 1}= \begin{cases}1 & \text { if } i \text { th person is from the South } \\ 0 & \text { if } i \text { th person is not from the South },\end{cases}
$$
and the second should be
$$
x_{i 2}= \begin{cases}1... |
I am asking a question akin to this one: https://stackoverflow.com/questions/71884457/what-does-the-y-axis-effect-mean-after-using-gratiadraw-for-a-gam but am wondering the same question for parametric terms not smooths.
My data looks like this:
df<-structure(list(spreg = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L... |
If there are only 2 groups for each manipulation (2x2 factorial design), how can you do planned contrast or post-hoc analysis comparing between two specific groups? Do you just do t-test?
|
I am trying to forecast using the SARIMA model. I have used
auto.arima(ts,seasonal=T,trace=T)
but the prediction I'm getting is just the previous years values shifted up:
Clearly the 2020 values are just the 2019 values but raised. I'm not sure why this is happening? The model it fitted was SARIMA(5,1,4)(0,1,0)365, s... |
I am dealing with multi-target binary classifications (I have two targets). I need to use a sampling strategy. I have tried imblearn.pipeline but I'm getting the same error as this time when I'm trying to resample before training.
for dataset in dataset_list:
smote = SMOTE()
X_resampled, y_resampled = s... |
Thinking it should be exponential, but I could be wrong.
|
Imagine a simple website where a user can access and can click on a button that will refresh the page. On average, 50 000 requests are made to the webserver of this website in a month. We can assume that the number of number accesses to the website(the first request) in a month follows a Poisson distribution, but we kn... |
I would like to know how an out-of-sample pseudo prediction is obtained in a mixed autoregressive model from a mathematical point of view. and to understand why it is not possible to make the same thing in the model in question by going out of sample.
|
Let's say I have a regression dataset (paired x and y) such that the response variable (y) has an unknown distribution (but definitely not Gaussian) and is large enough such that the central limit theorem holds. If I do OLS with bootstrapping and observe that the bootstrap standard error of the coefficient is far from ... |
Given a quantile function $Q(p)=F^{-1}(p)$ where $F(x)$ is the CDF, one can easily calculate the expected value as
$E[X]=\int_0^1Q(p)dp$. (see e.g., here)
Is there a similar way to get the Variance from the quantile function $Q(p)$? I tried deriving a similar function, but the best I can do is
$Var[X]=\int_0^1(Q(p))^2d... |
Background
I'm performing a feature selection process on a fraud dataset.
The dataset is made up of roughly 300 columns and 40,000 rows. It has a single binary indicator for a target.
A lot of the columns are constant or nearly constant (80%+ one value, 2-10 unique values). I've already removed the constant columns, bu... |
In training/test, we used median for filling missing data. We got the median after the split, so each set had it's own values.
In production every month new data will go throught the model.
Do we use the new data median for imputation or do we use the training set median?
|
I have some data with categorical predictors and I'm wondering about comparing the confidence intervals of difference in means of one pairwise comparison in my TukeyHSD analysis vs that of a two-sample t-test. Which one will have a wider confidence interval and will it always be that way for every pairwise comparison?
... |
I've seen these two definitions of almost sure convergence:
$\mathbb{P}\left(\lim _{n \rightarrow \infty} X_n=X\right)=1$
The sequence $X_n$ converges almost surely to $X$ if there exists a sequence of random variables $\Delta_n$ such that $d\left(X_n, X\right) \leq \Delta_n$ and $\Delta_n \stackrel{\text { as }}{\rig... |
I get everything but the two sentences are confusing me.
Offset is a variable that serves to consider the different exposures of different observation. When properly included, the target variable is directly proportional to the exposure. So, you have mu= w*lambda where mu is target variable and lambda is exposure.
Then... |
Suppose you want to compute the 25% quantile of some random variable. You can do this by first computing the median, and then computing the median of everything less than the median. You can repeat this process as any times as you want, going recursively in either direction from the last computed median, to compute any... |
Suppose that $(X_1,\dots, X_n)$ is an iid random sample from $X\sim f(x;\alpha, \beta)$ and
$$
f(x;\alpha, \beta)=\frac{\alpha x^{\alpha-1}}{\beta^{\alpha}}, \, 0<x\le \beta, \alpha>0, \beta>0,
$$
Show that the MLE of $\alpha$ is consistent by definition.
My work:
Note that the log-likelihood:
$$
\ell(\alpha, \beta)=n... |
I am trying to understand if it is an acceptable practice when match treatment groups with control groups (either one to one or one to many) between a pre (control) group versus a post (experimental) group.
|
What is the best statistical test to be done to determine the best drawing of three drawings?
Given data collected from a Likert scale on various characteristics of the drawings. Questions on characteristics like Colours, size, brush stroke etc...
(Are the colours nice? Strongly agree, agree, neutral, disagree, strongl... |
There is a contradiction in my understanding of Sequential Monte Carlo for estimating Bayesian evidence for model comparison:
Marginal likelihood (aka normalizing constant, aka Bayesian evidence) estimates are supposed to be directly "apples to apples" comparable between different simulations of different models with d... |
I have read that you should use a Z-Test when you have a sample size $ n > 30$, because this is where your sample distribution becomes normally distributed.
The Z-Test equation has more power when you increase the sample size:
$$Z = \frac{\bar X - \mu_0}{\frac{\sigma}{\sqrt{n}}}$$
where $\bar X$ is the sample mean, $\m... |
I wanted to check if these reasonings are correct.
The formula for a multilinear regression, input $X_{s,i}$, where $s$ is the sample and $i$ the features, and output $Y$, is given by:
$$\beta=(X^+X)^{-1}X^+Y$$
Now if we define:
$Q_{ij}=\sum_s X_{si}X_{sj}, M_j=\sum_s X_{js}Y_s$
than the equation is equivalent to:
$$\b... |
In many machine learning papers, there are notations like N(0,I). It seems that notation describes a normal distribution. If so, why did not use N(0,1)?
Could someone describe the difference between normal distribution N(0,I) and N(0,1)? Many thanks
|
Let $X_1,\dots, X_n$ be iid sample from $X\sim f(x;\theta)=(\theta+1)x^\theta$ for $\theta>0$. Find the MLE say $\hat{\theta}$ and the asymptotic distribution of $\hat{\theta}$.
My work: The log-likelihood function is that
$$
\ell(\theta)=n\log(\theta+1)+\sum \theta\log X_i.
$$
The MLE is that
$$
\hat{\theta}=-\left(\... |
The Beta-Pert-Distribution is often used to model uncertainty in risk management. It takes three values a minimum, maximum and most likely (mode).
Generally, these numbers ought to be provided by expert judgement or historical data.
My question: I am using the Beta-Pert distribution in the context of academic research.... |
If I sample a population distribution 2,000 times and get an estimator for the population mean, $\mu$, and the standard deviation, $\sigma$, how can I use these to get the probability that an observation is part of the population distribution?
Mathematically, say I sample the population distribution and get estimators ... |
Iam really trying to understand convergence in probability, but I have an example that I am struggling to understand. Perhaps pointing towards a deeper issue. Take the following simple case of convergence in probability to a constant using the exponential distribution:
I don't understand how this works. Suppose that w... |
Hypothetical experiment:
I want to determine the "best" method of cooking chips - oven or fryer.
I have ten bags of chips, each bag I split in two, cook half in the oven, half in the fryer. for each bag, I rate the cooked chips out of ten for quality. I also time how long each method of cooking takes over all, as well ... |
I want to fit model parameters $\omega$ to a data set $y$, where the model is time dependent, i.e. I want to optimise $f(t,\omega)$. The main problem I'm facing right now is that the data is left censored (below $c$). So I need an error function for my fitting algorithm.
My idea would be to take the maximum likelihood... |
I'm currently looking to run an ARDL model - I'm able to compute results that show cointegration, however there is serial correlation when I run the Durbin-Watson and Breusch-Godfrey tests. To correct for this, I have tried to have larger lags, however this results in most of my coefficients becoming insignificant. I w... |
I'm have an application that after some manipulation boils down to an $\mathrm{ARMAX}(1,1,2)$ with some parametric restrictions:
$$y_{i,g,t}= k + \beta y_{i,g,t-1} + \epsilon_{i,t}+\beta_e \epsilon_{i,t-1}+\sum_{s=1}^2(\eta_{x,s}x_{i,t+1-s}+\eta_{\bar{x},s}\bar{x}_{i,t-s}+\eta_{z,s}z_{i,t+1-s}) \tag{1} \label{1}$$
with... |
I am conducting a mediation analysis using a 4-way decomposition method (med4way command in STATA). According to (https://pubmed.ncbi.nlm.nih.gov/30452641/), after getting the results of the 4-way dcomposition, the formula to calculate mediation is ((mediated interaction + pure indirect effect)/total effect)*100.
My qu... |
From my understanding, the model has high bias but low variance. This indicates underfitting. I assume that the model can flawlessly match the training data since the error rate of misclassification stays zero as the train size grows up to around 124,000 samples. The sudden increase in misclassification error for the... |
Let $X = (X_1, ..., X_n)$ be an independent sample from $N(\mu_1, \sigma_1^2)$ and $Y=(Y_1,...,Y_m)$ an independent sample from $N(\mu_2, \sigma_2^2)$. Consider the following hypothesis test given that $\sigma_1^2 = \sigma_2^2 = \sigma^2$ is unknow.
$$
H_0: \mu_1 = \mu_2 \leftrightarrow H_1: \mu_1 \neq \mu_2
$$
Notatio... |
I am not sure if what I am doing is correct, but here goes:
I want to compare the X big and X small, but they are different in actual sizes. How do I standardize it? Is it by getting each of the sample's (30 samples) z-score?
And after I standardize it, how can I compare it to their respective actual size?
I am truly ... |
I have a panel (N firms across 10 years) dataset on which I want to estimate and test a prediction model $f$:
\begin{equation}
y = f(x).
\end{equation}
Following common practice, I split my data into two parts: training data and test data. My training data consists of the first 9 years and my test data consists of the ... |
I'm having trouble understanding a certain equation in a paper I'm reading.
Let $A, B, C$ be random variables and let $\mathcal{B}$ be the range of $B$.
Let $\mathbb{E}$ be the expected value an $\mathbb{P}$ a probability measure.
Let $\mathbb{1}_{X=x}$ the indicator function that is $1$ iff $X$ takes on value $x$ and... |
How could you explain that during a trial (RCT), some features may have no interactions between them if you consider them as categoric features, but have an interaction if you consider them as continuous features ?
Thank you !
|
I'm trying to use scipy to fit a $\tanh$ function to some data. The data is of the form $(x_i, y_i)$ for $i=1,\cdots,N$, where $0\leq y_i \leq 1$. I choose $x_i$ to be linearly spaced, such that $x_0=0$ and $x_N=1$. $y_i$ are further obtained from repeating an experiment $M$ times, and checking an event happened or not... |
My function plots data and how the data is ordered depends on an argument of the function. The code looks unnecessarily repetitive but I can't figure out how to make the mutate() function (or any dplyr function) depend directly on a function argument. I hoped it could handle the if/else in the mutate call itself. Any i... |
I am interested in fitting a Bayesian mixed-effects model to my data using the brms package. My data includes three grouping variables (Category, BioRep, and TechRep), and I want to estimate category-specific variances and intercepts. I have already generated simulated data and fit a model with the following code:
libr... |
I am trying to write a simulation based on what Cuevas et al. (2004) did. In the paper they explain the simulation as follows:
$ X_{ij}(t)=m_i(t)+e_{ij}(t); j=1,...,10: $
Here $m_i(t)$ is described as
$m_i(t) = t(1-t), i=1,2,3 $ and where the values $t$ have been chosen equispaced in the interval [0,1].
In a part of th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.