instruction
stringlengths
9
38.7k
I want to use the Bayesian Information Criterion in order to measure how well a gaussian and 0 order polynomial fit (using python), the one with the lowest BIC should then be the 'best fit' ? My parameters are already known by using scipy.curve_fit, then all I should have to do is determine $\mathcal{L}$ the maximum of...
I am struggling with understanding the result of FFT in R. I have 729 observations, two years data. In the data I simulated there were more visitors every sunday. I divided 729/7 which is approximately 104. And there was a peak indeed, but also two others, which I didn't get. I see that they are at possitions ~104 x 2 ...
Question summary I recently came across the idea that reconstruction and retrieval are two opposing objectives. In particular, optimising a model with regard to a mean squared error (MSE) loss should yield bad retrieval scores, and vice-versa. I don't understand why this would be the case: to me, optimising a retrieval...
Assume that I have a matrix $X$ that has the size $m * n$ and a class ID vector with the length $n$. If I want to apply Kernel Linear Discriminant Analysis (KLDA) onto the matrix $X$ and vector $y$, then I need to use a kernel onto K. For example a linear kernel. $$K = X*X^T$$ This will turn $K$ into a $m * m$ matris. ...
I would like some clarification as to if independence as referred to in both of the following cases, is the same or different. I would assume they are different? Scenario 1: For any SINGLE trial of a random experiment, when P(A|B)=P(A) and P(B)=P(B|A). If when it is given that one happens, it doesn't change probability...
I'm attempting to derive the covariance between the sample mean for the treatment and control arm of a completely randomized experiment where the units in the experiment, $n$, are a random sample from a larger, but not infinite, population $N$. Define $A = \frac{1}{n_t} \sum_{i = 1}^{N} y_{i, t} \cdot T_i$ and $B = \fr...
Suppose I have a uniform distribution $X \sim U[a,1]$ with $a \sim U[c,1]$? How can I characterize the CDF of X?
I skimmed through a study: Excess Death Rates for Republican and Democratic Registered Voters in Florida and Ohio During the COVID-19 Pandemic that estimates excess death rates of Democrats and Republicans in Florida and Ohio during the COVID-19 pandemic. In short, this is done by fitting a Poisson regression model to ...
Recently, I learnt that one can also calculate a p-value for the Pearson correlation coefficient. My question is not about computation of this p-value. (Based on what I read from other posts, we first calculate the t-statistic and then convert it to the p-value.) I would like to ask about the meaning of this value beca...
I tried the following syntax: MTX0 <- ' # First-order factors StwR1t0_latent =~ S1pR1t0 + S2pR1t0 + S3pR1t0 RtwR1t0_latent =~ R1pR1t0 + R2pR1t0 TtwR1t0_latent =~ T1pR1t0 + T2pR1t0 + T3pR1t0 + T4pR1t0 GtwR1t0_latent =~ G1pR1t0 + G2pR1t0 + G3pR1t0 # Second-order factor MuTex =~ StwR1t0_latent + RtwR1t0_latent + TtwR1t...
I am learning about time series decomposition using the X-11 method in R. I am following the book “Forecasting: Principles and Practice (3rd ed)” by Rob J Hyndman and George Athanasopoulos, which uses the seasonal package to perform seasonal adjustment. I have a question about the seasonal component obtained from the X...
I was wondering if someone can help with explaining Functional Principal Component Scores? I am working with a dataset which reflects participants in a weight loss management trial (longitudinal data). The dataset consists of 1139 participants and four observations of weight (sparse data). The observations of weight we...
I would like to analyse whether measures A, B, and C have a different influence on a measure D compared to a measure X on D. My exploratory hypothesis is that A, B, or C could influence Z negatively while X positively influences Z. Additionally, I need to account for covariates. While the most obvious way would be to c...
I was recently asked why I haven't analysed interactions in my (predictive) regression model (I understood "interactions" here to mean products of predictor variables). The easy answer is that I had no reason to suspect interactions. But, more deeply, I wonder why interactions are so special? They are simply non-linear...
I want to simulate a dataset whereby I have a continuous variable that represents a response to treatment (normally distributed). The dataset should also include sex (50:50) and age (normally distributed) when starting treatment. I want to create the dataset such that: If I perform a linear regression on sex or age ac...
I am working with a medical clinic to develop a residency program for certified medical assistants (CMAs). The clinic would eventually like to know whether the residency program is successful in reducing turnover among CMAs. The turnover rates of CMAs who did not complete the residency program will be compared to those...
A rather basic question, prefaced by the fact that I know just enough about statistics to be dangerous. I work with Air Force Technical Training. I am trying to compare the ebb and flow of students in a particular course throughout the year with the average number of students in that course per day. Sometimes the actu...
Suppose I fit data according to the following piecewise exponential model. So that the intensity is 1/50 for event times in the first 50 days and then 1/200 subsequently. library(survival) set.seed(123) x <- rexp(100, 1/50) x[x > 50] <- 50 + rexp(sum(x > 50), 1/200) plot(survfit(Surv(x) ~1), conf.int = F) I find I ...
If I have the following regression model: Where stock price is continuous dependent variable and earnings is a sole continuous independent variable. Earnings extremity is a categorical variable (three categories: small extremity, moderate extremity and large extremity), earning extremity1 = 1 if moderate extremity and ...
Are there independent random variables $X$ and $Y$ such that the distribution for $Z = X^2 - Y^2$, is $Z \sim N(0, 1)$?
Problem: Suppose we have a population of size $m$ and we're taking simple random samples (without replacement) of size $n$. Let's denote the mean of the entire population by $\mu$. Assume we take $k$ such samples and calculate their means $\mu_1, \dots, \mu_k$. Calculate the standard deviation of the observed sample me...
I'm new to GAMs and running some univariate and multivariate models in R with mgcv. I'm struggling to understand differences in model output between the uni and mulivariate. Ex: A plot for a univariate GAM. gam(effect ~s(percent_precip_min_pe_day_smallgrid_precip_FALL, k=4), data=input_data, method="REML") And this i...
I am currently analyzing data using a growth curve model, and I have one question that puzzles me. I wonder why the intercept values keep changing when I add random effects or higher-order terms to the model. Moreover, in some cases, an intercept from a growth curve analysis becomes negative, even though it is clearly ...
I have a limited set of repeated experimental values, roughly 100. The original experiments are expensive, so creating more data points in not an option. If I use bootstrapping to estimate the mean and std error, then each bootstrap iteration samples abut 63% of the data elements, repeating those to fill in the N data ...
Reading the causality literature, we see the concepts of "interventional" and "counterfactual" query as well as "interventional" and "counterfactual" distribution mentioned frequently without any explanation of how these concepts are related and/or different. For example, see these resources: https://www.nature.com/ar...
I am trying to rewrite the demonstration given in Bishop's book: Pattern Recognition and Machine Learning (2009) I reproduce the figure (page 149) in which I am unclear about the step leading from (3.39) to (3.40) and described with this judgment: "We now take the expectation of this expression with respect to D and n...
I am currently writing my master thesis an the effect of academic publication on anomaly returns. The idea is that in finance literature anomaly - factors/portfolios are proposed. After the factor is published in a journal the time series of the returns of the factor, which was positive before, decreases significantly....
I am working on power analysis for a project. I want to benchmark effect size from another study. How can I find the effect size (Cohen's d) just by looking at the regression table below? For instance, how would you calculate the effect size from the regression table below: ---------------------------------------------...
I'm newcomer in statistic so I'll ask probably stupid question: if normally distributed observation required to use t-test, why couldn't be used z-statistic and subsequent calculation of probability? I mean, our observations came from $N(0, 1)$, so why it must use some strange terrific t-distribution, when using normal...
A couple decides to keep having children until they have the same number of boys and girls, and then stop. Assume they never have twins, that the "trials" are independent with probability 1/2 of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children? A s...
I would like to compare the total number of public M&A transactions observed in two separate years (e.g. 2021 vs 2022). Given the data set for each year is complete (i.e. a population), can I simply compare the counts and determine an increase or decrease in activity? Or should I view each count merely as samples of a ...
I've read several posts related to this, but I'm not sure. so I'm posting the question in case it's redundant. I have been conducting an experiment using a within-subject design, comparing three conditions. The collected data is continuous and ranges from 0 to 240 (approximately). (I used a simulator sickness questionn...
Originally I ran multilevel regression on to exam how social network properties (SNPs) (e.g. degree, centralities, group size, group centralizations ...) affect individual's productivity outcome. Now I would like to see if the relationship between the predictors (SNPs) and outcome (productivity) is similar or different...
I have an $m\times n$ matrix $X$. To apply a Kernel PCA to my $X$ matrix I need to warp it into a function $K = \Phi(X)$. The problem here is that $K$ get the size $m \times m$. If I'm doing projection with PCA. % Average mu = mean(K); % Center data Y = K - mu; % PCA analysis abort = input(sprintf('The size of the ma...
In the attached image, the x-axis is the proportion of children at a school who passed at least 5 GCSE exams that year, and the y-axis is a count of the schools. The different colours are whether the school is in a rural or urban area. I want to do a regression to see how the school being in a rural vs. urban area affe...
The following R codes produce one graph for time series, while the next chunks of codes produce 8 graphs. Why? births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat") birthstimeseries <- ts(births, frequency=12, start=c(1946,1)) birthstimeseries plot.ts(birthstimeseries) The 2nd chunks of codes: library(...
I'm trying to model the relationship between two variables. Without going into details on how I get this expectation, my belief on the relationship between the variables looks like this: However, as time advances I start to see instances of the true relationship. Early on, I might see something like this, where the or...
I am working on a small project to optimize the performance of an iron electrocoagulation reactor for water treatment. My professor wanted me to build a model to predict turbidity removal based on variations in 3 input factors (Charge dosage, Charge Dosage Rate, and Conductivity of water). After some literature review,...
Is the following M4_regular_matrix time series data? I am a bit confused since The rows indicate locations although the columns consist of time. We actually collected data of every location for 8 different time points. library(Matrix) i <- c(1, 3, 8, 4, 2, 7, 6, 9, 1, 4, 10, 5, 11, 2, 12) j <- c(2, 5, 3, 8, 6, 2, 4, 2...
I struggle with the following question: I had to scale variables for model selection as they were in very different units and the model struggled to converge. Now that I have a final model the variables that are left in the model are variables that do actually have the same units. I would find it much easier to interpr...
Comparing results from LASSO and robust regression I find that in some cases variables with high magnitude coefficients in robust regresison are shrunk to 0 in LASSO. Any intuition here? Coefficients below. lasso_s0 rlm_coef variable 0 59.3544 X9132 -0.7579 27.4932 X7729 10.494 20.4771 X7353 0 18.0548 X83...
I am interested in characterizing the statistical surrogacy condition $Y \perp W | S$ as per the setup in: https://arxiv.org/abs/1603.09326. Suppose $Y_{i} \in \mathbb{R}$ is the outcome of interest, a surrogate vector $S_{i} \in \mathbb{R}^{K}$ and binary treatment $W_{i} \in \{0,1\}$. Using potential outcomes notatio...
I am running Causal Inference to determine whether the mass of a vehicle affects the Co2 emissions. I understand that DoWhy follows a particular structure that is modeling-> identification -> estimation -> refutations. I was logging the outputs of each step in Python. I am having trouble understanding and interpreting ...
Consider the relationships among four variables: sex, activity, height, and weight, as depicted below: Suppose that weight is the response variable. When sex serves as the predictor, there is no need to control for any covariates. However, when activity is the predictor, we should include both sex and height as covari...
I am trying to run an ANOVA test in R, but I do not have access to the entire data and only know the means of the three groups. Here is an example of what my data looks like: avg_ikdc <- c(49.3, 79.1, 82) avg_kujala <- c(56.5, 86.5, 89.3) avg_vas <- c(3.8, 2.5, 1.9) f_u <- c("pre","short","mid") combined <- data.frame(...
I am currently working on my final project CS degree that involves analyzing swimming data, specifically focusing on both heartbeat and motion data. I am looking for a dataset that includes these two types of data together. I have searched through popular data repositories like Kaggle, UCI Machine Learning Repository, ...
I have data from a study where participants saw an image and were supposed to judge whether it was an AI generated image or not. The Hypothesis I want to test is if they actually are able to differentiate between AI and human, where my prediction is that they can not really. My question now is what test I could use for...
The business question that I am trying to answer is: what group(s) of people have the highest chance of default? The features that I have are income, debt to income ratio, fico, etc. How do I find the right group (assuming that I want to cut ~5 percent of the population). This is an easy exercise when I only consider 1...
PCA: For a given set of centered data $\mathscr D =\{x_i\}_{i=1}^N \subset \mathbb R^d$, i.e. the data has $N$ examples with dimension $d$. Then the principal directions of PCA can be obtained from the columns of eigendecomposition V of $X^\top X = V\Lambda V$ such that $V^\top V = I$. But when number of features is to...
In my application, I am working with a relatively long time series of daily market index percentage returns (many years) and am trying to model the dependence structure of the returns from a pure time series perspective (if there is any) and analyse the probabilistic properties of the residuals after any dependence is ...
(I actually asked the following question on Stack Overflow recently: https://stackoverflow.com/questions/76842431/confusion-about-the-code-for-choosing-stumps-in-adaboost-algorithm but then I realised that a handful of previous questions in the "Adaboost" category of Stack Overflow remain unanswered for a long time, ...
I am trying to reason to myself why is it that VAEs can approximate arbitrary probability distributions even though $q_{\phi}(z|x)$ and $p_{\theta}(x|z)$ are Gaussian. I understand that the parameters are typically learned using neural networks $\phi = f_{w}(x)$ and $\theta = g_{w}(z)$, where $f$ and $g$ denote arbitra...
I have a survival data on approximately 6 million observations. The "failure" I'm dealing with is very rare - about 0.5% has the event of interest. I have three questions: Can I perform a case-control analysis with Cox regression? If the answer is yes - do I just need to sample, let's say, 10 controls for each case, a...
I was always interested how statistics is used to estimate e.g. Weight of an animal from its foot size Age of a shark from some measurements in its eyes Age of a tree Approximate population of some species Is there any book/article/tutorial/course/ where can I read more about some examples how these estimates are mad...
Why $$\begin{align*} l(\theta) &= \sum^m_{i=1} \log p(x^{(i)};\theta) \\ &= \sum^m_{i=1} \log \sum_{z(i)} p(x^{(i)},z^{(i)};\theta) \end{align*}$$ Find this equation from cs229-2018 problem-set3.4(semi-supervised EM) What is the logic behind this how it becomes two summations? Where is $z^{(i)}$ come from?
I want to test the effect of a suicide prevention film on help-seeking. I have help-seeking intentions as an outcome variable and measured this variable at three time points (pre, post, follow-up) in 40 participants. To analyse the data I would conduct a one-way repeated measures ANOVA and compare mean differences betw...
I'm currently immersed in a challenging forecasting project centred around predicting the required work hours to complete various tasks within a team setting. My dataset comprises crucial attributes, including team IDs, task IDs, hours, and dates. Specifically, I'm working with a comprehensive dataset containing distin...
I am reading: https://www.econstor.eu/bitstream/10419/128519/1/ewp-356.pdf The footnote on page 19 says: The trend was derived using the Hodrick-Prescott method where the smoothing parameter λ is set to 1,600. Since the first two principal component account for about half of variation, half point 0.5 was used as criter...
I am trying to construct a grid approximation of the probability that an event will occur on the discrete interval 0 - 10, the spacing is 0.01. The probability that any single event on the interval is. $$ \begin{align} p(succes|observations) &\sim Binom(n,p)\\ p &\sim Beta(a, b) \end{align} $$ Where a = number of times...
In a forest of 100 Acre, let 10 (1 acre size) plots be the sample. Inside each plot, one took measurements of total trees and trees diameter. It is reasonable to think about the number of trees inside each plot (counts). However, in terms of tree diameter, it is reasonable to think about the average. The sum of all tre...
I was going through computer vision lecture video. You can find the pdf of this lecture here. I was trying to understand how orientation of object corresponds to axis of least second moment aka inertia. Its discussed in above lecture video and page 5 to 7 of the monograph. Below is my understanding: Second moment of...
I currently have 200 observations from different (randomly sampled) participants. For each participant, I have 4 measures: MS1, MS2, MS3, MS4. Each measure is a different binary measure for a biological condition. Such that, 1 = has the condition, 0 = does not have the condition. Given this, it is highly likely that if...
Consider an (unnormalized) univariate distribution in the exponential family, which is in canonical form: $$\varphi_{\theta}(x)= \exp \bigg( \frac{\theta}{\log x} \bigg)$$ $x\in(0,1).$ $\varphi_{\theta}(x)$ is in the exponential family because it can be written in the form: $$\varphi_{\theta}(x)= \exp\bigg( \eta(\theta...
I read a book about statistics and machine learning, and can't understand assertion that: let $P(y) \sim N(y|\mu^*, \Sigma^*)$, i.e. multivariate normal distribution $p(y_1|\mu, \Sigma)$, where $\mu_1 = \Sigma(\Sigma_{11}^{-1}\mu_1 - \Sigma_{12}^{-1}(y_2 - \mu_2))$ and $\Sigma = \Sigma_{11} - \Sigma_{12}\Sigma_{22}^{-1...
We know that any normal distribution can be transformed into a t-distribution as shown in this post: Transformation of any normal distribution into a standardized t-distribution My question is can we transform a t-distribution into a normal distribution?
I'm running some analyes on a project to understand variations in mortality using a dataset with patient and hospital level variables in Stata 18. I am looking to calculate the percentage of the variability in outcome explained when by specific group of variables (patient-level, hospital-level). Here is my model: logis...
I am implementing a random forest model using the ranger package. I know you cannot specify ntree's in the tune grid for caret. I have seen some suggestions to determine the best mtry values and then run another model using the best value to determine the optimal ntrees (e.g. I have also seen some suggestions to run th...
I'm reading the paper Sparse Sinkhorn Attention by Tay, Yi, et al. and am confused on some of the notation used in Section 3. At the start of the section, the authors describe block-based attention and introduce a few variables: In our method, the input sequence $X$ of length $\ell$ is partitioned into $N_b$ blocks in...
I have a panel dataset with "id", "year" (1970 to 2000), and "post" a dummy which takes a value=1 if year > 1985. The treatment variable ("treatment") is a continuous variable measured in 1985. A control variable ("control") is a continuous variable measured in 1985. To calculate TWFE I used the following code: res = f...
As the title states, I am trying to perform a significance test between two loss value means. To give an exact idea what I want to do: I have used two imputation techniques on the same dataset. One of them serves as the baseline, the other as the potentially better method. I have 20 loss values per method. This is beca...
I am working through a paper about grad student "satisfaction" (as measured by a survey), and descriptive statistics are given in a table that looks like this: The "experience of factors" variables in the bottom half of the table are continuous independent variables under test, and their correlation coefficients are u...
Suppose you tossed a coin multiple times. Sometimes you got heads and other times you got tails. You recorded your experiment in a dataset $ X$. Now you want to estimate the parameter θ (which represents the probability of a coin landing heads) of the Bernoulli distribution using probabilistic modeling. You want to do ...
Preliminary Consider $n$ individuals each with observed data $ Z_i, i = 1, \ldots, n$. For each individual $i$, the longitudinal predictor $Z_i = \{Z_i(t_{i1}), \ldots, Z_i(t_{i,R_i})\}$ is measured at some finite number of observation times $t_i = (t_{i1}, \ldots, t_{i,R_i})$. We can define a finite grid as $\bigcup_{...
I have a dataset (auc_data) which includes the response variable (y) and the predicted probabilities (y_hat). I have calculated the AUC value based on this data. You can see that there are 3 rows in the data set which both y and y_hat are exactly zero. I just want to know that if I know the AUC based on "auc_data" dat...
Introduction I am thinking about how to estimate the number of individual moose from wildlife camera photos. I have the latitude and longitude position of each observation, along with a datetime of the observation. But unlike mark and recapture methods, we're not marking the moose. It can be quite difficult to tell fro...
Step 1: I draw the observation "m" from M~N(0, 1) (i.e. a Normal distribution with mean 0 and variance 1) Step 2: Then I draw "x" from N(m, 1) (i.e. a Normal distribution centered in m) My question: What is the distribution of "X"? Is it still a Normal (0, 1) ? I honestly don't think so. While I do believe the mean is ...
One common piece of advice given when you train a Random Forest model (RF) is, increasing the number of trees as much as possible, until the accuracy doesn't improves anymore. But, is quantity always better than quality? Given that not all the randomly-grown estimators are equally correlated with each other, what if we...
I am working with a panel dataset that spans 2000Q1 to 2020Q3 and captures quarterly capital flows to 35 different Emerging Market Economies (EMEs). Along with the capital flows data, I have several control variables: Country-specific variables for each EME (e.g., Interest rate differentials vis-a-vis the US, GDP grow...
Hello I'm really confused as to wether I'm reporting my data correctly. Independent variable : expert or non-expert Dependent variable: agreement with statement (strongly disagree, disagree, neither, agree strongly agree) chi-square test run for each statement (14 in total) this is an example for how how I have written...
Assume $x_1, x_2, \cdots, x_n$ follows a $Bern(\pi_0)$, Let $y_{ik}$ follows $Beta(\alpha,\beta)$, $i\in \{1,\cdots, n\}$, and $k\in \{1,\cdots, K\}$. Let $z_k$ follows a Bernoulli Distribution with a probability of $Bern(\mathbf{x'y_k})$, where ${\mathbf{x'y_k}}$ is constrained to be $[0,1]$. If I have the data of $z_...
How to obtain Risk score in R? Is the following approach correct? library (survival) coxph(Surv(time, status) ~ factor(ph.ecog)+factor(sex)+ factor(age>median(lung$age)), data=lung) #Call: #coxph(formula = Surv(time, status) ~ factor(ph.ecog) + factor(sex) + # factor(age > median(lung$age)), data = lung) # ...
As the title said, I've been wondering about bayesian methods, particularly MCMC, which seems to rely on sampling of the sample via chained iterations. Do we need an optimized/robust CI when running brms in r or does the CI by definition is already robust enough since it's a resultant from a resampling process?
The purpose of creating a machine learning model is to deploy in live situation, e.g., classification in the wild. The model is trained on the training set, tuned on the validation set, and evaluated on the test set. When it is being used in the wild, how do practitioners typically refer to data that is fed into the mo...
I fit a model a<- gls(Y ~ time + group , data=d, correlation=corSpher(form = ~time | ID)) all look good (see the bottom output). When I tried to predict, Predict(a, time, group) Predict(a, time) Predict(a, group) it gave me this error: Error in Predict(a, time, group) : predictors(s) not in model: time, group I just ...
I am given a discrete random variable and several large samples from it. The methods how the samples are obtained are not truly random samples but are reasonable approximations to a random sample. An analogy would be you want to study all pupils in a school discrict and your sample contains all students whose last name...
I am confused about the identification assumptions mentioned in learning pearls causal inference book . May I ask is identification assumption a necessary condition for causal inference?
I have samples of bounded random variables $X,Y$ for time $t=1,2,\ldots T$. Denote them as $(x_1,y_1),(x_2,y_2),\ldots (x_T,y_T)$. Overall, the correlation between $X$ and $Y$, as calculated from the samples, is not high. But I suspect that they may be highly correlated in some subset of their definition, i.e. within a...
I came across the following question in Fifty Challenging Problems in Probability with Solutions by Frederick Mosteller in page no. $51:$ From where he stands, one step toward the cliff would send the drunken man over the edge. He takes random steps, either toward or away from the cliff. At any step, his probability o...
I want to design a study to investigate the efficacy of a specific training protocol. I have 20 subjects. All of the subjects will complete an initial test of a physical exercise to failure. The number of repetitions are noted as a baseline. After the initial test, I want to compare two different training methods to se...
I am working with a dichotomous variable and my supervisor has asked me to apply a Bonferroni correction to our data using SPSS. From my understanding, Bonferroni corrections are used when performing multiple comparisons, i.e., when we are testing more than one hypothesis. However, in our case, we only have two groups ...
I want to model the effect of the experimental factor x on the response variable y. However, we also want to test whether the effect of x on y is mediated by the mediator m. We aim to model this using a multilevel setup, in which the stimuli stimulus are nested within individuals id. Regarding the random effects, we as...
I'm reading the 2011 paper on ranking called Moderated Paired Comparisons by Steven E. Stern and there are no definitions given for some of the constants and functions in equation 1. As you can see, for the definition of $X_{ijk}$ as the $k^{\text{th}}$ observed moderated paired comparison between objects $i$ and $j$,...
I am reading McElreath's Statistical Rethinking book and I'm wondering if anyone can help clarify my doubts on confronting confounding with DAGs. I'll specify 2 examples: Taken from link. The DAG below is an example on p.186 of the book. $U$ is an unobserved variable. To find the causal influence of $X$ on $Y$, we fin...
I applied a predictor to different numeric features from the same group of subjects (n>1000). The features have different ranges. Is it possible in this case to apply a statistical test to make a statement like "The predictor works better for feature A than for feature B"? The Wilcoxon signed-rank test and Mann-Whitney...
I'm doing a lab report at the moment, and am analysing 5 years of data to provide a conclusion on bacterial sensitivity to specific antibiotics. My data consists of several replicates measuring the size of the clearance zone for bacterial growth (where they won't grow) for each antibiotic tested. I've done Shapiro-Wilk...
Very often the likelihood function involves an integral which does not have a closed-form solution (e.g., random coefficients, latent variables). In these cases, we can employ monte-carlo simulation to approximate the integral: For example, $\int t(x, e) f(e) de$ has no closed-form solution. Take a random draw from th...
I used both agglomerative clustering and k-means on a dataset and see the results below. Result from agglomerative clustering was demonstrated with silhouette score while kmeans with inertia score. The inertia score was pretty smooth overall, while the highest silhouette score was at 2 clusters. I wonder people think ...
So I had the base of a model that was based on my hypothesis: Model 1 lm(formula = mean_lookneg_reapp ~ ASRS_Total + AHS_Total + CESD_Total + STAI_Total + AGE + GENDER, data = em_rat_per_final) In this case, CESD was significant while all other predictors were not. Then I decided to add another variable in m...
I'm currently reading some papers that deal with the effects of education on health (smoking and obesity). Mostly they use an IV approach (college availability). However in several analysis, only a handful of variables such as age and age^2 and regional factors are used. Somehow, intuitively I feel that certain variabl...
What is the difference between max_depth and max_leaf_nodes parameter in decision tree classifier. if depth is 4, then the number of leaf nodes will be 2^4 = 16. So providing max_depth = 4 or max_leaf_nodes = 16 should create the same tree right ?