instruction stringlengths 9 38.7k |
|---|
I am working on a research project that investigates the effect of land subsidence and flood risk on property prices. I have used the Spatial Autoregressive (SAR) model to estimate the direct, indirect, and total effects of these variables on property prices, but I am not sure how to interpret the results and calculate... |
Suppose a dataset I with 20 samples pairs of x and y collected from 20 different farms in State A.
Another dataset II with 20 samples pairs of x and y collected from 20 different farms in State A, B, C, and D.
In a hypothetical situation, x and y is significantly correlated in the dataset II, but not in x and y in data... |
I have been given a dataset to analyze looking at some herbicide treatments for invasive trees in three states with 3 sites in state 1, 2 sites in state 2, and 1 site in state 3. We hope to answer which of the 7 herbicide treatments differed significantly from the untreated control after one year post-treatment. There ... |
I haven't seen a situation like this. Both B1 and B2 are dummy variables. If I regress them separately, it's fine, but if I add an interaction term, all the coefficients are the same. I'm using statsmodels. Overlap between the two can't be too high otherwise I'd imagine singularity problems.
Any idea what may cause ... |
This is Ex.2.4 from The Elements of Statistical Learning.
I don’t understand the sentence that I underline in the image.
I know that $\sqrt{10}$ is approximately equal to 3.1, but I don’t know how to get it.
I write my thoughts in the below image:
This may be a silly problem. I need your help
Thank you!
|
My data is very zero inflated - even when carrying out previous filtering, such as getting rid of data that has very low counts and have values in more than 60% of samples.
However, the 0 values still pose a problem when trying to CLR transform prior to correlating this relative data to some clinical metadata parameter... |
I'm looking to solve, from the paper https://arxiv.org/pdf/2210.02176.pdf,
$$\min_{g\in VAR(p)} \sum_{z\in \mathcal{Z}} (f( h_{x}(z))-g(z))^2\pi_{x}(z)$$
where $\mathcal{Z}\in \\{0,1\\}^{N\times W}$ is the set of coalition matrices.
$\pi_{x}(z)$ is a Shapley kernel, $f$ is a prediction function, and $h_{x}(z)$ is a mas... |
Are there any methods to determine normality of data and then transform that data to normal distribution if it isn't normal?
The task has been set: It is necessary to conduct research via ANOVA and use Fisher criterion and for this data must have a normal distribution. My question is that if this data contains excess a... |
Suppose $x_i \sim f(\theta,\nu_i)$ and $y_i \sim g(\tau,\theta,\nu_i)$ and $\nu_i \sim N(0,\sigma)$. Importantly, $f$ is smooth in $\theta$, but $g$ is not.
We have data on $x_i$, $y_i$ and the goal is to estimate $A=(\tau,\theta,\sigma)$.
The marginal likelihoods are:
$$L_{x_i}(\theta,\sigma) = \int f(\theta,\nu_i) \ ... |
Scenario: We want to evaluate our recommender system, which recommends items to potential customers when visiting a product detail page.
Here are actual relevant items:
Customer 1: Item1, Item2
Customer 2: Item3, Item4, Item5, Item6, Item7
Customer 3: Item8
.....
Suppose the max number of actual relevant items per cus... |
I was recently trying to solve a marketing problem. For say 300 trial users, only 3 converted to paying subscribers. The conversion rate for this sample is obviously 1%. And almost as obvious, we cannot be confidence that the actual (e.g. population) conversion rate is anything close to 1% with just 3 positives.
We are... |
Apologies for the naive question, but I have a problem I would like to solve.
Suppose I have a two dimensional likelihood of the form
$L \propto \exp\{-\frac{1}{2}\} \begin{bmatrix}x & y\end{bmatrix}' C^{-1}(\theta) \begin{bmatrix}x & y\end{bmatrix}$,
where the covariance matrix depends on some parameter $\theta$.
I wo... |
I read an econometrics book which states one of the basic assumptions of regression is that
$$E(u|x) = 0$$
In another book however I see it written that
$$E(u_i|x_i) = 0$$
Are these two saying the same thing? More particularly, is it saying
$$E(U|X=?)$$
Or does it mean for observation $i^{th}$, the expected values of e... |
I am completing a study that gathers subjective, quantitative data on a 0-10 Likert scale from patients that have single-sided deafness, that is normal hearing in one ear and impaired hearing with a cochlear implant in the other. They are asked to listen to an audio clip and rank numerous qualities on the Likert scale;... |
My question is pretty straightforward and the task behind is related to binary classification. To add a new feature, do i first do train_test_split then add a new feature to each split (train and test)? Or should i just add the new feature to the whole dataset initially then proceed to train_test_split?
Originally, I ... |
I have about a year's worth of timestamps at which boxes exit a manufacturing production line. ti are the timestamps, where the first timestamp is t1, second timestamp is t2, etc. These can be anywhere from a few minutes apart to many hours apart. I would like to analyze the probability distribution for the number of b... |
In a cohort study, you take 500 people and tell them to smoke cigarettes and you take 500 people and tell them not to smoke cigarettes: you then wait to see how many people in the future get cancer in both groups. Here, you are actively conducting a study. Cohort studies are better because in theory you have more contr... |
I have participants who have taken an intervention and are being measured at two different time-points. It is expected that the intervention will improve their knowledge, attitude, confidence etc. and I have created a survey to measure this. I would like to conduct a factor analysis to test whether each of these differ... |
I have a time-series dataset that is poisson-distributed, where each day I get a new additional datapoint. If I input all the data into a HMM (I am using code I found from hmmlearn in python) it does a very good job at estimating the hidden (binary) states on the older historic data. Unfortunately it does a very poor j... |
I have a bunch of data where I am recording two variables across time for many subjects: velocity of the right hand, and intensity of the speech.
For each of my 20 subjects, I have ~30 recordings of ~1 minute each.
So, my data looks like this:
I can calculate the correlation between the velocity of the hand and the in... |
Assume there's a hidden Markov Model $\lambda=(\pi, \mathbf{A}, \mathbf{B})$, where $\pi$ is an initial distribution, $\mathbf{A}$ is a transition matrix and $\mathbf{B}$ is an emission matrix. Also, there is a reestimated model $\bar \lambda = (\bar \pi,\mathbf{\bar A}, \mathbf{\bar B})$. The idea of obtaining ML est... |
I would like to know how to calculate the probability that 2 discrete samples come from the same distribution, and if so, which one is the distribution they are coming from.
Let's say we have 3 buckets, and 2 years.
Bucket\year
2019
2020
A
76%
73%
B
20%
22%
C
4%
5%
I would like to claim that they both c... |
I'm working with a basic linear regression model, and I have a question about the specification of the predictor. Consider this basic regression model:
\begin{equation}
g_{i,t} = \alpha + \beta_1 \ln(h_{i,t}) + \beta_2 \Delta \ln(h_{i,t}) + u_{i,t}
\end{equation}
where $h_{i,t}$ is the stock of knowledge for the $i$-th... |
To comprehend the concept of confidence intervals, I came up with an example. I want to share it here for your better understanding what my question is all about.
Suppose, we want to figure out what is the average height in a town M. We randomly selected $n$ people and measured their height. We got a sample average $\b... |
Say I have results for a running event, where there is a cutoff time that is the same for all participants. I assume the results are normally or log-normally distributed, but truncated at the cutoff time.
To compare results across age or gender, I obviously can't use average or percentiles, as I only know the sample me... |
I have some problems when analyzing my time series dataset.
Basically, the dataset is about the daily sales volume of an FMCG company (they work from Monday to Saturday with Sunday being a day off, so the sales volume of Sunday will not be listed in the dataset).
When plotting the ACF of the dataset, I noticed some unu... |
The triplet loss is defined by Florian Schroff, Dmitry Kalenichenko, James Philbin in "FaceNet: A Unified Embedding for Face Recognition and Clustering" as
$$
\mathcal L = \sum_\mathcal T \max\left\{0,
\left\|f(x^a) - f(x^p) \right\|_2^2 -
\left\|f(x^a)-f(x^n)\right\|_2^2
+\alpha\right\}
$$
where $\mathcal T$ is a se... |
I have been given a dataset to analyze looking at some herbicide treatments for invasive trees in three states with 3 sites in state 1, 2 sites in state 2, and 1 site in state 3. We hope to answer which of the 7 herbicide treatments differed significantly from the untreated control after one year post-treatment. There ... |
I have a dependent continuos, but not normal variable y and want to know how much of the variance of y is explained by x_1 and x_2. Both x variables are nominal. The Levene test y~x_1+x_2 led to the result of homogenous variances.
What kind of analysis can i use to answer that question?
|
I have two different ROC curves for Model A and B. I wanted to calculate the DeLongs test to identify the statisical significance of the difference between the model.
model_A_tpr = [0, 0.2, 0.4, 0.6, 0.8, 1]
model_A_fpr = [0, 0.1, 0.2, 0.3, 0.4, 1]
model_B_tpr = [0, 0.3, 0.5, 0.7, 0.9, 1])
model_B_fpr = [0, 0.15, 0.25,... |
I came across a study design that I can't seem to find specific literature on:
Like most longitudinal studies, the subjects are re-measured at different time points
There is a binary outcome variable, collected at each time point, which asks if the subject did thing Y "since the study started"
covariates are being inv... |
I am trying to build a two way fixed effects model (entity-specific and time-specific fixed effects). However, when I run the fixed effects code in R, I get the following error message:
Error in solve.default(vcov(x)[names.coefs_wo_int, names.coefs_wo_int], :
system is computationally singular: reciprocal condition... |
This is information I believe to be true
A practical feature of hierarchical Bayesian models is that partial pooling reduces (eliminates?) the need of adjusting for multiple comparisons when comparing groups.
(http://www.stat.columbia.edu/~gelman/research/published/multiple2f.pdf)
Statistical rethinking 2nd ed page 4... |
I'm trying to run a model which has 3 random effects. Its data on an animal species and the random effects are 'group', 'mother' and 'individual'. Individual should be nested within mother, and then both are crossed within group separately, because both individuals and their mother can move to different groups independ... |
I would like to understand some intuitions behind the following causal graph/SCM.
Where as $X_1, X_2$ are expenditure on promotional activities.
My main interest lies in understanding the fact that even though people HAVE to visit the store to buy something(generate a store sales) $X_1, X_2$ can also have an effect di... |
I'm working on a recommendation system that's a bit different from ones I've built before. In particular, this system shows only the top item to the user, and the user can either click on it, dismiss it, or ignore it.
We have two datasets - one biased by a previous model, and one that randomly selects an item and shows... |
The recursive formula for (unmodified) Kneser Ney smoothing is (per Jurafsky08 3.40)
$P_{KN}(w_i | h) = \frac{\text{max}(c_{KN}(h\ w_i) - d, 0)}{\sum_v c_{KN}(h \ v )} + \lambda(h) P_{KN}(w_i | h)$
where $h := w_{i-n+1}^{i-1}$
and
$$c_{KN}(\cdot) = \begin{cases}
\text{count(•)} & \text{for the highest... |
I came across this article with an associated Python codebase.
In brief, there is a section "Understanding How Features Contribute to PCs
", where...
One method for understanding which features are ‘important’ is to examine how each feature contributes to each principal component. To do this, we can take the dot produ... |
I was using nn.LayerNorm from Pytorch to normalize my dataset. I tested on a tensor of two points but surprisingly found that my output is almost always the same. Going off the equation of normalization, I find that the standard deviation cancels out the mean, and I am left with only 1 or -1. How can I ensure that no i... |
I'm trying to build a model that predicts whether an email recipient will click on a link inside an email. As input, it takes member-related email click/open/unsubscribe history, as well as that member's history of engagement with similar links.
The key part in my mind is that a member must open the email to even have ... |
I am modeling body mass (y var) according to indices of dysregulation for different physiologic systems (x vars). I did a likelihood ratio test, which supported using a linear mixed model, with a random effect of individual, over a simple linear model.
library(lme4)
require(RLRsim)
mod1 <- lm(mass_kg_zscore ~ metabolic... |
I'm reading a FED paper on forecast uncertainty estimation. Here's the link
One of their methods to estimate forecast interval is illustrated in the following figure
According to the description: "Uncertainty bands equal median SEP forecasts plus or minus average historical root mean squared prediction errors for each... |
I am working on a project that uses training data selection techniques; it involves sampling the training set in some smart way rather than sampling randomly. The goal is to compare different data selection techniques on the accuracies of the downstream tasks; this requires sampling many datasets.
Suppose I have a larg... |
Background
I'll confess, I like Richard McElreath's lectures so much that I've been watching his backlog of lectures (even though I've already seen all of the recent lectures of the same course).
In Statistical Rethinking - Lecture 15 of Statistical Rethinking 2015, he says:
Ranks I'm not going to have time to talk ... |
If we encounter an integral of the form:
$I=\int\limits_0^t X(s)y(s)ds$, where $X(s)$ is a stochastic (variable or process) and $y(s)$ is a deterministic function, say $e^{as}$. I want to know under what conditions can we pull out the $X(s)$ outside the integral and write the solution as:
$I=X(s) \frac{[e^{at}-e^0]}{a}... |
I'm having some trouble thinking through the implementation of difference-in-differences / if DD is the best approach to use when I am comparing two groups who are both treated, but which I hypothesize are affected differently by a particular policy.
I am studying the impacts of a particular educational policy (the "tr... |
I'm keen to know how to compute the variance explained by a particular predictor variable in the model (say component specific R squared). I went through Calculate variance explained by each predictor in multiple regression using R but I'm not clear about the explanation.
For simplicity, let me give an example and rais... |
I have these pair of numbers
$ (a, b) = (\frac{4}{9}, \frac{1}{9}) $ and $(c, d) = (\frac{1}{2}, \frac{1}{6}) $.
Note that - (a, b) are pair of numbers which represent $((E(e_1))^2, (E(e_2))^2) $ and (c, d) are pair for $((E(e_1^2)), (E(e_2^2))) $
Where, E is the expectation.
Clearly, c>a and d>b (by convexity) and ano... |
I have a dataset with 1000 observations and two features that define those N=1000 data points. Hence it is 1000*2 input matrix. I need to cluster them into k clusters.
I am not understanding the E-M algorithm clearly.
How to take prior weights (whose sum should be 1, for all gaussian distributions for every data point... |
I am working on a Bayesian model using the brm function from the brms package in R, and I am interested in comparing mean responses of different groups. Specifically, I would like to calculate the mean ratios of responses, along with their 95% confidence intervals. I know how to calculate the odds ratios and mean diffe... |
Consider 3 random variables $X$, $Y$, $Z$. Suppose:
$E(X)=0$
$E(X|Y) =0$
$Z\perp Y $
Does this imply $E(X|Y,Z) = E(X|Z)$?
|
I want to study which factors have an effect on the hormone PTH. PTH is used as a dichotome variable and is our outcome variable, the dependent variable.
We're using generalized linear mixed models in SPSS. If we study the effect of one factor on PTH, we obtain a different p-value than when we use multiple factors at ... |
Introduction. I post here the same question that I asked on math.stackexchange, since it might be more relevant to this forum: Could it make sense to calculate the "distance correlation" among two probability measures (probability distributions)?.
Question. Would it make sense to calculate the "distance correlation" in... |
I am performing an univariate linear regression analysis. Before running the model I was always told to get an idea of the relationship between the independent and dependent variable through a scatterplot and look for a pattern.
I always do that but without understand the real consequences on my regression analysis.
Wh... |
I am new to data analysis and I have been given a task to compare safety of trams compared to buses. Since there are far more buses than trams, I was introduced to the concept of normalisation by passenger km, which can allow the comparison to happen in an accurate way.
Personally, I tried googling this but could not f... |
I am doing a regression of the effects of sanctions on gdp:
Baseline <- lm(log(GDP) ~ EU + UN + Resources + PTS + PolityV + Schooling + Trade + Mortality + factor(Country) + factor(Year), data = RegressionData)
When writing about the OLS assumptions i realized that, as far as I understand it, in Introductory economics... |
Suppose I have data consisting of three layers. Layer $i$ consists of $n_i$ 2D points, $i=1,2,3$. Here $n_1$, $n_2$ and $n_3$ may be different. I would like to somehow apply the Principal Component Analysis (PCA) to project this data to one 2D point. Is there any way of doing that?
My knowledge is that one usually proj... |
I have a mean and 5th percentile value from river flow data that are assumed to follow a log-normal distribution. From these, I need to calculate the the mean and SD of the underlying normal distribution.
I know how to do this with the mean and SD of the lognormal distribution by using the method of moments:
# 'lg_' pr... |
Let $m(t) =E[X^t].$ The moment bound states that for a > 0, $$P\{ X \geq a \}\leq m(t)a^{-t} \forall t > 0 .$$ How would you prove this result using importance sampling identity?
My answer:
The importance sampling identity states that for any measurable function $f$ and random variable $X$ with probability density f... |
I have a dataset like this:
All these social determinants are binary variable. How can I find the correlation among them? By chisq.test? Since I have 11 variables and it will be 55 pairs. Is there any convenient way to do so?
R code, function, logic
|
A couple of my covariates remained imbalanced after full matching. Is it acceptable to include those imbalanced covariates in the post-matching regression analysis (in addition to the matching weights)? or could this introduce bias?
The alternative would be to conduct genetic matching (where all covariates were balance... |
I have a question about what statistical tests I can do in R that would be most suited to analyse my enzymatic assay results.
My data
Dependent variable: Absorbance (its’ a colorimetric assay)
Factor 1: Protein (type of protein, wt and several mutants)
Factor 2: Substrate (several substrates)
For each assay, (e.g. Prot... |
I am working on a measurement system which tries to measure the distance between two values i.e $\Delta F=F_1-F_2$. Where $F_1, F_2$ are the values I actually measure. I have set up a Monte Carlo simulation to calculate the error I expect when making this measurement under different noise conditions. I wanted to compar... |
I am interested in computing the following expected value: $E[yz]$, with $z$ taking values 0 or 1 so that $E[z]=Pr(Z=1)\equiv p$. The random variable $y$ is continuous and in general correlated with $z$.
From some prior lecture notes, I have that the following should hold:
$$E[yz] = E[y|z=1]p$$
I am sure this is trivia... |
I have data from an intervention study on math learning. Participants were assigned to four treatment conditions in a 2*2 between-participants design. Participants were tested before the intervention (pretest), during the intervention (practice), and twice after the intervention (immediate and delayed posttest).
Edit: ... |
Hey I'm taking a deeper dive into logistic regression. Specifically the following loss function with L2 regularization,
$$l(w)=\frac{1}{n}\sum_n \log(1+\exp(-y_i \cdot x_i^Tw))+\frac{\lambda}{2}||w||^2$$
Where $y_i$ is a binary label, x and w have the same shape
After laboriously working things out, I got a Lipschitz c... |
I am working on creating a QA program to measure the quality of translated documents. Each sentence in a document is evaluated and given a score based on the type of error in the sentence, with the type of errors being weighted. The document is scored based on the scores from each sentence. Thus a document with one sen... |
I have split my dataset into k equally sized folds for cross-validation. However, I want to perform some additional sampling operations on the training set within each fold and this might make the folds’ size differ from each other.
Suppose I have an imbalanced dataset. I split this data into k equally sized folds for ... |
If I have two binary predictors and a binary response how can we calculate the effect size of the interaction term. I use logistic regression from statsmodels package in python.
Will it be ratio of odds ratio (ORR)?
Can I use ORR also for effect size of other interactions like binary-quantitative, binary-ordinal, binar... |
If a pair of integrated time series $\{X_t\}$ and $\{Y_t\}$ are cointegrated, at least one of them must Granger-cause the other. Is the converse also true? I guess not, but I am struggling to come up with a counterexample. Could you help me?
|
I have a dataset with multiple rows per individual. Each row represents the number of items sold by an employee on a given day. Suppose I have thousands of employees, and each of them has roughly five records each. Likewise, all employees are assigned to a branch (i.e., branches group multiple employees).
For example, ... |
I'm using two quasibinomial models. In the first model, the dependent variable is the proportion x of successes in experiment A. In the second model, the dependent variable is the proportion y of successes in experiment B. Both models have the same variable of interest and the same nuisance variables as independent var... |
I am running an auto arima on a datase that yields two tries as revealed by using trace=TRUE as:
arima <- auto.arima(
series,
max.p = 2,
max.q = 1,
max.d = 1,
seasonal = FALSE, ic = "aicc", stepwise = FALSE,
lambda = 0.6153823,
allowdrift = TRUE,
trace=TRUE
)
I get;
ARIMA(0,1,0) ... |
Say I have two samples of observations, S1 and S2, which can be of unequal sizes. For each observation, I have two variables: G (a categorical group assignment, say it is binary with values A/B), and a numeric variable X. I would like to formulate a statistical comparison of some sort (either p-values or effect size)... |
I am currently trying to estimate the cross-entropy between two distributions with densities $p$ and $q$.
$$
\ell = -\mathbb{E}_{x\sim p(x) }[\log q(x)]
$$
I am using a Monte-Carlo estimate:
$$
\hat{\ell} = -\frac{1}{n}\sum^{n}_{i=1}\log p(x_{i})
$$
Is there a standard way to devise a concentration inequality for this ... |
the issue that (I think) I have is that I have 2 variables A and B that have some correlation. I want to use A for an analysis but ideally I would have a variable that is not correlated with B.
I know that I can use PCA two get two uncorrelated variables. However each of these two is very likely to have some correlatio... |
I have a series which I am trying to model through ARIMA approach. However, when checking the residuals, there appears to be a change in variance at a specific point. This is, given the residuals $e_t$, then
$$
\text{Var}(e_t) = \begin{cases}
\sigma_1^2 \quad\text{if } t<t_0 \\
\sigma_2^2 \quad\text{if } t\geq t_0
\end... |
I have time-series data $\{Z_{[t]}\} = Z_t, Z_{t-1}, ..., Z_1$ of length $L$, and I would like to estimate a model for the $\{Z_{[t]}\}$ so I can forecast $Z_{t+1}$ as a function of a number of its past values.
$$
Z_{t+1} = \sum_{i = 0}^t \phi_{t-i}Z_{t-1} + \epsilon \quad \quad [1]
$$
where $\epsilon$ has a distributi... |
I ran the following time-varying covariate cox model:
model_int <- survival::coxph(Surv(tstart, tstop, status) ~ nat + dist +
sex + sf + popDens + medInc +
popDens*nat + popDens*dist + popDens*medInc,
data = model_df)
and I g... |
Are there any issues with only including a subset of the population in the paired samples? For instance let's say that we are comparing pain scores (ordinal values 0,1,2,3,4,5) before and after initiating treatment. The treatment is only administered to patients with an initial pain score of 4 or 5. Is it ok to run a W... |
Question. If there is a one to one correspondence between a "borel probability measure" on the line $\mathbb{R}$ and a "cumulative distribution function" (CDF) (please see on page 13, "Theorem 1.2. (Lebesgue)", in S.R.S.Varadhan(2001), Probability Theory), is there, as well, a one to one correspondence between the "den... |
I am contemplating the appropriate percent train-test split (e.g. 90%-10%, 80%-20%)
Note I am asking about model evaluation, not cross validation/model building. This is for creating a hold out set to evaluate predictive performance. I'm aware this is difficult in small samples.
I wish to measure how well a model is pe... |
Introduction. The cosine similarity is often calculated among two vectors, i.e. $C_S(X,Y)$:
\begin{equation}
C_S(X,Y) = \frac{\sum_{i=1}^{n}(X_i,Y_i)}{\sqrt{\sum_{i=1}^{n}X_{i}^{2} \sum_{i=1}^{n}Y_{i}^{2}}}
\end{equation}
Question. Would it make sense to calculate the cosine similarity between two probability measures,... |
I have X, Y, and Z all as binary variables, values either 0 or 1. Y and Z are and got values of P(Y =
1), P(Z = 1), P(X = 1|Y = 1, Z = 1) , P(X = 1|Y = 1, Z = 0) and P(X = 1|Y = 0). here I need to compute P(X = 1)
I learned here I need to apply the concepts of law of total probability, conditional probability, and joi... |
I am trying to calculate the 95% confidence interval for a 10-point increase in a continuous independent variable in a logistic regression. For a 1-point increase, the 95% CI would be exp(1beta +/- 1.96SE). For a 10-point increase in the independent variable, would the 95% CI be exp(10beta +/- 1.96SE) or would it be e... |
I am using a random forest regression model to make predictions and leave one out cross validation for my prediction task. I am having a difficult time understanding why my R2 score is negative when the MSE, RMSE, and MAE are all very low. Here I am providing a sample of my true and predicted values:
True Value: 0.0511... |
In Efron & Tibshirani 1993. Introduction to the Bootstrap. Chapman-Hall/CRC, Chapter 12, the authors discuss Bootstrap-t confidence intervals. They state that "bootstrap-t confidence intervals work better for variance stabilized parameters", and describe an algorithm to implement this notion.
They ask, in exercise 12.5... |
I am new to survival analysis and I was wondering whether you could, similar to the logistic regression, calculate the intercept and the risk probability with the coefficients you acquire from the cox regression? And how you could do so within R.
|
The coxph() function in R package "survival" is used to fit the Cox proportional hazards model. This function allows a ridge() term in the formula to penalise selected terms, which requires the user to specify theta. What is the recommended way to chose the value of theta? Perhaps cross-validation?
|
I'm trying to model a data of presence and absence of birds in nest boxes. I look whether it's zero-inflated and it gave me this:
Observed zeros: 36
Predicted zeros: 40
Ratio: 1.11
Is it really worth to make a negative binomial GAM for it? And if yes, what theta should I used or how can I find it out? Th... |
I was reading Zhang and Wang 2023 and I have some doubts regarding it. The realized Stochastic Volatility Model is expressed as follows:
$$\begin{matrix}
y_t = \exp \big( \frac{h_t}{2} \big) \epsilon_t \quad \quad \quad
& & & \epsilon_t\sim \text{N}(0,1), \\[12pt]
z_t = \varsigma+h_t+u_t \quad \quad \ \ \
& & & \ \ u_... |
Another issue is that dataset with more labels in groups, they have less deviation intra groups vs inter groups. So I could take the means of them (the 'second' index), or the whole label means (the 'first' index). Here are examples with randomly generated values (so they don't show any correlations). Here is what a la... |
Let's say you have a dataset with variables A,B,C,D,E, and you want to build two model to predict D,E.
In this case, can we use A,B,C in one model to predict D and A,B,D as dependent variables in another model to predict E?
|
I am trying to fit a Bayesian linear regression model on a data set of $3$ years. I have used both pymc and pytorch libraries and the NUTS sampler for sampling.
The dependent variable is Sales, and the independent variables are Media_1 spends, Media_2 spends, Media_3 spends, Competition_1 spends, Competition_2 spends, ... |
I am running measurement invariance in Lavaan using a 7 item ordinal scale. I have been using Lavaan and semTools, and specifically the measEq.syntax command, due to the fact it easily implements Wu and Estrabrook methodology. For demonstration purposes, assume the single factor is V and the item to be released is V1.
... |
I am trying to find a statistically sound way of analyzing my time series data. The data and questions are pretty simple:
Experiment setup
I have an estimate of the rate at which a crustacean consumed (i.e., grazed) a particular seaweed species. I started the experiment with 6 treatment units (seaweed + crustacean) and... |
I am trying to learn more about the difference between risk vs odds (e.g. relative risk, odds ratio). Since English is not my first language, these words have identical meanings to me:
Smokers have higher odds of developing cancer compared (relative) to non-smokers
Smokers have a higher risk of developing cancer compa... |
I used T test paired two samples for mean for comparing 2 groups of data (pre and post in the same population) and got this results. What does it mean. I am trying to figure out if the 2 data samples are different, statistically significant
|
I have a question about specifying a mixed model with crossed data across multiple levels. Consider the following situation:
Let’s say I collected data on Americans’ perceptions about the importance of 85 discrete and well-validated managerial skills at four different points in time (Wave 1, Wave 2, Wave 3, Wave 4). In... |
Suppose I have built a complicated non-linear regression model where the dependent variable is y and the independent variables are x1, x2 and x3. In that case, how can I answer the question
if I change the x3 variable by x%, what will be the change in the dependent variable y?
Here the independent variable x3 has a non... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.