instruction
stringlengths
9
38.7k
I have a heavily unbalanced panel data set in which certain entities are missing on the DV in certain years. On this data set, I run the two-way fixed effects model: Y = X + entity dummies+year dummies, where Y is the continuous DV and X is a time-variant predictor. The coefficient estimate for X is negative and signif...
I have a data with 4 columns, all has clear downward trend from 2020 to 2022. Except second column dickey fuller declare them stationary data.I believe due to clear trend all columns are non stationary, is it something i am missing to understand? def Augmented_Dickey_Fuller_Test_func(series , column_name): print (...
I have a model trained as follows. random_search=RandomizedSearchCV(classifier, param_distributions=params,\ scoring='f1', n_iter=100, cv=5, verbose=3, random_state=42, n_jobs=-1) random_search.fit(X, y) final_classifier=random_search.best_estimator_ My question is, do I have to train final_classifier on ent...
I ran one of the models replicating from a paper modifying to my data so this comes out I would like to know Im making the right statement or not "The two strongest predictors were the presence of PC4,PC3,PC5,PC1 along with IDH1 from the gene expression data." Is this a correct statement in statistical sense ? Other q...
It has been proven that the best reconstruction error in the $k$ rank matrix estimation problem in terms of Frobenius or $L2$ norm is given by the $k$-truncated SVD as shown here. I've read in multiple papers and e.g. here that PCA loses consistency for $A \in \mathbb R^{m \times n}$ as $n \gg m$ and alternatives have ...
I am trying to estimate the effect of a university teaching reform on the wage of its graduates. I have panel data from 2003-2017 on all university students in the same country. The university under consideration started implementing the reform in 2009, and the reform can be assummed to have no effect on graduates from...
Just to ellaborate: I’m doing an OLS-test to determine the following things: Do my independent variables have a significant effect on the dependent variable? What’s the direction of the effect of my significant independent variables (positive/negative)? What’s the order of my independent variables by strength of effec...
I can't find how to deal with summation signs ($\sum$) when performing maximum likelihood estimation. I've encountered it in ridge regression: $\frac{1}{n} \sum_{i=1}^n (y_i-\theta^Tx_i)^2 + \lambda\sum_{i=j}^n \theta_i^2$ For instance in the penalty term expression: $\lambda\sum_{i=1}^n \theta_i^2$ How do I with $\sum...
(1) A point is chosen at random in a circle with center at the origin and radius R. That point is taken as the center of a circle with radius X where X is a random variable having density f. Find the probability p that the random circle contains the origin. (2) Suppose n points are independently and uniformly chosen in...
I want to know what is the formula used to calculate group means (for example, mean for the Treatment group and mean for the Control group; or means for the groups A and B) in the context of a mixed model. I know that for the proportions I can calculate them this way: p_A = 1/(1+exp⁡(-(intercept+fixedEffectForTratfB×0)...
Just wanting a sounding board to test whether my idea or thinking is correct. If I have collected data of large quantity with various field (income, age of customer etc) for the completion of a sales promotion (1 for complete and 0 for no complete), I would like to compare gender effect (or whether there is a dispropor...
I wish to assess the effect of teaching strategy on improvement in grades (slope). For this, I plan to conduct a study where students will be assigned different teaching strategies for their tests. For simplicity, let's assume we have three types of strategies (in reality 7). In each strategy group, there will be three...
I'm wondering how can I plot the confidence region of the predicted value in multiple regression that involves categorical predictors, using either R/Stata. I've read about predicting using the main predictor while keeping other predictors at their mean value. In the case of multiple linear regression that has categori...
I'm currently analyzing the data of an experiment and faced a couple of questions. I want to test the hypothesis that: Variable A predicts Variable B. The two variables are the results of 2 tests. Variable A is the average of items 1-22. Variable B is the average of 3 test components. Variable A is not normally distrib...
I am trying to learn how to make predictions for a univariate time series using an LSTM neural network. I know how to work with time series using traditional ARIMA models but with the LSTM I am getting confused. Below I have an example. As an example, consider that I have a univariate dataset with 1000 data points and ...
In this excellent reply, Demetri Pananos estimates a regularized logistic regression model via cross-validation, then bootstraps the sample to derive an optimism-corrected calibration curve for that model. Each iteration uses the same model. The only thing that changes is the sample. In another great reply to a simil...
Let's say I have two different models of an outcome Y, m1 and m2 and perform some kind of cross-validation. I calculate the RMSE and the MAE on the test set (for the two models) and I want to say something substantively about the change in RMSE and MAE between model 1 and model 2. Is it feasible calculate the ratio, su...
I was staring at a time series and thought an interesting way to measure a variance-like value would be to treat the time series like a physical chain and the amount of slack in that chain would be kinda like variance. If the series is constant, you'd have full tension and no variance, if there are lots of wiggles, tha...
Suppose that the probabilities of the positive outcomes of B and C condition on the positive outcome of event A are: $p_1 = Pr(B+|A+) = 0.8 $ $p_2 = Pr(C+|A+) = 0.9 $ And we also know that the correlation coefficient between $p_1$ and $p_2$ is 0.75 (i.e. B and C are paired binary outcomes, e.g. a same cohort of patient...
What would be the best solutions to analyse proportions of multiple classes. The classes are mutually exclusive, with each observation falling into one of the classes (i.e. no other class is possible) and are unordered. For example, having the following data, where observations in the same experiments are dependent (i....
$X$ be a random vector in $\mathbb{R}^p$ and $Y$ a random variable, both with mean zero. Let $\Sigma$ denote their joint covariance matrix: $$ \Sigma = \begin{pmatrix}\Sigma_X & \Sigma_{XY} \\ \Sigma_{YX} & \sigma_Y^2\end{pmatrix} $$ The conditional expectation is given by $$ \mathbb{E}[Y|X] = \Sigma_{YX} \Sigma_X^{-1...
What are the most used measures (coefficients) to compare two partitions of objects into classes? I am speaking of validating the results of classification, not of clustering; the measures known as classification agreement indices. That is, they measure the agreement between partitions with “labeled” (identified) group...
I'm trying to model EU Carbon Permits (EUR) using monthly data($P_t$) as shown below. My objective is to predict EU Carbon Permits price from now to next 20 years (240 months) using monthly data. i.e. data from "after 1 month" to "after 240 month". Since, there are some drift and volatility, I first consider using Geom...
I have a dataset that looks more or less like this (interval-censored outcome, multiple screening events per patient, not synchronised): ID <- c(1,1,1,1,2,2,2,2,3,3,3) sex <- c(rep("F", 8), rep("M", 3)) screen_time_since_diagnosis <- c(48, 400, 760, 900, 20, 360, 800, 1400, 0, 400, 600) outcome <- c(0,0,0,1,0,0,0,0,0,0...
I have not been able to find much information on good practices for dealing with these two issues. The first is a high concentration around the mean, and the second is a large amount of values far away from the mean. First the input distribution shows a large number of values at zero. To normalize I simply computed the...
I am regressing the hire price of venues. I have a dataset with lots of venues containing information on each venue. Each row is one venue and an associated price and an associated day of week from Monday to Sunday. So each venue has 7 rows, one for each price on each day of the week. I have found that for the majority...
I have a model with a negative binomial distribution using the glm.nb function from R: Call: MASS::glm.nb(formula = Counts ~ Gender + offset(log(Offset_Days)), data = r_dataset, init.theta = 1.023811633, link = log) Deviance Residuals: Min 1Q Median 3Q Max -0.5973 -0.5973 -0.5594 -0.5...
If we have a set of data of how long one watches youtube, these data points only include the raw number of minutes watched. If it is known that some of those data points include situations where you watched youtube for a while then left the room and let the videos play out. How would we statistically set out a period o...
I am testing the impact of a policy in USA and I would like to use IPUMS data for all the states in the united states with 4 states experiencing the treatment in a particular year. I was thinking of converting the data into panel data structure by aggregating it by state by year to create the historical data but I just...
I have a cloud of points in a bounded volume in 2D (lets say 2d for now, though it'd be nice to generalize to any dimension): $<p_n \in \mathbb [0, 1]^2: n \in [1..N]>$ I'm looking for some efficient measure of the "clusteredness" of these points - ie how "clumped together" they are. Characteristics that I would like t...
I performed a series of meta-analyses in which we corrected correlation coefficients for measurement unreliability. A reviewer is asking us to define the magnitude of the meta-analytically-produced disattenuated validity coefficient (given as ρ). I was operating under the assumption that these rules of thumb were the s...
I am trying to run a TVP-VAR for a panel in python using statsmodels. I am using the site example, trying to adopt it in my model. Data are from 1945-2020 for 50 countries Furthermore, I am getting an error primary in setting the self. In the class definition. NameError: name 'self' is not defined, I have seen the ...
Assume you sample two numbers, randomly drawn from 1 to 10; you could choose two strategies: 1) pick with replacement and 2) pick without replacement. Which strategy would you prefer to maximize the expected product? I encountered this problem while preparing for an interview. My intuition is picking with replacement w...
I am currently experimenting with some machine learning, which is going well. However, I am curious if there is a way to show that the $RMSE$ I am achieving is sufficiently small enough for the data set. For context, the data I am working with is on a scale from $10^0$ up to a scale of $10^2$. With an SD on the order o...
What is the probability that a simple 1d random walk is between (-k,k), exclusive, in 100 moves? My initial though was: $1-\sum_{i=k}^{100}P_i$, where $P_i$ stands for the probability that it reaches $k$ in $i$ number of moves.
I was reading this paper https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.143.8127&rep=rep1&type=pdf , and it heavily uses conditional independencies for deriving various identities, which I could not check by myself if they are correct. Let me ask three closely related ones that particularly seemed non-trivia...
I'm looking for statistical differences between two classifiers by applying the two proportion z-test formula to them and then performing the hypothesis test. If p1 and p2 are the balanced accuracy scores of classifiers 1 and 2. p = (p1+p2)/2 z = (p1-p2) / √p(1-p)(1/n1+1/n2) = (p1-p2) / √p(1-p)(2/n) I was wondering ab...
I'm doing regression analysis on predicting number of products to order during promotion period. However, my numerical features only consist of discount amount and temperature while I have so many categorical data (such as one hot encoding marking the DOW, months, holiday etc). To be more specific, all my categorical d...
“The inclusion of an irrelevant explanatory variable in a regression has more serious consequences for OLS estimation results than the unjustified omission of an explanatory variable.” Explain whether this statement is true
I am building a price elasticity model using linear regression: log(demand) ~ 1 + log(price) + ... Does it make sense to use L1 and/or L2 regularization to prevent over-fitting, or would that lead to inaccurate elasticity estimates?
I ask this because the geepack does not "depend" or import from the stats package according to https://cran.r-project.org/web/packages/geepack/geepack.pdf. the stats package has the function residuals(fitted object) and resid(fitted object). residuals {stats} R Documentation Extract Model Residuals Description residu...
I asked in a previous post how to check the validity conditions of a linear mixed model I made, and here is the link. After additional diagnostics, I have the impression that the distribution of the outcome variable is a bit right skewed. Here is the distribution of the residuals: Also with the package performance I ...
Longitudinal logistic regression can be used to approximate the hazard ratios from a Cox model: https://hbiostat.org/stat/binarySurv.html In the first paragraph, Frank Harrell states: In the special case where the response variable for a time interval is binary, the event is a terminating event, and interval event prob...
My goal is to predict delivery cost by distance and client. Data sample. Known clients are one-hot encoded. distance client_a client_b cost 8 0 0 130 15 1 0 180 12 1 0 153 18 0 1 184 15 1 0 180 20 0 0 250 12 1 0 153 16 0 1 168 10 0 1 120 13 0 0 180 I suppose a formula $$ cost = (distance \...
I was wondering how one would properly validate the reproducibility of a trained clustering model on a completely new set of data. Imagine you are clustering a patient population in hospital A. You find three clusters, one cluster with mainly cancer patients, one cluster with mainly cardiovascular patients, and one clu...
I'm taking Coursera's course on probabilistic graphical models, and I'm stuck on a question. The discussion forums there are dead, and I can't find any resource to help me, so I hope someone could enlighten me here. We have a model of cystic fibrosis described with the following bayesian network: We need to count how ...
Consider the two pairs of learning curves below. The red and green lines are the training and validation curves of some model 1, and the gray and orange lines are the training and validation curves of some model 2. Both models were run on the same data with the only exception that model 1 is run on a more complex mo...
During training I get unusual behavior of my model. Peaks show up in the both validation and training errors that I could not understand. I use MSE as a loss 1 and similar behavior appears in other metrics MAE 2 and MPAE 3. I am using Deep LSTM model to do regression to approximate another function (time sequence -> re...
I am new to regression analysis. Some information about the data. Income is the dependent variable (continuous) and segments are predictors (nominal factors / categorical) Estimate Std. Error t value Pr(>|t|) (Intercept) 79367 13510 5.874 0.0000000151 *** segmentSegment2 -5...
I'd be grateful for thoughts on this problem. I'm considering a sample size calculation for a two-armed (controlled) trial with an 8-point ordinal outcome. Patients present with brain injury, are randomised to recieve either the treatment or control, and are followed up at 6 months using the standard outcome scale for...
I noted from a post here that $$var(z - \mathbf{A}x)=var(z)+var(\mathbf{A}x)-\mathbf{A}cov(z, -x)-cov(z,-x)\mathbf{A}^T (Eq. 1)$$ (I dropped the conditional part in the original formula from the post since I believe it irrelevant to my question. If I write the above formula incorrectly, please refer to the original for...
Let's say we have an observed outcome $Y_i$ for an object $i=1,\ldots,I$ that arises like this: For each object a coin is tossed (outcome $X_i$ = $H$ or $T$). We know the coin is fair, so $X_i \sim \text{Bernoulli}(0.5)$, but we do not observe the outcome $X_i$ of the coin toss. Then dependent on $X_i=x_i$ you obse...
Going through Sharon L. Lohr's Sampling design book (2nd Edition), I have no issues with the content all the way until it goes into the proof in chapter 2 on SRSWOR that $E[s^2] = S^2$, where $S^2$ is defined as: $$ S^2 = \frac{1}{N-1}\sum_{i=1}^{N} (y_i - \bar{y}_{U})^2 $$ And the sample variance estimator is: $$ s^2 ...
Why is it not practiced using estimates of fixed-effects from fisher scoring used to calculate GEE coefficients to estimate random-effects via empirical bayes? We have another estimate of $\theta$ in GEE. Indeed, when fitting mixed models with maximum likelihood, estimates for the random effects are obtained in a seco...
I have three datasets. They contain the angles between a set of vectors (V1) and three other sets of vectors (V2,V3,V5). The datasets should all be continuous and non-parametric, I don't expect a certain distribution. I want to test if the distribution of the angles in each set is different than the other two sets (I a...
Say the distribution of underlying data points is multi-modal and we have an extremely large data point that has been confirmed to be an outlier. If it is not acceptable to simply remove the outlier then what techniques are there to reduce the outlier to an acceptable value? Apart from Winsorising (unless this is the o...
I like using R model formula notation such as $Y \sim X_1 + X_2$ when thinking of regression relationships at a high level. The same for lmer notation such as $Y \sim X | group$. I am wondering how standard it is. Does it show up in journal articles? If it is R or S's or lmer's innovation, I probably would not put it ...
I trying to find $\pi_{1}, \pi_{2}, \pi_{3}$ for model: $$ Y = \pi_{1}X_{1} + \pi_{2}X_{2} + \pi_{3}X_{3} + \epsilon, $$ with constraints: $\Sigma_{k}\pi_{k}=1$ and $\pi_{k}\geq0$. (All $\pi$ are positive and add up to 1) I found a very similar question here that tried to minimize squared errors: $\Sigma_{i}(Y_{i}-(\pi...
I'm looking for some help to determine what type of model I should use for the given data set: structure(list(Date = structure(c(15706, 15737, 15765, 15796, 15826, 15857, 15887, 15918, 15949, 15979, 16010, 16040, 16071, 16102, 16130, 16161, 16191, 16222, 16252, 16283, 16314, 16344, 16375, 16405, 16436, 16467, 16495,...
In a dataset I have running through on kaggle's tabular playground, some of the measurement columns that are missing values follow a gaussian distribution. I want to fix these missing values by replacing them with mean/median/interpolated values from the distributions but most of them have large skews/kurtosis values t...
I'm trying to plot a collection of items where each item has an x-range, and a y-value. The below variation of a bar chart is what I had in mind, but I can't find a software tool that appears designed to plot it. E.g., perhaps comparing the customer satisfaction for four construction projects that took place in a 10-we...
I'm analyzing some data, using GLMM and obtain very strange results. The data is of student passing a test, each group of students belong to a different school. So I analyzed the data using glmer(is_pass ~ (1|school), data, family = 'binomial'). The schools are the random effect. Now, the proportion of passing is very ...
What are the most used measures (coefficients) to compare two partitions of objects into clusters? I am speaking of validating the results of clustering, not of classifying; the measures known as external clustering criteria or supervised cluster validity indices. By "clusterings" I mean different cluster solutions, i....
A lot of conjugate priors are known for a lot of likelihood distributions (mostly the exponential family). But most Bayesian models in practice don't just consist of one distribution. Usually, you have a hierarchical model, a network, or some other way of combining simple distributions into a more complicated one. In t...
$\mathrm{E}\left[u u^{\mathrm{T}}\right]=\sigma^{2} I_{n} \text { is untrue } \iff \text{heteroskedasticity?}$ I know heteroskedasticity $\implies \mathrm{E}\left[u u^{\mathrm{T}}\right]=\sigma^{2} I_{n} \text { is untrue }$ I have no idea whether $\sigma^2I_n \neq \mathbb{E}[uu^T] \implies \text{heteroskedasticity}$ h...
Does the sandwich-estimator/Huber-White/GEE eliminate heteroskedasticity in a residuals versus fitted plot, or simply make the model robust to it?
Let $x$ be a $d$-dimensional real valued vector. It holds $x^{T}A B^{1/2}\dfrac{1}{\sqrt{n}}\sum\limits_{t=1}^{\lfloor ns\rfloor}\epsilon_{t}\to \|x\|_{ABA} W(s)$ for $s\in[0,1]$ with $\epsilon_{t}$ iid with mean zero and variance one, $W(s)$ being a $d$-dim standard Wiener Process and $A$ and $B$ being $d\times d$ ma...
How does one compute the "normalized" model residuals based via geepack's geeglm/gee in R? The nlme package in R allows one to compute the normalized model residuals: (standardized residuals pre-multiplied by the inverse square-root factor of the estimated error correlation matrix) GLS takes into account an non-compo...
I've produced a negative binomial regression where the dependent variable is the number of AIDS-related laws passed by each of the US's fifty states in 1989, with the independent variable of legislative session length (unit of analysis = 1 day) and various other control variables. The coefficient for the legislative s...
I am working on an anomaly detection problem in network data. My dataset consists of aggregated data over a fixed period of time (1mn window). For numerical features we store averages and for categorical data we store counts, the latter can be very large (up to ~3000 in some cases) but also contain a lot of zeros. The ...
Given a sequence $\{x_k\}_{k=-N}^{N}$ having power spectral density $S(f)$, we know that that "single realization PSD" $$ \frac{\Delta t^2}{T} \left| \sum_{k=-N}^{N} x_n \exp(-2\pi i f n \Delta t) \right|^2 $$ is not a consistent estimator of the true PSD, which is defined as an expectation over this "single realizatio...
Say I trained a Logistic regression model on a training dataset (sample = 2000), using Standardization. I than test the model on a test dataset (sample = 400) using the Standardization parameter learned from training. The result are good, obtaining roughly the same performance metrics as the training. I then deploy the...
Suppose that I am concerned with the effect of treatment in each stratum, let's say A, B, and C. What is the most appropriate statistical method given that I want to understand the treatment effect and its statistical significance within each group? I've considered the following methods: Stratified T-Test Stratified S...
I am analysing fishing surveys using the survey package. My PSU is the person and I want to obtain estimates of the proportion of successful fishing trips. Each person has a variable number of fishing trips (trials) and successes. I can use svyratio() to calc p.hat = mean(successes)/mean(trials) or I can calculate p.i ...
https://colah.github.io/posts/2014-03-NN-Manifolds-Topology/ mentions that neural networks learn a representation of the data so as to make the classes linearly separable. What I fail to see is how does a neural network create a separating hyperplane that separates the classes. How do we know that it creates a hyperpla...
Person A randomly chooses a number from 1 to 5 (inclusive) twice, so A ends up with 2 numbers chosen (can be the same number). Person B also makes a random choice from that list (only 1 number). What's the probability that B's choice match at least one of A's choices? My interpretation of the question is: what's the ...
I have been practicing Data Science/Machine Learning, and I am confused about when to complete the following tasks when using train-test split in scikit learn: EDA Filling in missing data Removing data that isn't needed Working with categorical data Feature Engineering Feature Selection I know that scaling should be ...
In linear least squares we are trying to fit a line to data. A line is the simplest model that can be fit to the data. How is it possible for a linear model to over-fit the data? In short why do we need regularization for fitting a line to a data? I understand that regularization improves generalization performance ie ...
Let N_train, N_val and N_test are the number of examples in training, validation, and test sets. As I understood, in general these values are taken as N_train >> N_val ~= N_test. As I understood, the loss and metrics are evaluated (in an average sense) on the whole training set. In this context, how can we compare the ...
I am trying to figure out what happens to my results if I unintentionally introduced multicollinearity. I have an unadjusted version of this regression that includes an interaction term. The unadjusted regression is $Y = X_0 + X_1*X_2 + \epsilon$ -- where $X_1$ is my treatment and $X_2$ is a potential confounder - part...
I know one way is to sample A and B independently and then reject the samples where A<B. But I wonder if there is an easier method?
Given likelihood is a function of parameters, I cannot understand why the expectation of likelihood functions is not calculated with respect to the the parameter space but the sample space, as put here in Wikipedia, 'the score is a function of $\theta$, it also depends on the observations at which the likelihood functi...
Following up on this question and the answer: Bootstrap variance of squared sample mean Summary: $X_1$, ..., $X_n$ are IID. Define $$ \overline{X}_n=\frac{1}{n}\sum X_i $$ and $T_n=\overline{X}_n^2$. The rest of the question deals with computing bootstrap variance of $T_n$, for which one needs to compute $\mathbb{E}_{\...
The same question from another user can be found here Is it helpful to have monotonic features when using a random forest for classification? To rephrase, my question is: Let's say we have a feature, for example City, with 4 categories Missing, A, B and C. And the corresponding event rates are Missing: 10%, A: 5%, B: 2...
I ran a survey that gives participants multiple A/B pairs (16 pairs). For each of the pairs, I ask the participant to select Option A or Option B. Therefore, I have 16 responses per participant. The sample size of the survey is 50 participants. Overall, participants selected Option A over Option B for 80% of the time (...
I could use some help interpreting a glmer output? I am unsure how to get the odds of a non-reference level since there is an interaction. I have observations of whether two female sharks (one young and one old) are resting or not (1s and 0s), and want to know whether the presence of a male changes their resting behavi...
I'm a currently developing a regression model based on the Choquet Integral. To tackle outliers I am using the Quantile Transformer, provided by scikit-learn. I was wondering how the quantile number corresponds to the quality of the normalized data. By default, the Quantile Transformer from scikit-learn is setting the ...
If features of the Naive Bayes are not independent then what are the consequences of the results?
The plot below shows the sample size needed to detect a proportion with a precision 0.01 for various true proportions: This assumes an infinite population size, and the confidence intervals are fixed at 0.95. If the true proportion is very small (or equivalently, very large) then we need a sample size of under 1000 to...
I'm trying to select the most highly variant features of a matrix, where I have my features per column vs the samples per row. With the following data frame, how can I determine the variance and from here extract the top 3 features with high variance for example my dataframe. Do I just need to account for the variance ...
Say I have two six-sided dice, A and B, which are loaded in different ways, and I'd like to compare their probability distributions. So far I've constructed the priors for the probabilities $\vec\pi = (\pi_1,...,\pi_6)$ for both dice as a Dirichlet distribution, with $\vec\alpha=(1,1,1,1,1,1)$ in both. If I roll each d...
Suppose you are training RL DQN model for lunar lander with finite fuel amount. Hence in addition to "usual" reward derived from the lunar module position there are different costs in fuel for each action. What is the "correct" way to solve it? Shall I subtract the fuel cost from the reward or shall I introduce additio...
I have one IV (faculty) and multiple continuous DVs and wanted to do a one-way MANOVA. As MANOVA requires normal-distributed data, I plotted the DVs and saw that they are heavily long-tailed (keep in mind y-axis is already log-scaled): Now, I was reading a lot about possible solutions to this. These include data tran...
Definition of level or size of a test A test is said to be of level or size $\alpha $ if $\sup _{\theta \in \Theta_0} \beta(\theta)\le \alpha$ where $\beta$ is the power function Exercise We want to test the hypothesis $H_0: \lambda = 65$ where $\lambda$ is the parameter of a Poisson, against the Hypothesis $H_1: \lam...
I am reading a tutorial about RandomizedSerchCV here and I am still confused about what to do after getting the best parameter values. I hope that you could confirm my understanding. Here's the code referred from the blog post above from sklearn.model_selection import RandomizedSearchCV # Number of trees in random for...
I've been working the last days on figuring out how to simulate the required power for a longitudinal single-group study with 6 assessment points. The outcome of interest is continuous. Since the questionnaire is new and hasn't been validated yet, I do not have any prior information based on the literature. I tried to ...
Are the model residuals from GEE interpretable as residuals from simple linear regression, so that I may plot a residual versus fitted plot to determine whether there's heteroskedasticity? It is known that residuals of the model from a generalized linear mixed model are not useful by themselves to determine heteroskeda...
I am struggling with R loess function in R. I have a dataframe on which I would locally weighted polynomial regression For each ‘Gene’ is associated a Count (log10 transformed) which gives information regarding the gene expression. For each Gene is associated an ‘Integrity’ measurement (span 0-100) which tells you the ...
Assume you're tossing a fair coin; you win only if you get (i+1) consecutive heads right after (i) consecutive tails; what is the probability this game never stops? My attempt is as below: $P$(never stop)$=$$P$(1 T before 2H|1T)$*$$P$(1 T before 3H|1T)$*...=\prod_{n=1}^{\infty}(1-\frac{1}{2^{n+1}})$ However, could anyo...
I'm trying to derive PCA using matrix derivative. Most textbook tend to firstly derive the base case when $L=1$, where $L$ is the dimension of transformed vectors $z$. Notation: $\mathbf{X}_{N\times D}$ is the design matrix (data matrix) and $\mathbf{W}_{D\times L}$ is the PCA transformation. And $\mathbf{W}$ should be...