instruction
stringlengths
9
38.7k
import numpy as np from scipy.stats import lognorm loc = 0 s = 2.4 #I believe this is sigma scale = np.exp(7.6) #I believe this is mu samples_lognorm = lognorm.rvs(loc=loc, s=s, scale=scale, size=1000000) samples.lognorm.var() The variance equals about 206,844,501,130 $Var=[exp(\sigma^2)-1] * exp(2\mu+\sigma^2)=[ex...
I'm struggling to follow the interpretation of the log coefficients. Union density represents the share of unionized households it is scaled between 0-1. The coefficient for union density is in my case -2.189 for the log(90/10) as a dependent variable. I would interpret the coefficient as follow: A 10 percentage point...
I have a small data frame of lower and upper confidence levels along with means. What I would like to do is compare the means of all rows directly against the first. Here is the DF: upper mean lower phase st1 16592.40 16511.10 16429.80 p1 st2 18782.72 18740.79 18698.85 p2 st3 17819.98 17779.84 1773...
For my model, I need to apply z-normalization to the input data. For train and test, I can denormalize the output since I have the mean and standard deviation for both y-true train and test sets. However, when using the same model for unseen data, I need to apply the same z-normalization step to the input data (each fe...
I am trying to understand the maths of diffusion models following this video explanation on youtube and this blog post. Here is what how I understood it so far: The overall goal is, that we want to maximize the log likelihood $log(p_\theta(x_0))$. We know that maximizing the log likelihood equals minimizing the negati...
I like to figure out how I can retrieve an incidence rate based on a hazard function. So background could be that my hazard function models the prob of the event based on the age of a person (t = time since birth). Of course, the current age distribution in my population is relevant. So my understanding is as follows: ...
Assume that we want to compare the agreement of two methods of measuring blood pressure (e.g. a machine and a sphygmomanometer). In their paper, Preiss & Fisher (2008) discuss the standard deviation of the difference between the two measurement methods, a quantity they call "precision". At the end of the paper, they st...
I am analyzing a dataset, where I have 3 categories (independent variable), and one continuous value (dependent variable). I am studying if the continuous value is significantly different between the three groups. I have 65 values in each category. The 3 groups are homoscedastic, but the dependent variable is not norma...
I have a model in which I set relationships among different variables. One of them is a second-order factor. However, I get the following problem when I try to run the analysis: Warning messages: 1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: Could not compute standard er...
I am analyzing a dataset, where I have 3 categories (independent variable), and one continuous value (dependent variable). I am studying if the continuous value is significantly different between the three groups. I have 65 values in each category. The 3 groups are homoscedastic, but the dependent variable is not norma...
My understanding is that when forecasting if you want to quantify the level of uncertainty of your model, one would typically use predictive intervals. However in Microsoft Excel, when using the 'Forecast Sheet' tool, it appears to be expressing uncertainty using confidence intervals instead. Are confidence intervals m...
Lets say I want to do a different version of PCA, in which I minimize the variances explained. So lets say I find the first such variance minimizing axis $PC^{'}_1$. Then I impose the orthogonality constraint and find the second variance minimizing axis $PC^{'}_2$ and so on, to get $PC^{'}_1, PC^{'}_2,...,PC^{'}_n$. An...
I am stuck with the following problem and hope somebody can help spotting the error. I am not sure if it's a simple math or programming glimbse or whether the issue is more complex (e.g. concerning identification). Let $X$ be Weibull distributed, that is $$ f_x(x;a,b) = \frac{a}{b} \left(\frac{x}{b}\right)^{a-1} \exp \...
So essentially the problem I have is this: I've created an economics simulation which, among other things, tracks the profit rates and capital intensity of all the firms over the course of the simulation . The trouble is, which you can see from the scatterplot of these two variables, is how dense and difficult to read ...
I have a moderated mediation model with 3 IVs, 1 mediator, and 3 DV. I can't find the right model in the templates provided by Andrew Hayes for his SPSS PROCESS macro. What is the correct model and what you suggest to do with several DV? Thank you!
Hello I am trying to test the effect of a treatment type on multiple variables. Basically I have two different types of sites Site A had Harvest A and Site B had a B type Harvest. I went to multiple Sites where Harvest type A was conducted and multiple Sites where Harvest B was conducted. I collected data on the slope ...
I want to run an online survey about people's preferences for environmental policies in different economic sectors using a Likert-type scale (strongly disagree, disagree, etc.). I have 4 sectors and 4 policies. I read somewhere that "each respondent should answer one question from each of the sectors" and that "which q...
Could you, please, help me with the following problem? Suppose we have a one-way ANOVA with a single 2-level factor. The dependent variable is a logarithmized value: $y_i = log(Y_i)$. $y_{iz} = \mu + a_i + \epsilon_{iz}$ $z$ is the number of observations in each $i$ group, different for different $i$. We want to estima...
I have been having this problem with SAS all year and I can fix it, but it ends up being time-consuming. Example: When I use the code attached (a simple ANOVA code) I get errors that say I have invalid data for the treatment code. This seems to be because I have denoted the different treatments using A, B, C, D, and E....
I have this example code that comes from here. Optimal number of features recommended by rfecv is 3. But if want to build the model with only 1 or 2 features, how should I select those features? """ =================================================== Recursive feature elimination with cross-validation =================...
I am hopping to use Gaussian Processes (GPs) to model scientific values that can only be positive (think weight, length...). However, GPs map the latent variable as Gaussian distributions spanning across positive and negative numbers. Are there any ways to create a map from the real numbers to the positive real numbers...
I need help writing a SARIMA model I have obtained mathematically. My model is ARIMA(2,1,0)(0,1,0) period 12. I understand what the different parts actually mean but get very lost trying to write out the mathematical model. I have tried to follow other examples but as the models differ it makes it hard to apply it to w...
Currently, I am reviewing this document: https://www.cs.waikato.ac.nz/~mhall/thesis.pdf. In section 4.2.3 it describes an MDL measure of attribute quality to correlate two nominal features. Nevertheless, I haven't managed to understand the computation of MDL. Are there any implementations in Python? Are there any alter...
I am trying to understand the implementation of the following loss function in training Discriminator part. Loss function maximize log(D(x)) + log(1 - D(G(z))) Code ############################ # (1) Update D network: maximize log(D(x)) + log(1 - D(G(z))) ########################### # train with real ...
I had an idea of building a model using machine learning or deep learning in order to perform morphological tagging/labeling on untagged/unlabeled data. I have a lot of tagged/labeled data (about 30,000-40,000 entries), so I thought of creating this model to help the ones that are responsible for it to avoid this task ...
I have I have no experience with gam() but I think this is the right way to model my data. Sample data: tibble [9,286 × 9] (S3: tbl_df/tbl/data.frame) $ Fiscode : Factor w/ 21406 levels "120097","502468",..: 27 31 31 53 53 62 62 62 64 64 ... $ Status : Factor w/ 4 levels "O","E","R","D": 1 1 1 1 1 1 1 1 1 1 ... ...
What are some statistical models or problems that have computationally tractable solutions and are guaranteed to be optimal or near optimal? By computationally tractable, I mean finite time and practical time. For example, a linear model can be fit by computing matrix inverses or optimized via gradient descent. Similar...
I used matchit package for propensity score matching. I got another column under names of "distance", "weights" and "subclass". What I understood is "subclass" is numbering of each pair after propensity score matching. I plan to run paired tests such as McNemar test, so I want to pair each row of data according to "su...
I have made the following DAG in dagitty.net: DAGitty says "The total effect cannot be estimated by covariate adjustment". I don't understand why I can't close the backdoor path by controlling for U.
In deep learning, especially generative models, sometimes we need to add some random noise to the input of model. To make the sampling of random noise learnable (or differentiable), we need to reparameterize the sampling, just like diffusion models do. For example, given x ~ N (μ, σ2), if we sampled x directly, the mea...
I've read the paper A vanilla Rao-Blackwellization of Metropolis-Hastings algorithms, but I don't get what their actually suggested estimator is. To give some detail, we are considering the following setup: Let $(E,\mathcal E,\lambda)$ be a measure space; $p:E\to[0,\infty)$ be $\mathcal E$-measurable with $$c:=\int p\...
I have a couple of time series, say, T1 and T2. I have established (using the grangercausalitytest library of Statsmodels in Python) that T1 Granger-causes T2 at 10% significance for lags 4 and 5. I now want to know whether I can validate the result by using VAR (unrestricted model). Going by the definition of Granger ...
I am looking to perform a SurvSplit of the survival r-package. The difficulty that I have is that I would like to perform the SurvSplit on two matched groups (full Propensity Score Matching). So I have weights and cluster that need to become apparent in the SurvSplit function somewhere. If anyone has another idea, I am...
I want to infer a multinomial mixture model consisting of $K$ components where each component has the same number of trials, denoted as $N$. Such a multinomial mixture model can be written as: $$ \mathsf{M}(x; \pi_{1:K}, p_{1:K}) = \sum_{k = 1}^{K} \pi_{k} \mathrm{Mult}(x; N, p_{k}), $$ where $K$ and $N$ are given, $\p...
I have a set of data samples which have been gathered from an electronic system. The system is in one of two states, which is selected at random before the data sample is collected. For simplicity, let us say that each sample is a single value. I collect thousands (sometimes millions) of data points. My null hypothe...
For one dataset and one response variable, i have run several repetitions (around a 100) of different feature selection methods. (Elastic Net, VSURF + RF, BestSubset ...) For each method, the repetitions were done by repeating the 10-fold process around 10 times on the training dataset. Each feature selection methods a...
I have a question that deals with assessing significant differences in the predictive performance of different machine learning algorithms. I am predicting different variables with different models and different feature selection strategies (using single variables, using single variables with feature selection, using t...
I built a moderated mediation model (Hayes Model 8 with no latent variables) for my research. Is it necessary to report model fit indices (e.g., CFI, Chi-squares) for this kind of research model? If yes, what's the Lavaan syntax for this type of model (Hayes Model 8)?
I'm trying to calculate an odds ratio for a table with very few cases. I've tried epitools oddsratio which I see won't work as the uniroot function error occurs due to dividing by 0. The table is as follows: Outcome Program Yes No X 6 0 Y 9994 10000 I've tried fishers test using epito...
I am using a linear mixed effects model (using lmer) to model the results of an experiment where we have two binary treatment variables A and B, and each participant completes four trials with random combinations of these variables. We are then looking for individual effects of A, B, and the interaction effect of A and...
I'm running a regression model with a binary independent variable X (3 treatment groups, three dummies, 2 dummies included in the regression and the third as reference category) on a continuous dependent variable Y. I have hypothesised a mediation effect via an ordinal mediator M (Likert scale). Which package for media...
There is a certain probability that ANOVA provides negative variance estimates. According to [Searle et al. : Variance components] (https://onlinelibrary.wiley.com/doi/book/10.1002/9780470316856) p67 this probability for one-factor, balanced designs can be described by the following equation: $$ \textrm{Pr}(\hat \sigma...
The harmonic mean between precision and recall (F1 score) is a common metric to evaluate binary classification. It is useful because it strikes a balance between precision (FP) and recall (FN). For some problems, specificity more relevant than precision to measure the FP. In these cases, which metric should be used to ...
Please let me know if the below statement is valid or not ; Suppose that $X$ is an $n\times p$ data matrix with $p$ features and $n$ data samples. Suppose further that each feature(column) is zero centered so that the average of each column is zero. Then, the covariance matrix for $X$ is $\frac1nX^TX$. It's such a si...
Assume we have a sample of size $n$ from an unspecified continuous distribution $F(\cdot)$. We wish to construct a tolerance interval to contain $(100\,\beta)\%$ of the population with a pre-specified confidence level $\gamma$ based on our sample. However, a conventional tolerance interval does not guarantee that the c...
I am trying to feed a neural network information about a stock (100s of features concerning price, MA, volume etc.). To ensure training stability, I normalize the features to have mean of 0.0 and a standard deviation of 1.0. However, I thought that for stock prices, the absolute prices of the instrument would also be r...
I have read that analogous to univariate AR(p) models, there are two possibilities to allow for a non-zero mean with VAR(p) models: a) either use centered variables in the model: Φ(B)(Xt − μ) = Zt b) or include an ‘intercept’ in the regression: Φ(B)Xt = v + Zt Is there any difference in interpretation when using the fi...
The problem is, I have a several silages with several layers of some substance in them (e.g. coal). Each layer has its own physical/chemical properties (concentration of element, X). Concentration of X in each layer is known. Then we get a mixture of masses W from several (known) silos, and get a concentration of that ...
I am trying to implement Soft Actor-Critic with automatic Entropy tuning. The original paper derives the optimal entropy temperature $\alpha$ as follows: $$ \alpha ^* _t = \arg\min_{\alpha_t} \mathbb{E}_{\mathbb{a}_t \sim \pi^* _t} [-\alpha _t \log \pi^* _t (\mathbb{a}_t | \mathbb{s}_t ; \alpha_t ) - \alpha_t \bar{\mat...
Question: How do scale_pos_weight and sample_weight interact in XGBoost when used at the same time during training? Are they multiplied, added or something else? Example when added: Example when multiplied:
I am working with data of vegetation cover (proportions) for different height strata (0-5, 5-15, 15-30, >30 cm, and also bare ground) amongst four different sites and two different time periods (breeding and non breeding season). I want to evaluate the differences between sites (sitio) and seasons (epoca), and went wit...
I've been studying various supervised machine learning algorithms for regression tasks, and I've come across an interesting perspective suggesting all machine learning models could be represented as linear models over a set of transformed features, where the transformations are functions of the original features. Is th...
We tested the preference of animals for two treatments (A/B), with the prediction that the animals would spend a different amount time receiving each treatment. The treatments were applied by two experimenters (1/2) standing in two corners of the enclosure (r/l). To facilitate learning which treatment to expect, each e...
I'm puzzled on how to approach this problem. Let me frame the problem like this: I am looking to predict total sales for Q1 in year 2023. I have only Q1 daily sales data for years 2022, 2021, and 2021. No imputation for missing 3 quarters. I can't put this data in a single series and use ARIMA because of the Gaps. I...
Consider a scalar random variable $X\in\mathbb{R}$, a vector random variable $Y\in\mathbb{R}^n$ and a constant (non-random) vector $\alpha\in\mathbb{R}^n$. I want to compute $$ \mathbb{V}[X + \alpha^\top Y] $$ but I can't find any material on this. I have checked here and in various lecture notes. Attempt $$ \begin{ali...
Why the clusters assigned with k-means are sometimes different with respect to fanny? ## Data mtcars[2:7] # Code k3<-kmeans(mtcars[2:7],3) mtcars$clusterkmeans<-k3$cluster g3<-fanny(mtcars[2:7],memb.exp = 1.2,k=3) mtcars$clusterfanny<-g3$clustering ## Result print(mtcars)
I have a distributed fusion scenario with a single target where two sensor nodes $i,j$ estimate the true state $\mathbf{x}$ using a local Kalman filter. The (linear, Gaussian) measurement errors of both the nodes can be assumed to be indpendent. The local estimates $(\mathbf{x}_i, \mathbf{P}_i)$, $(\mathbf{x}_j, \mathb...
I am attempting to train an HMM on a series of sequences but the resulting prediction of the hidden states returns no change over the time series. My dataset is structured where the state begins in a certain state and at a certain point in each series, transitions to the other state. I have defined the state for each o...
I am a little puzzled by this - hope you will give this a shot! I am looking for a way to get prediction intervals from an ordered logit model (polr()). The regression I am using is: reg<-polr(satisfaction~ X1 + C2 + C3,...), where X1 is continuous and C2&3 are categorical variables with 2 and 5 categories respectively...
I am currently learning about the linear SVM in the non-separable case. In the dual representation, we introduce the Lagrange multipliers μk and αk (see also this source: https://machinelearningmastery.com/method-of-lagrange-multipliers-the-theory-behind-support-vector-machines-part-2-the-non-separable-case/). Both my ...
I'm very new to Machine Learning, so please forgive the simplicity here. It's probably because I'm new to this, but I can't seem to find anything relevant enough online to help here. I have data on laptops, phones, and printers like this: Manufacturer, Model Name, Model Id, (and a few others). For Example: Dell, Latitu...
To train a deep learning model, for converting speech to text, we need labeled data. How should this data be arranged? I can think of several approaches, and I don't know which approach has already been tried in the world, and which has not yet, and which approach was successful and which was less so. Here are the appr...
Is there a measure for model complexity? For given units of this measure how many examples do we need to train a network to get the model right and generalize? In essence what is the relation between model complexity, number of training examples and network size?
Background I have a panel of binary response data - I have a different cross section of individuals each month, across many months, and the outcome is 0 or 1. When fitting a logistic regression that does not allow for time-variation in the intercept, the time-series of residuals appear to be highly autocorrelated. Ther...
I’m running a first-order differenced regression in Stata estimating the effect of the Covid-pandemic (categorical with 4 levels; 0 - 3) on the natural log of reported crime (continuous) on 290 panels. T = 58, monthly measures. All of my predictors are multi-leveled categorical variables and two of them vary by time (t...
Let $$Y =\begin{pmatrix} Y_1 \\ Y_2 \end{pmatrix} \sim N(0, \Sigma) \quad \Sigma=\begin{pmatrix} \sigma_{11} & \sigma_{12}\\ \sigma_{21} & \sigma_{22} \end{pmatrix}$$ Show that $$\mathbb E(Y_1^2Y_2^2)=\sigma_{11}\sigma_{22} + 2\sigma_{12}^2. $$ I tried to turn this in all the ways but I need $\mathbb {Var}(Y_1Y_2)$ tha...
I'm currently analyzing the age variable in a dataset of all italian phyisicians (~470,000 obs) and I'm trying to check if age is significantly different between three groups defined by another variable (job). There are 34,348 obs for job 1, 6,404 obs for job 2 and 432,963 for job 3. First idea was to use the Oneway AN...
I am following this article on Understanding the Kalman filter by Meinhold, and I can understand all the derivation up until equation (4.4). However, I cannot understand how they arrive at the posterior estimates of $\theta_t$ conditioned on the error term and data $Y_{t-1}$. How is this derived?
I'm confused by the notation in Flexible Imputation of Missing Data. It seems to be saying that the influx is a function of the variable indexed by j (column number), as indicated by the LHS of the equation below. On the RHS though, j is used as the index in a summation? I would think that to compute I_j, you would fix...
When confidence intervals are referenced in the regression context, I often see them mentioned (generally speaking) as "of the slope of the regression line," or as "of the regression line." Is there a meaningful difference between these two descriptions? The latter seems more precise, as it accounts for uncertainty wit...
I am developing a proposal for an RCT. The IV/treatment has two levels - active control Vs experimental treatment. I plan on measuring EEG ERP baselines as predictor variables for treatment response. Treatment response will be measured by four dependent variables: pre and post treatment PANSS and MCCB scores. I am unsu...
Let $\xi_{n}$ be a symmetric random walk, i.e, $\xi_{n}=\eta_{1}+\eta_{2}+\ldots+\eta_{n}$ where $\eta_{1},\ldots$ is a sequence of independent identically distributed random variables such that $P\{\eta_{n}=1\}=P\{\eta_{n}=-1\}=\frac{1}{2}$. Show that $\xi_{n}^2-n$ is a martingale with respect to the filtration $\mat...
The following is the definition representative of the definitions if you google the difference between the one-way and two-way table: Sometimes we talk about data tables in terms of independent and dependent variables. In the case of one-way data, we had one independent variable, called the individuals, and one or more...
I did ANN classification on training data with oversampling and without oversampling. For each data, the smallest validation loss is sought with trial and error of 18 models. In the data without oversampling, the best model is obtained in the 7th model with a validation loss of 0.2122. on data with oversampling, the be...
I am reading Elements of Causal Inference by Peters et al. On page 36 they are giving an example with the following SCM: $$T := N_T$$ $$B := T\cdot N_B + (1 - T)\cdot(1 - N_B)$$ On the equation 3.6, when talking about counterfactuals, they condition the SCM $\mathfrak{C}$ on $\mathfrak{C} | B=1, T=1$, with the SCM beco...
Suppose that X is from the density $$ f(x, \lambda, \mu)=(\lambda / C) e^{-\lambda^4(x-\mu)^4}, \quad \text { for all } \quad x \in \mathbb{R}, \quad C=\frac{1}{2} \Gamma(1 / 4) $$ where $\theta=(\lambda, \mu) \in(0, \infty) \times \mathbb{R}$ is unknown. How would I calculate $E(X)$ and $E(X^2)$? This seems ugly to so...
I made this RCT survey to test whether any change of information presented/attached to a secondhand product might change the customer’s willingness to pay on higher price level. Control group (limited information): n=253 Treatment 1 (adding information on extrinsic value of the produce): n=286 Treatment 2 (adding infor...
I start learning Q learning algorithm. However, I can not understand which is the correct equation for q learning. I found different equation from different sources. Source 1 Reinforcement Learning with Q tables Source 2 Q-learning Source 3 What Is Q-Learning: The Best Guide To Understand Q-Learning I would like to kno...
I have 2 time series, say for instance, T1 and T2. T1 granger causes T2 at lag 2. Should this mean that if I make a VAR model with these two time series, and an autoregression model with just T2, the RMSE from the former should necessarily be lesser than the latter?
I am looking at cancer patient survival and want to know how long-term survival is after already having survived some time. I am more familiar with conventional conditional survival, but have recently seen in SEER*Stat a function called "Left truncated life table session". Would it be suitable to use left truncated lif...
I am trying to find the correlation between several clinical observations/demographic characteristics and the presence of certain electroencephalographic (EEG) features. The EEG features are my dependent variables. My problem is that some patients have repeated measures while some don't (anywhere from 8 to 1 measuremen...
Assuming the following scenario: There are N samples with M continuous features each (N < M). Each sample gets measured twice. One of the measurements is correct, the other one is uncorrelated with the true values. It is i.i.d. if the first or second measurement is correct for each sample. Each sample is also associate...
I am learning SVM. I have 2 questions in mind. First, what criteria use SVM to stop training? when I search for SVM tutorials, I found some. But, in all of them, training is done for example for 1000 iteration. But in sklearn, there is no limit for it. Still, SVM in sklearn perform much faster and sooner its over. How ...
I've got the following data with a logistic regression model # data score_dicho score <lgl> <dbl> 1 FALSE 175 2 FALSE 175 3 FALSE 175 4 FALSE 175 5 FALSE 189 6 FALSE 189 7 FALSE 189 8 FALSE 189 9 FALSE 210 10 FALSE 210 ...
After multiple imputation (imputed dataset = 20), I would like to conduct Bayesian Model Estimation with Adaptive Metropolis Hastings Sampling (amh) -- using the MCMC method. How can I pool the results together to obtain the following: Parameter Summary (Marginal MAP estimation) parameter MAP SD Q2.5 Q97.5 Rhat...
I am using Bayesian MCMC estimation methods for GARCH models and I want to check, if model residuals are uncorrelated. In classical frequentist approach, one would use standard Ljung-Box test to check this. But with MCMC estimation, I have 10,000 volatility samples (so 10,000 residuals) for each observation. So is ther...
I have this dataset about an airline company customers with 22 explanatory variables. My goal is to perform some sort of customer segmentation with the k-means algorithm. One problem that I've found is that when applied on the whole dataset, I find it difficult to identify well-separated and balanced group. For this re...
Say user 1 entered the raffle 18 times (18 tickets) and he had ticket ids [0, 2, 3, 4, 8, 9, 14, 16, 27, 28, 30, 31, 32, 33] (so they acquired the first ticket, missed the second (2nd hour ticket) then acquired the 3rd 4th missed ticket 5 through 7...and so on) Now say user 2 had the exact ticket set as user1, they a...
Let $X_n$ by a random variable that converges in distribution to $X$. On the top of that, $$\lim _{n \rightarrow \infty} E[X_n] = E[X] = O(1).$$ Does it implies that for every $n$ $$ E[X_n] < \infty? $$
I am struggling to get the correct answer for the simple calculation of convolution in R. The convolution of $f(t) = e^{-t}$ and $g(t) = \sin(t)$ is: $$ (f * g)(t) = 1/2 \left( e^{-t} + \sin(t) - \cos(t) \right) $$ Source: page 12 of https://users.math.msu.edu/users/gnagy/teaching/12-spring/mth235/w09-235-p.pdf In R, c...
I have a multi-class classifier ANN with ~11000 input features, two hidden layers and a softmax output. I would like to know which features are most important to drive the network towards predicting one class vs another. I have seen saliency maps used to define per-class pixel importance in convolutional networks that ...
Let $X_{11},...,X_{1n}\sim \mathcal{N}(\mu_1,\sigma^2)$ and $X_{21},...,X_{2n}\sim \mathcal{n}(\mu_2,\sigma^2)$ be iid distributed and such that $\{X_{i1}\}$ are independent from $\{X_{i2}\}$ and $\sigma^2$ is known. Now we consider the region $$R=\{(\mu_1,\mu_2): \frac{n}{\sigma^2}\left((\bar X_1-\mu_1)^2+(\bar X_2-\...
I am getting into survival analysis and am a bit confused about the definition of hazard ratio and odds ratios. This question implies that there is a clear difference between hazard ratios and odds ratios and that it is not straightforward to compute odds ratios from hazard ratios. Now, I found the paper of Heimer (201...
I'm confused about problems where we calculate a PDF conditioned on an event. Consider this simple problem: We have two random variables, X and Y, X is uniformly distributed on [a,b], and Y is uniform on [a,X]. We want to find the PDF of f(x|Y>y'). What's the best approach to calculate this? An approach that comes to m...
To expand on the issue I'm having a bit: I am trying to build a latent class model. The dataset I am working with contains some scales related to shopping habits, plus several demographic items (age, race, income, etc.). When I try to build the model with all variables added, it cannot converge. I am able to get conver...
The goal is to predict whether an employee will leave the company: yes or no. I have a dataframe with information about employees. There are 30 independent features and one dependent feature (Left: Yes or No). This data is gathered over a time frame of one year. Now, I also have data about which employees worked on the...
How to find cointegrating vectors and how many vectors could there be if $e_t\ $, $p_t\ $ and $p_t^\ast\ $ are cointegrated? $ e_t\ =\ p_t\ -\ p_t^\ast\ +\ v_t $ $ p_t\ =\ p_{t-1}+\ u_{2t} $ $ p_t^\ast\ =\ p_{t-1}+\ u_{1t} $ $ v_t\sim iid(0,\sigma_v), u_{it}\sim I\left(0\right)$ for $i=1,2$. Solution: $ A^\prime z\ =\...
I have the following data. I want to know which distribution best fits the data. First, I tried to check it using the Cullen and Frey graph, here are the results: > library(fitdistrplus) > descdist(respm, discrete = FALSE, boot = 500) However, from these results I am still confused about which distribution is suitabl...
Let me take $Z\sim \mathcal{N}(0,1)$. Then I know that $Z^2\sim \chi^2_1$. Now I want to show that the quantiles $\left(z_{1-\frac{\alpha}{2}}\right)^2=\chi_{1,1-\alpha}^2$ are equal. We know by definition that $\Bbb{P}(Z^2>\chi^2_{1,1-\alpha})=1-(1-\alpha)=\alpha$. Thus we deduce by taking the square root that $\alp...
I saw this and wondered if there are more applications of p-adics in stats and probability that do not zoom in on deep boltzman machines... something more general. Further, non-Kolmogorov interpretations of probability were discussed in this paper. I am just putting out feelers to get a sense of the interesting interse...