instruction
stringlengths
9
38.7k
I'm building a deep learning model to predict times of arrival. By definition, the time of arrival is always positive. I'm wondering if I can use a relu as the activation function of my last layer to force the predictions to be always non-negative. On one hand, seems intuitive that this should work, but I'm not sure if...
I know MICE can be used for imputation of multiple variables simultaneously. The expectation maximization approach (EM) can be used to impute missing data. Typically, one should only be using imputation on variables with missing rates of < 10%; is there an imputation approach that allows robust imputation when missing ...
My dependent variable is a yes/no measure; I'm trying to predict the probability of an event to lead to a yes or no. The independent variable is a categorical predictor with 3 levels. My data is unbalanced; I have an unequal number of events in each of the 3 levels of the independent variable (i.e. 311, 180, 238). Is t...
I'm learning OLS criterion (minimize the sample analog of Mean Square Error). And in one part the slide said OLS criterion can be written as: $Q_n(\beta)=\frac{1}{n}\hat{U}^T\hat{U}+(\beta-\hat{\beta})^T\frac{X^TX}{n}(\beta-\hat{\beta})$ Where $\hat{U}$ is the regression error that equal to $Y-\hat{Y}$ I try to prove t...
I am struggling to understand how to interpret the treatment and control group in the following case of DID regression. We need to estimate the causal effect of brick kilns on downwind PM2.5 monitor readings. Using the wind direction we identified the number of brick kilns that are upwind to monitor on a given day. Als...
I'm trying to calculate the Spearman's correlation coefficient for each quantile of my quantile regression (to later calculate the R² of each quantile), but the package I know of (QCSIS) uses Pearson's correlation. So my idea was to try to separate the quantiles and use the cor function to manually find the correlation...
This 8 schools data is from Gelman 2006 paper: http://www.stat.columbia.edu/~gelman/research/published/taumain.pdf. In Figure 1 (c), the prior density of inverse gamma (0.001,0.001) was overlain on the posterior histogram. The author claims that "This prior distribution is even more sharply peaked near zero and further...
Suppose I have the following (Rossi recidivism) dataset: week arrest fin age race wexp mar paro prio 0 20 1 0 27 1 0 0 1 3 1 17 1 0 18 1 0 0 1 8 2 25 1 0 19 0 1 0 1 13 3 52 0 1 23 1 ...
Say I have a binary dependent variable (Choice) being either 0 or 1, and people answer this DV multiple times. I also evenly split people in two groups (Group, group A vs group B). I simulate data so that I know that there's an overall 50% probability to choose 1 in group A, but only an overall 5% probability to choose...
I am learning about random forests, and I have been testing using R. I have doubts about whether I am doing something wrong given that my data are: sparse, high-dimensional, and unbalanced. Trying to understand the algorithm, I have been experimenting with a dataset of TF-IDF. The data frame is of dimension (1143, 2016...
What is the difference between Pi and Pi(x) in the Bayesian Classification context? Is it true to say that Pi is the marginal or prior probability? Is it true to say that Pi(x) is the posterior probability?
Imagine a 1-dimensional Bayesian update, with a prior $P(\Theta = \theta)$ and a likelihood function for evidence $D$ written as $\mathcal{L}_D: \theta \mapsto f(\theta)$. The posterior PDF $P(\Theta=\theta \mid D) \propto P(\Theta=\theta) \times f(\theta)$. Suppose we now consider evidence $D'$ with a likelihood funct...
I am a frequent user of the package (epiR), especially in Relative Risk and Odds Ratio. Generally, I use several covariates to make the associations (RR or OR), for example: outcome (death) versus exposure (Age, Gender, Length of Hospitalization, ICU, etc.). With that, I have to generate the same process several times,...
I have two conditions: A and B. Under each condition two parameters were measured in triplicates: x and y. Both are independent from each other (meaning the first x value does not experimentally correspond to the first y value) and I do not know the distribution of their populations. Now I want to compare the ratio x/y...
"Censoring in survival analysis should be “non-informative,” i.e., participants who drop out of the study should do so due to reasons unrelated to the study. Informative censoring occurs when participants are lost to follow-up due to reasons related to the study, e.g., in a study comparing disease-free survival after t...
I have 2 methods to compare by difference in race. For example I want to test the agreement between Method 1 and Method 2 between Asians, Americans and Africans. I know how to calculate kappa seperately for Asians, Americans and Africans. But is there any test in Stata by which we can compare calculated kappa between 3...
Why the estimates of prediction error will typically be biased upward with Cross-Validation? Is it like with decisions tree? Using a stopping criterion will increase a little the bias but will considerably decrease the variance (or overfitting in the test set)? Is this why LOOCV minimize bias but has high variance (sin...
Imagine there is a problem with 3 possible outputs: A, B and C. But, only output C is reachable when output A has been right before. Can a DQN model understand that without any further complexity?
I am familiar with the concept of stochastic ordering for two random variables and how we can say if a markov matrix is stochastically monotone. What im interested in is if there is a concept for ranking two separate markov matrices. To illustrate suppose we have two stochastically monotone Markov matricies $A$ and $B$...
Most of time conducting experiment is expensive. Suppose I and my collaborator decided to use a known databank(NHANE, NCI's data) to do some digging with some untested hypothesis given. Most of time any form of (observational/clinical trial) experiment will adjust according to hypothesis for confounders or at least try...
The question I'm working on says: Let $X_1, X_2, \cdots$ be iid random variables each with mean $\mu$ and variance $\sigma^2$. a) Determine $$ \lim\limits_{n \to \infty} \frac{X_1^2 + \cdots + X_n^2}{n}$$ I think that the answer involves the strong law of large numbers which in my text book says that: $$ \frac{X_1 + \...
I have data that is normally distributed related to risk of a particular disease. At the median of the distribution, you would expect to observe the population prevalence level of disease P0=0.01. For each threshold of the ROC curve I want to calculate post test probability P1. However, for all points on the ROC curve ...
I want would like to test if the mean iron concentrations were higher at delivery time in the vaxx group compared to the placebo ,what hypothesis test would i use
This is a clearer version of this question. I have two different cases: one where I have just the final accuracy, and another with the four error types split out: Case 1 (no error types): Dataset size: 78,000 Classifier 1: 51% accuracy Classifier 2: 64% accuracy Case 2 (with error types): Dataset size: 78,000 Classifi...
I'm reading this intro to meta analysis from Columbia University, and I cannot replicate the Log OR in the very first table. For the first study: OR = (1/39)/(2/34) = .03/.06 = 0.44 Log OR = log(0.44) = -0.36 Where as the table shows -0.83. I'm puzzled. What elementary thing am I missing here?
I'm trying to calculate the probability of $Y < XZ$ if $X \sim N(0, 1), Y \sim N(0, 1), Z\sim N(0, 1)$ are independent. If I understand correctly the distribution function of $xz$ is calculated in this way: $$ f(u) = \int^{\infty}_{-\infty}p_x(x)p_y(\frac{u}{x})\frac{1}{|x|}dx = \frac{K_0(|u|)}{\pi}, $$ where $K_0$ is ...
I have been working with a soil-derived viral metagenomic data set and am looking for advice on the appropriate statistical approach to the results. I have 2 different sample areas. Within both areas I have 3 replicate sites. Within each of these replicate sites, I have 4 samples. Totaling 24 samples. Within each of th...
I am trying to develop a negative binomial model where the dependent variable is crash count, and the independent variables are traffic count and roadway length. Currently, with the below code, I get only one value of overdispersion parameter. But I want to get the overdispersion parameter that varies as a function of ...
I have two variables, X and Y, whose relationship can be described well by a linear regression. HOWEVER, this relationship changes every once in a while. It is not that the relationship changes depending on the X value (like a piecewise regression), but that for example, for rows 1-100, the true relationship is Y=X+2, ...
I am new in R and for my class, I am trying to write the codes for one sample, a one-sided t-test for the alternative hypothesis B<0. As you probably can understand, weight is the independent variable I want to test. I wrote: t.test(Data$weight, alternative = "less", mu = 0, paired = FALSE, var.equal = FALSE) For some ...
Suppose we perform linear regression in some data and the model is correct (Y is a linear combination of X plus a normal iid error term). We know by assumption that the $e_i\sim\mathcal N(0,\sigma^2)$. But what about the residuals $\hat{e}_i=Y_i-X_i\hat b$? what is their distribution and why?
Disclaimer: I'm fascinated by statistics but it is not my greatest field. I am a rookie who has taken a few basic stats classes and majored in data science. I have the opportunity to use stats more in my career due to my current project and I'm very excited, but I want to seek guidance from experts instead of trying to...
Say I have two different types of data recorded on 30 different samples of a medicine (as a little background - there is spectral and process data - the differences observed in the two may or may not be related). Clustering algorithms were carried out separately on each set of data which divided the samples into 5 clu...
I'm trying to predict the probability of an event to lead to a yes or no response. The independent variable is a categorical predictor with 3 levels. I tested 21 infants; their responses to 3 different types of events (3 levels of the independent variable) were analyzed as a binary variable (yes/no). Infants contribute...
A type of disease that affects people over the age of 60 is far more prevalent in men (2%) than in women (0.1%). There is a screening test used on people over 60 that has different accuracy rates for men and women. What is the probability a person will test positive? The prior probability for men to have a disease is 2...
When I run a linear regression in the form of $y$ = $\hat{β}_0$ + $\hat{β}_1x$, I not only can calculate the values and SE of $\hat{β}_0$ and $\hat{β}_1$, but also their z-scores. Now what I don't understand is how can we know their z-scores if we don't know the true coefficients in the population (i.e. $β_0$ and $β_1$...
I am trying to linear-fit data in intermediate time scale (theoretically assumed to be linear) in the absence of the transient behavior in initial time and saturation after some time. For instance, like in the figure below (drawn by hand). Is there a statistcally meaningful way of applying a linear regression in the in...
In linear regression whose matrix form is $$Y = Xb + E$$ where $X=[X_1,X_2]$. If the error of using only $X_1$ (i.e $ Y = X_1b+E$ ) is $x_1$, and the error of using $X_2$ (i.e $ Y=X_2b+E$) is $e_2$, what is the range the error using both columns, i.e $Y=[X_1,X_2]b + E$? I tried to project $Y$ to $X_1$, $X_2$, and the $...
For a rigorous empirical analysis, I am training a model with three different seeds - 0, 1 and 2. In each case, I found that the model obtained through early stopping (lowest validation loss) had an F1 score on the validation set of a similar value (indicating convergence). However, for these models, the F1 score on th...
I'm running a mixed effects logistic regression model with glmer in R. I have data on 1197 participants in 17 facilities, and I'm looking at survival status (dead or alive) as the outcome event. In my final model, there's only one random effect which is facility, so I should end up with 17 groups, but my output says 14...
Suppose the sample $(7,2,6,12,10,9)$ is well approximated by a normal distribution with mean $\mu$ and standard deviation $6$. Use the discrete prior distribution $(8,9,10,11)$ of possible values for $\mu$ all equally likely. Find the posterior distribution and the posterior standard deviation. So I computed the post...
I am trying to use the MSM R-package to estimate a continuous-time hidden Markov model. I do not know why my code does not show the estimates and confidence intervals for the transition intensities and the hidden Markov model parameters when I print the msm object. I am attaching the data file and the code I am using. ...
I'm trying to identify seasonal and diel patterns in multi-year data from different locations using a mgcv::gam. I have continuous data at one site and recording gaps during the summer months for the others. I fit the gam like this: mod1 <- gam(y ~ s(julian, by=site) + s(Hour, bs='cc', by=site) + site + year, ...
Hi I am looking to use the cochrane armitage trend test. I have applied to my yearly data set using excelstat software. How do I get confidence interval in cochrane armitage trend test. Excelstat software does not show confidence interval and p value is less than <0.0001. Could you explain why there is no confidence i...
I'm guessing there was an error in a Probability and Statistics exam I have recently taken. Let $X$ be a random continuous variable and $f$ a function defined as follows: $ f(x)=\left\{\begin{matrix} Ce^{-2x} & , x < 0\\ 0 & x \geq 0 \end{matrix}\right. $ The question was to determine the constant $C$ so that the fu...
Suppose that I have 100 restaurants with identical menus and ingredients they need to procure to stay in business. Let’s assume that they have 100 menu items per restaurant and 500 ingredients in total per restaurant. Now let’s assume that you want to - for whatever reason - centrally coordinate the procurement of thes...
I run a stochastic computer program. What I’m doing is testing one strategy against what might be considered a default strategy. At the start of a run, there are 100 individuals using the test strategy and 100 using the default strategy. A strategy is successful if the quantity of individuals using the test strategy is...
Can you please clarify to me when to use continuity correction in proportion test please? I'm using this formula in R and I want to know the difference in the option correct= TRUE or FALSE. Also, I noticed the p value with correction goes up, so I'm just concerned if I'm using this option (TRUE or FALSE) correctly? how...
I'm unsure of a result that looks simple, but I want to make sure I'm not getting it wrong. Let $(\epsilon_t, t \in \mathbb{Z})$ be a process such that $\epsilon_t$ i.i.d.. I want to show that for any two arrays with the same size $t_1< t_2< ...< t_m$ and $t'_1< t'_2< ...< t'_m$ , the vectors $$(\epsilon_{t_1 - j}, \ep...
In Excel, my data is between 0.000001 and 0.005 and treated as "logarithmic" so I transformed by log 10 (log10(x)) which are all negative. The Excel Var.P() and Stdev.p() functions can only return positive values that when combined with antilog using POWER(10, ~) calculates as POWER(10, VAR.P(J1:J100)) = 1.7 POWER(10,...
I have a dataset which consists of calls placed to 911 occurring over a period of 13 years. The annual total calls has increased significantly over time, starting at around 200000 per year, and then increasing to at least 500000 after the first 3 years. The total for the most recent 5 year period is closer to 700000 an...
I'm trying to fit failure data which already has a burn in time, and Im in need to use the Conditional Weibull Distribution. Are there any Python packages which have this distribution implemented?
I have samples from 150 different genes containing the following information: sequence of the gene signal strength along the length of the gene (the signal can be negative or positive). I have therefore many different 1D observations that look like the following: I want sample 1 to cluster with sample 5, sample 2 to...
I am estimating an ordinal logistic regression under the assumption of proportional odds with the ordinal::clm() function. As a RE see this model from the "housing" dataset (MASS::housing): clm(Sat~Type*Cont + Freq, data = housing, link = "probit") %>% S formula: Sat ~ Type * Cont + Freq data: housing Coefficient...
In the explanation of the EM (Expectation maximization) algorithm p.328 in the book "Statistical inference" by G. Casella and R. Berger, 2nd edition, they present the following: $\mathbf{Y} = (Y_1, ..., Y_n)$ is the observed (incomplete) data. $\mathbf{X} = (X_1, ..., X_n)$ is the missing (augmented) data. The EM algo...
I am comparing 2 measurement methods with the Bland-Altman plot methodology. I found a proportional bias between the 2 measurement systems, by the regression model: difference = intercept + b1*average The parameters of the regression are: intercept = 18.44 b1 = -0.27 both are significant. How do I correct my new measur...
I tried to solve the XOR problem with 2 almost identical neural networks, see R Keras code below. What differs between the NN is that in the second network, I have added a linear output node, which if I understood the NN-litterature correctly, is how feedforward NN usually are designed (eventually more than one output ...
I know, that results from multiple linear regression, partial correlation analysis and ANOVA are tightly related to each other. The answers to this and this question indicate that the results may be "converted" to each other if appropriate information is given. However, for a concrete case, I am struggling to do so: Su...
I have a dataset where measurements on animals were done on multiple weeks of experiments. So I have measurements for week 1, week 2, etc. So I was wondering which type of variables are these? I thought they are discrete variables but I wanted to have a confirmation. Also, with discrete variables can I make the same ty...
I have a panel data of households. Meaning I have records of many households over multiple weeks. For the first six weeks no household received any treatment. For next six weeks all households received two treatments A and B. And for last six weeks all households received treatment A only. I am looking to measure the i...
I have been thinking about this for a few so I would like to hear some opinions. It could be complicated to explain so I will update the question if there is something that its not clear. Imagine I have a tabular dataset looking like this: Code, F1, F2, F3, F4, TARGET 01, 15, 23, 43, 12, 10 Suppose I plot the dist...
I would like to apply a constrained longitudinal data analysis (cLDA) with a linear response variable of the form, y ~ Time + Treatment:Time + (1 | ID). I am using "constrained" whereby the main effect of Treatment is removed, i.e. treatment levels are constrained to have the same baseline mean of y. I found out from p...
Suppose that I want to detect if a picture contains a particular logo, for instance the following one. Since template matching would be slow and fail those scaled or resized ones, I decided to train a classifier and I have two ideas: Gather many pictures that contain the logo and many others that don't, and directly ...
I’m building a Cox proportional model using two explanatory variables, A and B. The AIC for the model with only A is lower than the model with only B. This would lead me to believe that the model with A better fits the data. Of note, in each model, the p value for the coefficients of A and B were significant. I then tr...
I'm trying to understand heteroscedasticity and the influence this may have on GAMs fitted to palaeo data (or other time series). My understanding of heteroscedasticity is as follows (please correct me if this is wrong): A sediment core has been sampled every 1 cm, but due to sediment compression, we expect deeper samp...
I understand decision stump: a shallow 1-level decision tree is often used as base-leaner in ensemble methods such as AdaBoost. What is not immediately clear to me is using such ensemble methods in multi-class classification task. Can a decision stump have more than 2 leaves? Or each decision stump picks only 2-classes...
Suppose we have two set of numbers : A = [1,4,9,16,25,49...100] and B = [1,4,7,7,25,49,64...100]. As you seen the first one is consistently growing, elements of it is square of numbers. But although second one can be described as a square of numbers it doesn't strictly follow any rule and there is no fully suitable way...
While studying DeepWalk, I started wondering why I need "DeepWalk" when I can build a graph from data and visualize the structure of a graph. With a visualized graph, I can see which nodes are neighbors to which nodes from the graph visualization, then again, I wonder why I need "DeepWalk" when I can visualized a graph...
I have a subset (of some bigger set, lets say of size $N$) containing $S$ different things. Now each of these $S$ things belong to a category. The total number of categories is $<=N$. What can be a metric that quantifies the homogeneity of the objects in my subset with respect to the categories that they belong to. Mea...
I learn with David Silver's slides reinforcement learning. His definition of the history $H_t$ is: $H_t = O_1, R_1, A_1, ..., A_{t-1}, O_t, R_t$ $O =$ observations $R =$ rewards $A =$ actions Why do we have $A_{t-1}$ and not $A_t$?
I am trying to find a statistical method to identify anomalies in votes. I have a dataset including all the vote for every party in every voting table in every polling station. These votes are counted manually and therefore, subject to many human errors. Additionally, there are many parties to be counted. I would like ...
I'm looking to run a satisfaction survey on a population of about 100 subjects. My response rate is about 70%, and I plan to survey repeatedly, once a month, for a year. How can I test statistical significance in a change to satisfaction month over month? The respondents are mostly the same every month but there is ran...
I have recently been working with the pre-trained BERT. It produces quite good results on supervised tasks with just a bit fine tuning. But now I wonder if I want to perform some unsupervised task on a custom dataset like amazon reviews or maybe a news dataset. Would it be wise to further pre-train BERT or use the alre...
I would like to study the associations between x (independent variable) and y(dependent variable) controlling for some factors like demographic factor. Both independent and dependent variables have data for 2013 and 2019; however impact of x can be seen on y in several years (some lag time). Which type of regression an...
Suppose we have $x=(x_1,...,x_n)|\mu,\sigma^2\sim f(x_i|\mu,\sigma^2)$ $iid$, also let $\mu\sim p(\mu)$ and $\sigma^2\sim \pi(\sigma^2)$ be prior distributions. Here $f,p,\pi$ are generic distributions. Then the posterior is $$ p(\mu,\sigma^2|x)= c\times L(\mu,\sigma^2)p(\mu)\pi(\sigma^2), $$ where $c$ is the normalizi...
After running ADF-tests and kpss-test I find that the variables are stationary without drift and trend. I have two questions: Is it the correct use of terminology to say that they are not integrated, i.e, I(0)? (wich implies that there is no need for cointegration-tests) Since I have three variables, should I do some ...
I'm looking for a Bayesian filter where observations are generated according to $s_t = \gamma s_{t-1} + w_p$ and $w_p \sim Normal(0, \sigma_p^2)$. Both $\gamma$ and the variance of the process noise $\sigma_p$ are known. However, different from the classical Kalman filter, the observational noise is not assumed to be G...
If I have normalized all predictors, can I use coefficients of ridge regression as feature importance values? Normalization in my case means: $(x - u) / s$ where $u$ is the mean and $s$ is the standard deviation. And if I want to reduce the number of predictors, can I do it with backward stepwise regression bypassing f...
I am struggling to understand how to interpret the treatment and control group in the following case of DID regression. We need to estimate the causal effect of brick kilns on downwind PM2.5 monitor readings. Using the wind direction we identified the number of brick kilns that are upwind to monitor on a given day. Als...
In growth curve modeling or other approaches, when time is constrained/synchronous/regular (i.e. panel/wave data; all observations occur synchronously), lagged prediction is trivial - simply add t-1 as a predictor. This is all very easy in the SEM framework for growth curve modeling. However, if data is irregular/time-...
Consider the following regression model $$ Y_i=D_{i}(\alpha_1+\beta_1 X_i)+(1-D_i)(\alpha_2+\beta_2 X_i)+\epsilon_i $$ where $D_i$ is a binary variable. Suppose the researcher has an i.i.d. sample $\{Y_i, X_i, D_i, Z_i\}_{i=1}^n$ where $Z_i$ is an instrument such that $E(Z_i^\top \epsilon_i)=0$. One way to estimate $\t...
I hypothesize that a clinical outcome can be predicted by 5 categorical predictors and one numeric predictor. One of the predictors is the physician that cares for the patient. I have the data in the following structure in R: str(ModelData) #tibble [775 × 6] (S3: tbl_df/tbl/data.frame) # $ Outcome : Factor w/ 2 l...
Consider a pair of independent random variables $(V,Z)$ where $Z$ is standard normal. Now Suppose that the following equality holds: for a given $a>0$ \begin{align} \mathbb{P}[ a V\le Z| V+Z]=\mathbb{P}[aV \ge Z| V+Z] \text{ a.s.} \end{align} Question: Can we show that the above is true if and only if $V=\frac{1}{\sq...
I'm doing lasso and ridge regression in R with the package chemometrics. With ridgeCV it is easy to extract the SEP and MSEP values by modell.ridge$RMSEP and model.ridge$SEP. But how can I do this with lassoCV? model.lasso$SEP works, but there is no RMSE or MSE entry in the list. However the function provides a plot wi...
Assume that I have a set of $N\in\mathbb{R}^{D}$ samples from some otherwise unknown multivariate distribution $p$. I seek a metric which might tell me how "close" $p$ is to a standard multivariate Gaussian distribution $\mathcal{N}\left(\mathbf{0},\mathbf{I}\right)$. I am particularly interested in metrics which can p...
I'm having trouble understanding the Bootstrapped Latin partition method (as presented in Statistical validation of classification and calibration models using bootstrapped Latin partitions and illustrated in On Splitting Training and Validation Set). In the latter paper, Fig. 2 shows the image pasted below and the fo...
Let's say I have asked an individual to classify images according to 3 fruits that he sees : apple, banana and kiwi. Then, I want to assess whether there are significant differences between the frequencies of each classified fruit (there are more instances, this is just an example). I am thinking of using one-way ANOVA...
I have an XGBoost model that I fit on some X data directly out of the box: xgb_outofbox = XGBClassifier(random_state=0).fit(X_tr, y_tr) This model yields an F1-score of 0.626 on my test holdout data. Then I build another model: cv_params = {'learning_rate': [0.1, 0.2, 0.3], 'max_depth': [2,3,4,5], ...
Suppose you take a sample of size 3 with values 0, 0 and 1. (3 is the minimum size to make the sample asymmetrical and make the question non-trivial.) Ever since my first stats class, I've been vaguely confused because I didn't understand: why is it useful to calculate the mean of this sample, 1/3? At first I naively...
I'm doing a linear regression model with data from 30 cities over 5 years (150 observations). However, by using data from cities over time, am I violating the assumption of independence of observations? Or does the fact that my sample has the same number of observations for each city makes the assumption respected? P.S...
I am using constrained polynomial regression to predict y = f(x). I have prior knowledge about the relationship that allows me to add constraints to the optimization problem for the first and second derivatives of the polynomial. However, the knowledge is not perfect and I want to select the optimal constraints to use ...
I'm trying to figure out how to interpret the output values of an impulse response function. Consider a VAR model with 3 variables and 8 lags. The variables are, in order, gdp-gap, inflation expectations and inflation. All 3 variables are in percent. The output from the irf-function looks like this: Impulse response c...
I am a grad student with little experience with R. I am wondering if there is an equivalent of polr's zeta in glm. For a part of my code, I used the intercepts for the class boundaries from a polr function by using zeta: sto<-polr(factor(y)~log(x),method='probit') sd<-1/as.vector(sto$coeff) mu<-as.vector(sto$zeta)*sd #...
0 I have a theoretical / stats related question. I've run the package in R and it's easy. Question: How can I know the incremental impact of Campaign #1 during a period when Campaign #2 was also active during the same time period and in the same markets as Campaign #1? r statistics
If I have the sum $$f(t)=\frac{1}{N}\sum_{i=1}^N e^{-\frac{t}{\tau_i}}$$ where each $\tau_i$ is distributed normally with mean $\tau$, what will be the mean functional form of $f(t)$ in the large $N$ limit? Will it just be an exponential with lifetime $\tau$ i.e. $\langle f(t) \rangle =e^{-\frac{t}{\tau}}$?
The inverse correlation matrix was calculated with the minverse function. The results show that in the diagonal the values are less than 1. how is this possible? the x1,x2 independent variables are correlated at about 0.5
Regarding "C" and "D": Is there a way other than visually inspecting the notches from the boxplots? I know the range of values for "D" is lower than "C" and the median value appears to be lower for "D". I also think that box "D" has less variability. I'm not sure what else is worth mentioning when I compare the two box...
I am currently dealing with a dataset with about 300,000 records, there are a wide variety of categories in several columns and naturally when one-hot-encoding these the number of features increases into the 1000s. Is there some sort of heuristic to find the optimal number of n_components for SVD that in turn minimises...
Suppose I have N fair samples $(x_i, y_i); 1 \leq i \leq N$ drawn from the 2 dimensional continuous PDF $p(x, y)$; $\int p(x, y) \, dx dy = 1$. The functional form of $p(x, y)$ is unknown. Is there a way to obtain from these samples a set of fair draws (not necessarily of the same number) from the reduced distribution ...
I encountered this formula in my assignment: $$X\sim \Gamma(\alpha, \beta), 1\le k < \alpha$$ $$ E(X^{-k})=\frac{\beta^k}{\prod^k_{i=1}(\alpha-i)} $$ And I wonder what would happen if $k$ is greater than $\alpha$.