instruction
stringlengths
9
38.7k
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 ?
So let's imagine I have a dataset of children. For each of them a have a bunch of characteristics (generation, gender, race, class, urban/rural, religion, bmi, number of siblings etc..) and plus the age (in months) when they did for the first the following events Learn how to ride a bike learn how to swim, starting mi...
I have a dataset comprised of whole fish concentrations (LAB_RESULT.x), filet fish concentrations (LAB_RESULT.y), and species name (COMMON_NAME.x). I am attempting to run a linear mixed effects model to determine the relationship between filet to whole fish concentrations by species, and if there is a difference among...
I have a problem in which the prices of an "item" will change for specific hours of the day. I was leveraging the concept of price elasticity, which includes the self- and cross-elasticity coefficients (which are not directly observed), to evaluate the impact of that change. As there are can be other factors that affec...
Let us assume that a classification DNN is trained and dropout or model ensembling has produced n samples of a classification distribution. The two methods which I have seen to quantify uncertainty in such a case are entropy and comparing variation or standard deviation. Both these methods seem flawed to me in respect ...
When I tried to fit a regression model to my data to predict a power variable using steam at entry and steam at exit variables in a thermal power plant, after taking care of outliers, etc... I fit the regression model but the problem came in, when I tried to run diagnostics, my residuals seem to have a 0 mean but with ...
I am interested to see if a particular policy that increases parental income may impact child health for mothers and fathers. So it would be a diff-in-diff model I would be running. Below is my regression model: $$\text{Children Health}_{it} = \beta_0 + \beta_1Post_t + \beta_2 Treated_i+ \beta_3(Post_t \cdot Treated_{i...
The more uncorrelated are the trees with each other, the better the results a Random Forest ensemble may get. Sources: Nvidia, Tutorial by Tony Yiu According to the official documentation, the hyperparameter max_samples will take the value of None unless otherwise specified. This means, the whole input sample will be u...
I have three small data sets which include scores on global cognitive assessments. Two data sets use the score on the Mini Mental State Exam, one uses the score of the Montreal Cognitive Assessment. here are some points of note about these scores: Both are brief screeners of cognition which test a few different domain...
I'm interested in running a two-sided power analysis on paired proportions data and hope to use the stats:power.prop.test or pwr::pwr.2p.test function, but not sure if the functions assume paired or unpaired samples. Does it matter? I didn't see anything in the documentation, but should I just assume it means unpaired ...
I'm trying to compare performance of two bayesian models $A$ and $B$ on simulated data. It's a recruitment curve fitting problem and I'm interested in how accurate these models are in estimating only one parameter of the curve, let's call that parameter $q$. I run $10$ trials (10 different simulations). For every trial...
for my bachelor thesis, I'm currently working on a mediation analysis. In previous posts I have read that in mediation analysis the relationship is often classified in a diagramm like this. X is classified as the causal variable, Y is the outcome variable and M is the mediating variable. C is the total effect, c' the d...
I am studying Chapter 36 Thompson Sampling of the book Bandit Algorithms by Lattimore and Szepesvari. The authors present two equivalent formulations of Thompson Sampling on page 460, and I am having trouble seeing why they are equivalent. Let $(\mathcal{E},\mathcal{G},P_0)$ be a probability space, where $\mathcal{E}$ ...
I am working in a clustering. I have a dataset with the accesses of a series of subjects to a facility (each row register the subject ID and the date/time of the access) I can, for example, count the number of accesses on Monday, Tuesday, Wednesday... As a result, after the aggregation, I have a dataset with one line f...
Hi I am trying to make a mixed model using lmer in R. My model looks like: m <- lmer(choice ~ I_D_gen + (A + B + C |sub), data = df) My experiment design is: Independent variable: 6 conditions (2x3) with 20 trials each. A, B, C all refers to these conditions (including dummy coding). I_D_gen is a variable with 4 leve...
In short, I am looking to estimate the distribution of $ \eta = \sum_{i=1}^N (X_i - z_i)^2$, for each $X_i \sim \text{Rayleigh}(1)$ and constants $z_i$. If $X_i$ were Gaussian, then this could be estimated as a non-central chi-squared distribution, but with Rayleigh random variables I am stumped. Because of the relatio...
This is a question I have wondered about for a long time and have never been able to find a full mathematical explanation behind this. Suppose there are 100 countries. As an experiment: We give Person A the median income of each country We give Person B the mean income of each country Now, suppose the following happens...
Suppose we have the median incomes of 150 different countries (in each country, the median income was calculated on a sample of people) - we don't have the individual incomes of each person in these countries, but rather, we are only presented with the median income for each country. However, we have the total populat...
I have a correlation matrix below and I am wondering if I should carry out a factor analysis. Are there issues of linear or multicollinearity? MER RLTD PCL PCP AL ASW CSW ASL OPPO WRY OPTM ADPT 0.14 0.50 0.21 0.47 0.25 0.73 0.20 0.17 0.25 0.38 0.76 0.19 0.59 0.62 0.33 0.78 0.2...
What is the difference in terms of the coefficients the two yielded in R; I suppose they estimate the same thing? (Log) odds ratio? Or is the latter estimating risk/relative risk ratio?
Let $X \sim \mathcal{N}(0, \sigma_x^2)$ and let $f :\mathbb{R} \to \mathbb{R}$ be a smooth nonlinear transformation such that $\mathbb{E}[f(X)]=0$. I am wondering what kind of restrictions one can put on the function $f$ such that I can find a (uniform) lower bound of the KL-distance between the random variable $f(X)$ ...
I'm using SARIMAX as a statistical model to solve my problem of predicting a cost variable (Y) based on the past history of this dependent variable. In particular, I use SARIMAX because I have additional predictor variables X that help me predict the variable, even though right now I'm working on a synthetic dataset wh...
When we do a hypothesis testing we follow the steps given below: Step 1: Form a null hypothesis $H_0 : \mu_{\bar{x}} = K$. Form an alternative hypothesis $H_1 : \mu \neq K$ Step 2: Decide a significance level $\alpha$. Step 3: Take a sample of size $n$, find its mean $\bar{x}$. $\color{red}{Step~ 4} $: From the known p...
I am currently reading an article, Analysis of sensory ratings data with cumulative link models. In section 2.4 - example 1, the authors describe an experiment from Bi, 2002*: ... 25 subjects each assess four concordant and four discordant product pairs. The subjects were asked to rate the degree of difference between...
A man had too much to drink and is standing on a bridge that is 100ft long. He’s currently at the 15th foot, but has a tendency to either move forward or backward one meter with a 50% chance for each step that he takes. What are the chances that he’ll make it to the end of the bridge before he returns to the beginning....
In the discussion of this question, the following new one arose: Why is the mean AURPRC higher the fewer examples are used? Here is a minimal (Python) code example showing the effect: import numpy as np from sklearn.metrics import average_precision_score def auprc(scores_of_negatives, scores_of_positives): y_true...
Suppose you have a number of small pieces of signal from a sensor. These snippets are found earlier using signal detection. These snippets can be real events or noise. I now want to cluster these signal pieces. There may be only noise, noise and events or only events per sensor. In the case that a sensor has only event...
I wish to compare two algorithm for subspace approximation (similar to PCA). One algorithm is parameter free, while the other is not. I use cross validation to set value to this parameter, and then run both algorithms on the test data. What is the right way to compare the two algorithms? It seems that the second algori...
I am exploring data analysis and want to perform confirmatory data analysis CDA on a dataset which I have splitted into train set, dev set and test set. I am new to CDA, As we normally perform Exploratory data analysis EDA on train set, so which set (train set or dev set) do we use to perform CDA?
Imagine I have 24 random forest classification models trained on classifying two classes Y=1 and Y=0. Each model learns on independent data, each model learns on same number of observations and same class balance. Parameters of each of 24 models is different, precision and recall of all 24 models are also different due...
I am trying to understand what factors influence temp and humidity but I am not sure what family argument I should be using in my GLM The humidity data is a proportion 0-1 and temp is continuous my model code is as such: mod4<-glm(average.humid~Age + Mine.size.km2 + canopy.cover.E + canopy.cover.100 + ...
I want to estimate (using Titanic data as an example) the probability of being in each of the classes (class 1, class 2, class 3) by sex (male, female) and port of embarkation (C, Q, S). I used multinomial logistic regression model to estimate the probability of each class among each group defined by the interaction of...
I am attempting to perform a basic meta-analysis using crop yield response rates, and to do that I need both mean outcomes under treatment vs. control and their respective standard errors. While most papers report std errors (or std dev), some only report least significant differences. For example, the paper below repo...
Let's just say we know 1st to 99th percentiles of the height of men in country X. Could I use this data to answer the question: What is the probability of a male in this country being greater than 6ft? If I have the following percentile information: We can see that 6ft is the 60th Percentile. So the probability of a m...
I am fairly new to statistics as a Phd student. I am trying to understand how dichotomizing a continuous variable can lead to distinct effects on two dependent variables. So in a cross-sectional sample, I have one predictor (continuous) and two outcomes of interest (both continuous). Using linear regression, I found th...
I have performed a t-test between groups, but I only have Mean, SEM, and N. Now I would like to look at the percentage change between these two groups, and compare this percentage change to another data set. What becomes of SEM? I do not have individual data points, so I cannot compare each data point's % change. I can...
While working with ECM model short-term and long-term models, I have identified certain variables that appear to be statistically insignificant (P value > 0.05). Is it acceptable to have some variables show insignificance within the Error Correction Model (ECM)? If it is ok then what will be my forecasted equation Y = ...
I am learning about feature selection and studying the method given in Chapter 19 of the book "Applied Predictive Modelling" by Max Kuhn and Kjell Johnson. The algorithm to perform recursive feature elimination (RFE) is quoted as follows: for each resampling iteration: Partition data into train and test/hold-back s...
I am trying to generate partial dependence plots for my rpartscore model but I am not succeeding so far. I have previously tried to use the package dpd but cant make it run with the probability function. You can check my trials here: https://stackoverflow.com/questions/76850797/rpartscore-partial-dependence-plots-pdp-p...
Edit. I have made some progress myself, though I have not completely solved the issue. In short, I can fit what I think is a proper description of the model I want, and I can filter it, but I get an error when I try to smooth the series. I am trying to learn dynamic linear models, and at the same package learn the R dl...
I am conducting two studies (with 15 participants) and my study is based on two already conducted studies with a very similar objective and method. One of the studies contain only the results, and one of them have data available online. This is on face and emotion perception with static faces and dynamic faces. I would...
On Running an ARIMA (0,0,1) model from statsmodels.api on a differenced time series say X(t). I get the following output const = 5.34e-06 ma.L1 = 0.8934 How should I interpret the above MA model with parameter 0.8934 in terms of an equivalent exponential smoothing formulation with smoothing parameter. X^(t) = X(t - 1) ...
In the book "An Introduction of the Bootstrap" of Bradley Efron and Robert Tibshirani chapter 23, a least square method combined with bootstrap is presented for the estimation of the variance. The method works with the resampling vector. Suppose that you have a dataset of size $n$ $\mathbf{X} = (X_1,\ldots,X_n)$. We wi...
Since version 1.5, XGBoost supports categorical data out of the box, which is a convenient way to skip the one-hot pre-processing step and allow for if X in values splits. For example, given a category animal with values: dog, cat, lizard, snake, XGBoost can now split based on e.g. if animal in {dog, cat}, i.e. treatin...
I want to run an ordinal regression in Python. My dependent variable describes a medical condition in an ordered manner (e.g. 0 = healthy, 1 = affected, 2 = very affected, 3= severely affected). I was trying to run this regression using the OrderedModel from statsmodels.miscmodels.ordinal_model. However, I'm struggling...
When conducting AB tests, we use power analysis to calculate sample size with alpha, power and MDE (minimal detectable effect) parameters. Mean MDE for continuous variable seems intuitive: Using Cohen's D to calculate the standardized mean difference = (M1-M2)/pooled SD If I have proportions, what is a good way to calc...
If I am doing a binomial GLM with a proportion as an outcome--how do I interpret the model coefficients? I understand how it is done when the outcome is an event (e.g., 0/1), but it is less clear to me how to interpret it in this case. Is it still the log odds that the outcome (i.e., proportion) is 1? A silly example b...
Since: the "probability mass function" gives the probability that a discrete random variable is exactly equal to some value, and, therefore, we can think about it as a hypothetical outcome that might occur (or not) in the future, the "relative frequency distribution" is built upon an observed, and therefore already pa...
I ran an experiment where 100 subjects played a game in groups of 5 and had to make payments under one of two treatments (A and B) over 20 rounds. I would like to compare the means under the two treatments, and test the hypothesis that payments are higher under treatment A than under treatment B. Under treatment A play...
I wish to perform statistical analysis on a data set that is the result of running a simulation model. I have simulated this model by varying five parameters, TA_PS, TA_IP, PA_PS, PA_IP, and PA_LGPP. All five parameters are categorical, the first 4 have three, and the last one has two levels. The outcome that I am inte...
I'm trying to conduct an experiment with 4 independent variables with 3 levels and a binary dependent variable. Because I'm interested in some first-order interactions of the IVs, and an experiment with 3^4 conditions are not feasible, I want to apply an L27 orthogonal array. I could find some documents on how to condu...
I am trying to fit a second-order factor in AMOS (where 'AA', 'AB', and 'AC' are thought to be facets of the higher-order factor 'AD'). I am getting the error message "Result (Measurement model) The model is probably unidentified. In order to achieve identifiability, it will probably be necessary to impose 1 additional...
I'm using the StructTS() function in R to fit 50 structural time series models (state-space models) on 50 univariate time series. I'm using the "trend" specification with a deterministic drift term (i.e. sts = StructTS(x = y, type = "trend", fixed = c(NA, 0, NA))). This model can be represented by the following equatio...
What am I trying to do: Build a small prediction model, to help me forecast an evaluation Event X, based on previous Datapoints/Questions. I'm dealing with a wide dataset for ~60 Locations. Each Location is being asked several Questions (some more frequent then others) over a period of time. Then on the 2022-11-30 ther...
The Matrix/vector formulation of OLS is given by $$\vec \beta = \left( X^T X \right)^{-1} X^T \vec y$$ which is very nice as a matrix equation. But what is the equivalent scalar equation for a single entry of $\vec \beta$ in the above equality? Matrix multiplication is straightforward enough as a series, but I am somew...
I wanted to run an ANCOVA. My independent variable is field of study (3 groups: science, humanities, and business). My dependent variable is IQ measured on a continuous scale. There are two covariates: years of education (continuous variable) and sex (categorical variable). However when I tested the ANCOVA assumptions ...
I am trying to understand the loss curves of a CGAN model better. From what I've seen so far, it seems like there is no consistent answer as to what the loss curves should look like. Some tutorials such as this shows both the generator and discriminator losses decrease with a bigger reduction in the generator loss. How...
I am trying to fit GLMM in R where we predict reaction times (RTs, dependent variable) by a continuous, uniformly distributed variable called scores (independent variable); the random effect is the participant (glmer(rt ~ scores + (1|participant)). We expect to observe a positive relationship where the increase in the ...
Let's say I have a binary logistic regression model trained on several binary categorical variables (i.e. the model is only trained on 0s and 1s for these variables). For example, Feature A can only be 1 (yes) or 0 (no). Now, when I use the model for prediction, let's say I know that in a particular case for Feature A ...
I did an experiment where I generated 3 well separated clusters with a different multivariate gaussian distribution for each cluster. One of the clusters contains 1000 points and the other two clusters contain 100 points each. It is pretty obvious in K-means that it does not work well in this setting as we minimize the...
I have a list of banking syndicates (groups of banks), and I'm trying to do some hierarchical clustering on it to gather if there is some connection between them (e.g. if lots of syndicates share the same core banking group). Here are a few syndicates as an example, {{"Sumitomo Mitsui Banking Corp/New York", "Mizuho Ba...
As shown in pictures below, prisfmil50 (female incarceration rate per 1000 women) is insignificant in every combination tried from univariate to multivariate regression, but adding the following combinations of variables results in lower p-values that are close to 0.05: povrate50 (p = .109), povrate50 + pcthsonly150 (p...
I have fitted Gaussian distributions (3 dimensions) and need to compare their "variance". I found that there are multiple approaches, such as The $\text{trace}(\Sigma)$ (which does not take into account the covariance between dimensions) $|\Sigma|$ (determinant) However, I feel that neither $\sqrt{\text{trace}(\Sigma...
In my study, there are a continuous dependent variable (fluency scores) and a continuous independent variable as a predictor (anxiety scores). I also include some task conditions (e.g., simple vs. complex tasks; planning vs. no planning; first performance vs. second performance). My focus is on the predicative power of...
I'm working on anomaly detection for multiple streaming time series datasets. Due to the vast number of datasets, I'm seeking a scalable, generalized method without resorting to adaptive thresholds tailored to each individual dataset. My current approach is as follows: For each dataset, I compute a rolling window of d...
we want to analyze a Mixed Linear Model. One of the fixed effects (POSITION) has a z-value of 0 and a p-value of 1, despite it should have a significant effect (a graph shows it and it is correct in substance). Do you know how we can fix that issue? If you need further information/pieces of code, I can upload it. Fixed...
Background I would like to put prior probabilities over permutation matrices $\mathbf{P}$ $$\vec A = \mathbf{P} \vec B$$ where $\vec A$ and $\vec B$ are the same random vectors up to a permutation (hence the equality above). The motivation for the problem is to learn from data the distribution of ways that data gets re...
I am doing some computational simulations to validate a procedure involving structural equation models and causal inference. I wanted to sample from the possible space of DAGs on $n$ vertices. I can up with a simple algorithm: Algorithm Given $n$ and $p$. Sample an adjacency matrix $A_{n \times n}$ with IID $a_{ij} \...
I am assisting with a study that follows a relatively simple pre-post design, outlined below. Our study consists of two groups: a control and a treatment. We have daily measurements from each participant for a period of 6 months before administration of the treatment/placebo as well as 10 days of daily measurements fro...
The missing variable in my longitudinal data set is the outcome variable. I try to use mice in R to do multiple imputation. The final model is mixed effect model fitted by lmer. The data set contains two measure time points, baseline and year 1. Shall I include both the id variable and time variable in predicting the o...
Suppose we only have the following information: A set of sample means : $\bar{x_1}$, $\bar{x_2}$ ... $\bar{x_k}$ The sample size used to calculated each sample mean: $n_1$, $n_2$ ....$n_k$ The population size from which each sample mean was taken: $N_1$, $N_2$ ....$N_k$ The sample variance of each mean: $Var(\bar{x_1...
I'm reading the code of NVIDIA's MUNIT, the code of the resnet is as follows: class ResBlock(nn.Module): def __init__(self, dim, norm='in', activation='relu', pad_type='zero'): super(ResBlock, self).__init__() model = [] model += [Conv2dBlock(dim ,dim, 3, 1, 1, norm=norm, activation=activat...
I am about to test a Campbell-Mankiw's based model like: $$\Delta c(t) = \mu + \lambda \Delta y(t) + \theta r(t) + e(t)$$ where $ \Delta y(t) = \ln(y(t)) - \ln(y(t-1)),~ \Delta c(t) = \ln(c(t)) - \ln(c(t-1)), $ and $r(t)$ is the real interest rate. The test requires the use of instrumental variables because both $\Delt...
While analizing the prevalence of cows to brucellosis (illness), and in order to relate it to a set of factors like country, state, and detection technique, I need to apply a multivariate analysis method. Here I share a simulation of the data. The prevalence variable follow a beta(0.3238, 0.7555) distribution, as ceili...
I just opened a discussion on reddit asking about why/how the calibrated linear models I've been training have been getting similar / better results than XGBoost in my experiments. I was told to cross post here with my question to field some answers from seasoned statisticians. Calibrated linear models have the followi...
I have recently learned about the idea that it is possible to bootstrap "weighted" data - for example, suppose we have: A set of sample means : $\bar{x}_1,\bar{x}_2,\ldots,\bar{x}_k$ The sample size used to calculated each sample mean: $n_1, n_2\ldots,n_k$ The population size from which each sample mean was taken: $N_...
Consider a situation where there can be membership in group $A$, group $B$, both groups, or neither group. If we wanted to predict group membership probabilities from some covariate information, this would be a multilabel problem. However, an alternative modeling strategy (I fear a rather poor one) might be to say that...