instruction
stringlengths
9
38.7k
I have an experiment predicting $y$ from the interaction of two two-level categorical independent variables, $x$ and $z$. (My actual design is more complicated, but I'm simplifying here to get at the root of my question.) These data are from a psychology experiment where multiple subjects respond to multiple items, so ...
I'd like to ask three questions regarding the negative binomial (NB) regression / distribution. The NB model with NB2 parameterization ($var(Y_{NB2}) = \mu + \frac{\mu^2}{\theta}$) is sometimes referred to as the Poisson-gamma model. It should be because the count data come from a Poisson-gamma mixture distribution – ...
I run a standard GARCH (1,1) model and obtain the following results. Thereafter, I add an external regressor in the same model and obtain the following results: The GARCH coefficient (beta1) is zero and the p-value is 1. The coefficient of the external regressor (vxreg1) is 0.415 with p-value of 0.000. I use the robu...
So if we divide the covariance with the respective standard deviations we get the correlation which in turn is "measure of strength" How does this divsion achive this property that covariance does not have?
I am working with a VAR and trying to understand the dynamics of it for forecasting. I am stuck trying to figure out the equations. Currently, I am trying to generate conditional forecasts by expressing the equations in the form of conditional expectations. So, I need to find $E[Y_{t+k}|X_t,Y_t]$ and $E[X_{t+k}|X_t,Y_t...
I'm trying to work out the order of operations when building a GLM. I have 9 variables I could use as inputs for the model, however I may find that some are irrelevant to the independent variable and so I won't use them. I was thinking I'd start off by using all 9 variables to pick a distribution and link function for ...
I have 3 categories of tissues examined by microscopy (A , B and C, 12 of each). I want to test whether the proportion of tissues staining by a particular dye, differs in the three categories. Each of the 36 tissue specimens is stained and examined under the microscope. The data is collected in the form of proportion ...
When we encode categorical variables in a (generalized) linear model, the standard approach is to have one category subsumed by the intercept. If we include such a variable in a neural network (along with other features), should we avoid this in order to allow all categories to enter the nonlinear activation functions ...
At the same time, we counted the frequency of occurrences of characters in all URLs in the dataset and selected the first 59 characters with the highest frequency as valid characters. It contains 26 English letters, 10 Arabic numerals, and 23 special characters including “@/: = #-.” Other characters that are not in th...
I have a question about correlation. My research has 8 independent variables out of which 3 are continuous variables and 5 are dichotomous/binary variables. I have to check multicollinearity before running the regression model through correlation. can I use Pearson's correlation and point biserial correlation simultane...
Suppose we have a linear model $Y=X \beta + \epsilon$ where $\epsilon \sim N(0, \sigma^2 I)$ and let $H$ be the projection matrix into the column space of $X$. We define the residual $e$ as the projection of $Y$ into span$(X)$ (i.e. $e=(I-H)\epsilon \text{ }$). A statement says that : by construction, $X^T e=0$ and it ...
Disclaimer: I'm new to stats so please bear with me Everywhere I look, the Chi-Square Distribution is explained with a (Z-Score)^2 i.e $$ ((X-\mu )/\sigma )^2 $$ and based on a random variable from a STANDARD NORMAL Distribution in which case it becomes $$X^2$$ However, the Chi Square Goodness of Fit Test is explained ...
I have a trial comparing 2 treatments vs a control group. Typically one would use Dunnett's test for this situation, but the outcome measure is binomial. It seems strange to me but I've looked for the equivalent version of a Dunnett's test for binomial endpoints and not been successful in finding one. Can anyone sug...
Here's the following problem, in the abstract: y is a binary outcome X are covariates c is a continuous treatment/exposure variable a and b are regression parameters y, X, and c are somewhat correlated empirically (but the true model does not have to be). The GLM regression (identity link function) we estimate is thu...
Let's consider some small classification dataset D, and 2 classifiers A and B: a classifier A, with hyper-parameter $\alpha$, and a set of candidate values for $\alpha$: (1, 10) a classifier B, with hyper-parameter $\beta$, and some set of candidate values for $\beta$: (5, 500) The goal is to identify the best perfor...
I read this paper on firm performance in a prestigious journal and can absolutely not explain how the authors came to this conclusion: The estimated increase in the level of overall economic performance (OEP) attributable to VC-backing is equal to +41% (Investor A) and +50% (Investor B), respectively. Model (simplified...
I'm looking for a principled way to estimate when an event of interest is overdue (a binary decision/alert), not just predicting when it is supposed to happen. In the survival analysis literature I have not come across this particular question yet: the typical survival paper/algorithm is about estimating 'how much long...
When using a linear classifier for a k-class classification problem, is there actually any difference of using a single linear layer with k neurons + cross entropy loss 'one vs rest': k linear layers with 1 neuron each + binary cross entropy loss [*] In particular, should one be preferred over the other? Is there any...
What are the main takeaways we, as statistics community, learned from (time series) competitions? Kaggle, or the M.. competitions, seem such a valuable source, but the (only) main insight I remember is that boosting algorithms such as LightGBM or XGBoost tend to work very well. I am currently teaching a course on pract...
I've tried to custom code contrasts in emmeans to understand the effect of a combined treatment variable (combination of factors, Dose_Climate). I am not sure the contrast of contrasts I've coded is properly capturing the same thing as a regular interaction effect (which is what I want) because I have unexpected result...
Probably a basic question for many of you: If I look at my descriptive statistics (looking at mean values as standard deviations are too high) on the impact of different investor types on startup accounting data pre- and post investment (amount of sales, amount of total assets, employee headcount, etc.) than I see a st...
Consider the Weibull sampling model for $X_1,\ldots,X_n$ iid, where $$p(x|\lambda,k)=k\lambda^kx^{k-1}e^{-\lambda^kx^k}$$ for $x>0$. Assume $k$ is known and $\lambda$ is unknown. First, if I adopt a $\text{Gamma}(a,b)$ on $\lambda$, this is not a conjuage prior for the Weibull sampling model, since the leading posterio...
I wish for a better understanding of the mean from principal component analysis. I am told this merely projects the origin to a different coordinate space. However, is there use to using the mean from principal components, I am usually taught to use the variance explained.
I'm currently working on a paper based on data we got from a questionnaire. I'm having trouble figuring out the best way to go about it when it comes to the best test. This questionnaire looks at the same sample of people across multiple time points, a year before, one month after, and six months after a therapeutic in...
Consider a 1-layer fully-connected neural network (FCNN) given by $$ f(x) = \sum_{i=1}^n v_i\sigma\!\left({w_i}^T x\right) $$ where $x,w_i\in\mathbb{R}^d$, $v_i\in\mathbb{R}$, and $\sigma(y)=\max(y,0)$ is the ReLU activation function. According to my professor, he was telling us that it is not possible for this $f(x)$ ...
I got the following question in one interview: suppose we have an N-sided die and given the probability of landing on each side, how to assign values from 1 to N, to make the expected value close to $(1+N)/2$. For example, if we have a two-sided die and the probability of face is 1/4 and the probability of tail is 3/4,...
I am currently reading 'Dive into Deep Learning' and right now I am trying to improve my intuition for the Kullback–Leibler divergence. I get the basic idea, why this metric is not symmetric, however, I do not understand the massive divergence in this example, taken from the book : "First, let’s generate and sort three...
Let $x$ be any random rational number where $x \in (0, 1/8)$ and $f(x) = 8x$. Therefore, $f(x) \in (0, 1)$. How would I mathematically calculate the entropy of $x$ and $f(x)$? Applying the differential entropy formula, I get $\log_2(1/8) = -3$ bits of entropy for $x$ and $\log_2(1) = 0$ bits entropy for $f(x)$. I ass...
I am attempting to fit nls() for 520 users to achieve the coefficients of the exponential fitting. The following is a small representation of my data. dput(head(Mfrq.df.2)) structure(list(User.ID = c("37593", "38643", "49433", "60403", "70923", "85363"), V1 = c(9L, 3L, 4L, 80L, 19L, 0L), V2 = c(10L, 0L, 29L, 113L, 21...
I have a dataset consisting of 5 classes and the prior probability is $p(\omega_c)=\frac{|D_c|}{\sum_{i = 1}^{5}|D_i|}$. Suppose each class $c$ associated with the likelihood $p(x|ω_c)\,=\,\text{N}(\mu_c,\Sigma_c)$. How can I derive a decision rule using Bayes' rule to assign a sample to one of the 5 classes? Moreover,...
Given a message encoded with a simple substitution cipher, I would like to estimate the probability of each letter representing a given letter key, based on letter frequency analysis. I am not as interested in cryptography and letter order (which I understand are more powerful tools) as I am in how to calculate individ...
I have a dataset that has several machines, the quality of two components over time, and the number of breakdowns in a given year. Simulated Random Data: Real data consists of 100K machines, the simulated data 1K. The 3 continuous measures I'm interested in are - for each quality level of each component and the combin...
Suppose we have a bag which has 1 red ball and N green balls. We randomly draw a ball from the bag: if this is red, we do not put it back and take one green ball from the bag and discard it too; if this is green, we put it back and put one red ball and one green ball into the bag. This will guarantee that we will alway...
Assuming there are a large set ($N>1000$) of independent events $E_i$ ($i=1,2,\dots,N$), each having $M$ different outcomes. For each event $E_i$, I have an estimated discrete probability $\hat P_j(E_i)$ of outcome $j$, ($j=1,2,\dots,M)$, which is not necessarily the same as the 'true' probability $P_j(E_i)$. The event...
How did the hat matrix get its name $\hat{\mathbf{H}} = \mathbf{X} \left( \mathbf{X}^\textsf{T} \mathbf{X} \right)^{-1} \mathbf{X}^\textsf{T}$ I am interested in the etymology of the term. Who gave it a name and why?
Does choosing a model with the lowest validation error also guarantee that the model has the lowest test error?
When we want to do inference on parameters or nested models, stepwise variable selection causes a number of problems, discussed by Frank Harrell and others. However, if we validate the stepwise model-building on some kind of holdout data, we would be getting an honest assessment of how our modeling performs, which we d...
In a null hypothesis, if our parameter in a linear model is θ = 0, wouldn't that mean the true parameter of θ is 0?
Why do people use log(x+1) or log(y+1) as their independent/dependent variable? In these cases, is it that different from using just log(x) or log(y)? What is the benefit of using log(x+1) or log(y+1)? Sometimes when I read papers, the authors specify that their model's variable is the log of a variable + 1. I have bee...
There is a similar question posted but this is not what I am looking for: Interpreting coefficients when dependent variable is a fraction/proportion? I was reading a paper that ran a difference-in-differences regression and the coefficient value was -0.036. The dependent variable is vote shares and none of the variable...
I wanted to train a Bayesian version of this model which we can consider to be this log-linear form. $$\ln \text{PSI} = \alpha \text{Time} + \beta.$$ Here are the priors I guessed for $\alpha$ and $\beta$. $$\alpha \sim \mathcal{N}(-0.04, 1)$$ $$\beta \sim \mathcal{N}(0, 1)$$ Here are samples from the posterior of thes...
I have a candidate set of five linear models, as I want to choose the model with the lowest AIC and calculate predictions from it. For each model, I have tested for normality of model residuals (shapiro.test(residuals(model)) from stats R package), homoscedasticity of model residuals (bptest(model) from lmtest R packag...
To plot the ROC curve for the test set using k-fold cross-validation, the common approach is to plot k different ROC curves, one for each fold, and then obtain their average, as suggested in sklearn website. I want to follow a different approach: Let's concatenate the predictions obtained for the test sets in different...
I want to perform deconvolution of a small data set (3 samples of one conditions vs. 4 of another). The tool CibersortX can estimate the sample-specific expression of cells, using the bulk expression data provided, and a signature matrix of typical expression by cell type. I suffer from a low number of samples. Howeve...
I have an emmeans object of a logistic regression model (glmer). I made plots with ggplot2, which I like very much. Now I'd like to incorporate the contrasts in some way. Is there any convention about doing this? I was thinking of using the lower confidence limit (LCL) of the contrasts and Cohen’s Conventions for Small...
One of my friends has done the following: He trained an XGBoost model let's call it Model 1 and then calculated the feature effects using Shapley for the different features, let's say Feature_1, Feature_2, Feature_3. He then calculated the performance scores using the following combinations: Prediction 1 = Effect Feat...
Regarding the question of whether Kfold cross-validation is applicable to time series data, I've read some answers from stackexchange and blog posts from other sources as well, and they state that we cannot apply Kfold cross-validation to time series modeling (eg. Don’t Use K-fold Validation for Time Series Forecasting...
I am currently trying to analyze the duration of the egg stage of two species of insect (factor 1; 2 levels - HA and AP) at several different temperatures (factor 2: 5 levels - 20, 23, 26, 29, 32). After winsorizing my data to remove outliers my model is: model1 <- glm(winsorized.Duration ~ Temperature*Species, f...
I need to derive a pairwise offset matrix from the two known data array $X_{n \times p}$ and $Y_{m \times p}$, in which the offset are derived from values at corresponding locations $x_{ij}$ and $y_{ij}$ in the two array. The following figure shows an example: How can I derive the offset matrix $D_i$ using matrix oper...
(Question duplicated from math.stackexchange as per suggestion in the comments) In my assignment, I have to approximate a curve based on $N = 15$ data points, then test what distribution the absolute values of approximation errors fall under. Mean and sigma of the approx. errors were found to be $M = 0.005$ and $\sigma...
I'm looking for information and guidance to help me understand the outlier test in DHARMa for negative binomial regression in R. Here is the diagnostic plot from DHARMa using the function simulateResiduals(). First off, The dispersion test is significant in the plot. Using testDispersion() on the model and on the resi...
Let's say I have a labeled dataset $L$ and unlabeled dataset $U$, where $U \gg L$. Suppose I focus on a subset of $U$ called $u$ and generate a subset of $u$ I'll call $u_L$ that consists of pseudolabels for $u$ that I've generated using Tri-training. Suppose $U$ is so large, that depending on the amount of datapoints ...
In matrix term: $$y=X\beta+\epsilon$$ Using OLS: $$\hat{\beta}=(X'X)^{-1}X'y$$ Question: why cannot I do the following $$ \begin{align} \hat{\beta} &=(X'X)^{-1}X'y \\ &= X^{-1}X'^{-1}X'y\\ &=X^{-1}y \end{align} $$ The Assumption that X has no multicollinearity ensures $X'X$ invertible but not $X$?
To find the full conditional distribution of $\eta$ for a Gibbs sampling algorithm , I have to show that $$ p(\eta|-) \propto \int N(\eta;\Omega(\Lambda+\Delta^{-1}\mu),\Omega) N(\mu;\hat{\mu},\Delta/\kappa)d\mu \\= N(\eta; \Omega(\Lambda+\Delta\hat{\mu}), \Omega + \Omega(\kappa\Delta)^{-1}\Omega). $$ I know that the ...
In a dataset, the unseen target value is 2500000000. In a polynomial regression with degrees from 1 through 7, I have the following results: Degree: 1, Mean Squared Error: 410983500.2950994, Predicted: -81178512721.65013 Degree: 2, Mean Squared Error: 5829093.43611284, Predicted: -81178512721.65013 Degree: 3, Mean Squa...
According to this guy here: https://towardsdatascience.com/how-to-compare-two-distributions-in-practice-8c676904a285 and the following papers he mentions inside his article, and more specifically the 2 below: [1] Elmore, K. L. (2005). Alternatives to the Chi-Square Test for Evaluating Rank Histograms from Ensemble Fore...
I'm learning about machine learning and data science and I Would like to know, given a dataset which contains "Date" as one of it's many features. How to determine if I'm facing a time series problem where I can use ARIMA, SARIMA or maybe a machine learning model like XGBoost or otherwise treat this dataset as a "norma...
What is the difference in the underlying procedure between the two? For fixed ratio matching with a caliper, would the caliper be applied after fixed ratio 1: n matching? If so, would it result in variable number of controls matched to each treated?
I'm reading "An Introduction to Statistical Modeling of Extreme Values" by Stuart Coles, and using the pyextremes package for exploring the data which is time to return (in days). After detrend (as suggested in the book) my data I've got the model as Univariate Extreme Value Analysis ...
I have many kmers counts from different prokaryotes, and I use a high markov order to obtain the expected counts to compare with the observed counts. And for look for over/under represented kmers counts I use z-scores. From z-scores I calculate my p-values and then e-values. So Iuse threshold e-value = 0.001 to select...
In my problem, both random variables have zero mean, are univariate, and are independent. They may have different variances. If they happen to have the same variance, of course the mixture is Gaussian with same variance regardless of the weights in the mixture. But what if the variances are different?
If the dependent variable is discrete ordinal, like 0-10 then an ordered logit or ordered probit is appropriate to use. They are both similar but their interpretation are different and their error is different distributed. An ordered logit is logistically distributed and an ordered probit is normal distributed. The ord...
i was comparing the results of 3 different techniques for regression task( Deep ensembles, variational inference and concrete dropout) and i got these results from the table looks like everything is fine and variational inference seems the best option since it leads to lower values, but if i apply $\sigma$-scaling to...
Let $X_1,X_2,\dots,X_n$ be iid random variables with distribution function $F(x)$ and $M_n:=\max\{X_1,\dots,X_n\}$. By the extreme value theorem, there exist two sequences of real numbers $a_n>0$ and $b_n$ such that the following limits converge to a non-degenerate distribution function $G(x)$. $$ G(x;\mu,\sigma)=P(X\...
I'm doing an analysis of a master's student in which I need to compare a continuous numerical variable between two groups. The samples are independent and each group contains only three observations each. The issue is that the treatment was very efficient compared to the control, the database came a little strange. The...
Our current experimentation platform currently has winsorization implemented to reduce "whale effects" on metrics like revenue and volume. We are also interested in applying CUPED to further reduce variances based on pre-experiment values. My question is: can I apply both and in what way would make the most sense? My a...
I'm having a hard time following one of the interpretation of a paper that I am reading and was wondering if anyone might be able to help me please? The dependent variable is a dummy variable and uses a logit model. The dependent variable is either 1 if a country has fair elections and 0 if not. The explanatory variabl...
Does anyone have a formula/code to calculate the modified Z-score (based on median instead of mean) for multiple columns of a dataframe in R? Example data: data <- data.frame(x = c(1, 4, 4, 6, 7, 8, 12), y = c(3, 4, 6, 8, 8, 9, 19), z = c(2, 2, 2, 3, 5, 8, 11)) data %>% mutate(...
Control group had 2/200 people quit their jobs. Experimental group had 3/90 people quit their jobs. My gut tells me that this result not statistically-significant, but how can I show it using a statistical test?
my friend and I had an interesting disagreement about a statistical scenario, and we were wondering if we could get your perspective on it. There’s a large population of numbers, let’s say 1000. We don’t know any of the numbers at the beginning, but we are given them one at a time at random. We don’t know anything abou...
I am doing behavioural research on dragonfly larvae and I am trying to answer the question "Is there a behavioural difference between males and females and between species? + Do the difference between males and females change according to the species?" The behavioural data I have is the total distance moved by each ind...
I have behaviour data to analyse: the time budgets of cows (three columns of 3 different behaviours per hour). Values range from 0 to 60 minutes each hour (e.g. 30 min active, 10 min lying and 20 standing). The behaviours each hour always add to 60, and time goes from 0 to 23. For variables I also have day and cows (wh...
While the proper way of constructing the sampling distribution would be to repeatedly sample from population with unknown parameters, I'm not convinced it is the case in practice. Surveys performed in real life is always one-off questionaires that collect a bunch of samples, e.g. one sample of sized n. If they are to c...
I have a longitudinal dataset with 22,000 patients, where patient entry dates are different. Regarding time related data, all I have are birth and measurement dates for each patient. For example, while a patient is measured in "2016-04-27" "2016-05-23" "2016-06-27" "2016-07-20" "2016-07-21" "2016-07-22" "2016-07-23" "2...
I'm looking for something that I think is called "[somebody]'s transform", but I can't remember its name. The idea is that if I have a measure on $[0,1]$ representing the bias of an unknown coin, then I can get the probability of observing $n$ heads and $m$ tails by integrating the measure against a beta distribution. ...
I have conducted a variance partitioning in R with the vegan package to test how weather variables partition in the variance of the green-up day. library(readr) library(vegan) data = read_csv('C:/path/data.csv) out = varpart(data$greenup, ~ data$CAPE, ~ data$Temp, ~ data$precip, ~ data$WS) out Partition table: ...
I want to meassure satisfaction per customers. I have to factors that define satisfaction: Amount of Incidents Sentiment-score per Incident Sentiment-score is calculated with natural language processing sentiment analysis and is in the range of -1 (negative sentiment) and +1 (positiv sentiment) Amount of Incidents is...
I'm trying to predict weight based of age and height for people under 30 and people 30+ I have the original data set mydata I have then created two subsets mydatalessthan30 and mydata30plus Then I have A = lm(mydatalessthan30$weight ~ mydatalessthan30$age + mydatalessthan30$height) B = lm(mydata30plus$weight ~ mydata30...
Suppose $y_1,\dots,y_n$ are i.i.d. and have the $N(\mu, \sigma^2)$ distribution. I'm interested in finding an unbiased estimator for $$ \rho := \frac{\mu^2}{\mu^2 + \sigma^2/n}. $$ A naive approach Consider the ratio between the unbiased estimators for $\mu^2$ and $\mu^2 + \sigma^2/n$. Denoting $\hat \sigma^2=\frac{1...
I have a discrete probability distribution: [0.05, 0.05, 0.05, 0.25, 0.6] which represents the probability of a character(given by the index in the vector) to appear. How can I define a measure between 0 and 1 that shows that most of the probability is concentrated on the last two characters?
I have a question. I have a logistic regression model with two variables a & b. In the analysis of deviance table (type = 2) seems that variable b is more significant than a. But when I plot the logistic curve it seems that a has the plot: and b: How is that possible? I feel I missing something.
The problem is about doing a regression on the impacts of money supply growth and output (GDP) growth on inflation rate growth: $$ \mathrm{inflation} = \beta_1 + \beta_2\mathrm{money} + \beta_3\mathrm{output} + u $$ The variable output is known to be endogenous. The variable money is exogenous. There are four instrumen...
I have the following Weibull distribution: $f(x;\lambda,\beta) = (\lambda\beta)x^{(\beta-1)}e^{(-\lambda x^b)} $ where $\lambda$ is scale parameter and $\beta$ is shape parameter. I have an alternative parameterization for Weibull in r link: $f(x;a,b) = \frac{a}{b} (\frac{x}{b})^{(a-1)} e^{(- (x/b)^a)} $ where $a$ is s...
In the following model, I have a linear model with a categorical by continuous interaction: library(ggplot2) library(lsmeans) myModel = lm(Petal.Length ~ Petal.Width*Species, data = iris) ggplot(data=iris, aes(x = Petal.Width, y = Petal.Length, color = Species)) + geom_jitter(alpha = 0.5) + geom_smooth(method = "...
I am confused by a simple fact but I can't solve my head around it! It's known that: $P(y,\theta) = P(y|\theta)*P(\theta)$ and $P(y,\theta) = P(\theta|y)*P(y)$ Giving us: $P(\theta|y)*P(y) = P(y|\theta)*P(\theta)$ (both valid probability density functions) But in bayesian inference literature we learn that $P(y|\theta)...
I need to take independent draws from Normal Inverse Wishart distributions with different parameters. In practise I want to draw: $x_i|\Sigma_i \sim \mathcal{N}(\mu_i, \Sigma_i \otimes \Psi_i )$ $\Sigma_i \sim IW(S_i, v)$, for $i = 1 , \ldots, T$ where $\Sigma_i$ is $N \times N$ and $x_i$ is $k \times 1$. The parameter...
I have read that batch gradient descent forces this summation at every step of the update, which makes it time consuming. But if we have the following hypothesis function: $$h(x^i) = w_0 + w_1x^i$$ Then the update rules become: $$w_1 = w_1 - \alpha/N\sum_{i=1}^n (y^i - w_0 - w_1x^i)x^i$$ $$w_0 = w_0 - \alpha/N\sum_{i=1...
I have 6 binary response variables, and I wish to explore what variables can predict these binary outcomes. glm(cbind(Y1,Y2)~X1+X2, data = dt) doesn't do the work. It gives me an error: eval(family$initialize) : y values must be 0 <= y <= 1, although all variables have been coded into 1 & 0. Also, both glm(Y1~X1+X2, da...
I am reading Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) section 6.3 Recursive Partitioning with Binary Outcome. It presents specification of the data structure for fitting tree-based models. Survival times $T$ are encoded as $(y_{i,1},\dots,y_{i,t_i-1},y_{i,t_i})=(\underbrace{0,\dots,0,1}_{t_i})$ if $...
I am now working on a problem To prove the convexity of a zero-one loss multiple with a convex function, and it looks like this: $$L(s) = s^2 \times \boldsymbol 1(s\leq 0);$$ when proving this convexity, is it ok to assume this $\boldsymbol 1(s\leq 0)$ a constant? if it is not ok to treat 1(s<=0) as constant, how would...
This is a followup analysis on this post, inspired by the comments from @EdM. I fitted a marginal rates model (Lin, Wei, Yang, & Ying, 2002) on recurrent event data but don't know how to include and then intepret the nonlinear effects of time-varying covariates. Here is a reproducible example: library(survival) library...
I am reading Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) section 3.4 Estimation [of basic regression models]. It presents specification of the data structure for expressing survival models as models with binary dependent variable. That makes them amenable to the widely available fitting routines for suc...
According to http://r-statistics.co/Beta-Regression-With-R.html, the topline remark is: Beta regression is used when you want to model Y that are probabilities themselves Grammar aside, one may assume that using the default specification, the beta-regression will provide log-odds ratios for response. But why should t...
Consider Gaussian white noise $\varepsilon_t$ with variance $\sigma^2$. Is the following stochastic process $$X_t = \varepsilon_t - t\varepsilon_{t-1}, \hspace{1cm} t \in \mathbb{Z},$$ a Gaussian process? I can show that this process is not stationary (don't know if it helps anything). As $\varepsilon_t$ is Gaussian I...
I'm confused about how to manually calculate SSE using R output. I'm thinking about using residual standard error and maybe the relationship between SSE, SSR and SSTO, but not sure what's next. My R output is attached below:
Let $X_1, X_2$ be independent (not necessarily identically distributed) random variables. Assume we have estimates for the means $m_1, m_2$ and confidence internals $\left[a_1, b_1\right],\left[a_2, b_2\right]$ i.e. $\mathbb{E}\left[X_1\right]=m_1, \mathbb{E}\left[X_2\right]=m_2, \mathbb{P}\left(X_1 \in\left[a_1, b_1\r...
Will be grateful for insights into the issue below! I have two explanatory GAMs below (in this example implemented with mgcv), where the effects of x1 and x2 are of interest. x1 is air temperature, x2 is the humidex (a composite of air temperature and humidity), time represents the number of the day in a 14-year time s...
Right now I am looking into analyzing the factors of crime in an economics paper. I currently have a multiple OLS regression set up that is pretty standard: Y = B0 + B1(Variable) + B2(Variable) + B3(Variable) + ... + u (error term) Here is a small sample of my dataset: However, this model seems very weak in terms of p...
Disclaimer: This is a long explanation but I feel like it was needed to give a thorough description of my problem. Let me know if this question is in the wrong place. I am relatively new to Bayesian modeling and I am trying to wrap my head around a particular regression approach using count data. I understand how to mo...
Given a binary confusion matrix with true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN), what are the formulas for sensitivity, specificity, and recall? I'm coming across many conflicting answers online. For instance, wikipedia says: But in a textbook — "Data Science for Business:...