instruction stringlengths 9 38.7k |
|---|
In this proof of the Glivenko-Cantelli theorem, page 2 of these notes, two types of symmetrization are used. The first transforms the sup of the centered empirical cdf $$P(\sup_{z\in\mathbb{R}}|(1/n)\sum_{i=1}^n(I(Z_i\le z)-P(Z\le z))|>\epsilon)$$ into a sup involving a ghost copy $$P(\sup_{z\in\mathbb{R}}|(1/n)\sum_{i... |
I want to clustering algorithm to the below image in jupyter platform. I'm trying to learn on my own. I do know how to implement the code but I don't know how to take the below image as an input dataset.
|
Setting:
Let $X$ be a random variable. Define $\mu = \mathbb{E}[X]$ and
$$ \Sigma = \begin{bmatrix} \mathbb{V}(X) & Cov(X,X^2) \\ Cov(X,X^2) & \mathbb{V}(X^2) \end{bmatrix} $$
Suppose that $\mathbb{V}(X) \ge \delta$ for some $\delta > 0$. Now consider the following function:
$$ H = \begin{bmatrix} 2\mu & 1 \end{bmatrix... |
I want to know the fraction of bananas which are ripe at some moment in time.
If I have 100 bananas, and 25 of them are ripe, then my rate is 25%. But if I want error bars on this so I can generalize – would I use N=100 and say "25 ± 10 bananas are ripe" (25±10%) or would I use N=25 and say "25 ± 5 bananas are ripe" (2... |
why I am getting TP and FP in confusion matrix is 0, how to get it right?
tp = 0,fp = 0,tn = 9847,fn = 18
|
Let's $X_1, X_2, ..., X_n$, $n=1,2,...$ are independent discrete random variables.
It is necessary to find the distribution law of the their sum:
$p(k) =P(X_1 + X_2 + ... + X_n = k), k=0, 1, 2, ... $
I solved the problem case $n=3$ when random variables take the same values $x=\{0,1,2\}$ and probabilities $p =\{0.85,... |
Trying to construct a synthetic control and I've chosen a set of covariates that are correlated with my outcome variable and significant for P>|t| using OLS. Is choosing covariates for synthetic control the same as you might for a multiple regression? Or can I pick covariates even if they are not significant?
|
I want to run linear models to understand the effect of single predictors on an outcome. This is quite straightforward, but I am facing a situation where my residuals appear to be bimodal.
I can't find a way to deal with this. Am I interpreting this right? What should be my next course of action?
|
I have prices of different food items for three time periods (2011, 2015 and 2018) at the household level. So I have a panel with 3 time periods and around 5000 households. I want to see the impact of food item prices on their consumption by running a regression. I have deflated the price data using the CPI. As I am wo... |
I know that there are a lot of methods to find the confidence intervals for binomial proportions using methods like Agresti-Coull, but is there any important papers mentioning to find confidence intervals for multinomial case?
|
I have a hierarchical prior with the probabilistic model as
$$p(Y,H,Z|G)=p(Y|H,Z)p(H|Z,G)p(Z|G)$$
and I was wondering if MAP estimation for H and Z together is possible here by maximizing the log probabilities? (all distributions in the RHS are known and Y and G are measured)
I feel it is possible as we can consider [H... |
I have just created my first mediation model using sem() with the lavaan package in R. I am using a bootstrapping with 5000 resamples and BCA to calculate the confidence intervals at a 0.9 level.
Now, while researching the web for the right procedure, some practioners added covariances between the mediators into the SE... |
I'm trying to understand the ggsurvplot and I stumble about how to interpret the number of censors, like here:
why is it 0 at the start and max = 2 halfway through and at the end?
|
I have some simulated data and I want to test whether "group" has an effect. The data are from a Weibull distribution. because the data are simulated, I can determine sample size, however this also leads to problems with significance tests.
I am wanting to perform a simulation based (resampling/bootstrap) for multiple ... |
I am wondering if it is suitable to make 1-step ahead forecast with independent variables of different lags?
Suppose that in practice, one wants to forecast the 1-step head (i.e. 1 month) value of targeted variable, and some relevant independent variables are incorporated. For example, on the last day of 2010:M3 (i.e. ... |
I want to carry out a study but I don’t know which statistical method to use for analysing the results.
I have two buildings (say, houses A and B) and I keep daily records of some quantitative variable Y on both houses. I want to apply a treatment or intervention in house B and see if it has a meaningful effect over Y,... |
I have a process which checks workers in a service once a day. When it checks them, they will have one of a few states:
Unknown - Either brand new or the worker is offline
Inprogress - When checked, an operation was blocking the machine
Error - Something went wrong
Complete - everything is perfect
CorrectionWasRequir... |
I am trying to wrap my head around some of the principles of Machine Learning, and in particular:
Why separate test and validation sets?
The error rate estimate of the final model on validation data will be
biased (smaller than the true error rate) since the validation set is
used to select the final model After asses... |
I am interested in comparing ranked lists in order to find elements that are differently ranked. Suppose we have 10 lists, each ranked (and for simplicity assuming the elements overlap and only the ranking was different). What method could I apply to find elements with high ranks in list1 that consistently have low(er)... |
I'm working with GAM and I'm testing different models with and without certain variables, and I need to set k-values for the different smoothers. Do I need to use the exact same k-values prior to testing the models, and if so does the results from gam.check() for all the models have non-significant p-values? Or can the... |
Say I have a dataset such as the one below. We have several subjects (id). For each subject we have one outcome of interest (out). We want to see if we are able to predict this outcome based on the values of one predictor (var). Per individual, we have several values of var, and they are blocked into different time per... |
In Gelman's "Bayesian Data Analysis" question 1.5a), we are asked to estimate the probability of a tie in an election. The question:
Probability assignment: the 435 U.S. Congressmembers are elected to two-year terms; the number of voters in an individual congressional election varies from about 50,000 to 350,000 . We w... |
Consider the following density, the mixture of two Gaussian distributions,
\begin{align*}
p(x)= p(k=1) N(x|\mu_1,\sigma^2_1) + p(k=0) N(x|\mu_0,\sigma^2_0) ,
\end{align*}
where $p(k=1)+p(k=0)=\pi_1+\pi_0=1$ and $N(x|\mu,\sigma^2)$ is the density of Gaussian distribution with mean $\mu$ and variance $\sigma^2$.
Paramete... |
I have a question about how I should organize my data before doing some statistical analyses.
In my data, I have a sample of rats for which the level of tear stains and body lesions is measured. They are both scored on a scale from 0 to 2. For these I would like to make a Spearman correlation test to see if the two var... |
I want to compare data between 2 independent groups to determine whether there is a significant difference between the groups. 1 group has 8 data points, and the other has 9. Separately, I would like to compare data between 2 more independent groups, in which 1 group has 8 data points and the other has 43.
According to... |
I have data about ratings from 5 sessions, it appears that initially ratings are random, and with experience, they become more 'defined', settling into a pattern (see graph below). How can I test this intuition?
|
I am using SHAP values in a model explainability analysis and I am seeing a pattern of results where the SHAP values are clearly pointing in a positive or negative direction for most features, i.e. feature values are highly correlated with SHAP values. I interpret this as evidence of directional relationships between f... |
I'm reading John Kruschke's Doing Bayesian Data Analysis, and in Chapter 11, he discusses multiple hypothesis testing. He mentions the following:
Suppose we want to the hypothesis of fairness for a coin, and we have a second coin in the same experiment that we are also testing for fairness. In real biological research... |
How do we compare the fit of the two models given that the explanatory variables are the same, except the response variable is different? (the response predicts an equivalent thing). We were told that we cannot use the change in deviance of the regression to compare the two models, though they didn't want to explain wh... |
I am trying to estimate the probability that an entity goes from state $A$ to either state $B$, $C$, or $D$. The probability should be dependent on how long the entity has been in state $A$.
My data has no censoring in that the entity must go to either state $B$, $C$, or $D$ and the transition times are precisely know... |
I have the following model of creating a random graph on the circle:
First, N nodes are uniformly distributed on the circle of radius $N/(2\pi)$ to give a node density of $1$. We sample the expected degree of each node, $\kappa$, from a Pareto distribution and denote $\overline{\kappa}$ to be the expectation of this di... |
I am doing a multiclass text classification problem. My data consists of tweets. I tried many variations of deep learning models (ex: LSTM, GRU and pre-trained word embeddings) and I also tried linear SVM. I applied 2-gram TF-IDF to the data before I feed it to the SVM.
The results are very similar but the linear SVM w... |
I am comparing the % of minorities from my organization to a population % of minorities, to see if it is high or low. I have data for my whole organization (not a sample) so I do not show CIs. The “population” data is a sample and thus has CIs. For example, see the below (hypothetical) data.
Question #1: if my organiz... |
I am using Stata with a simple dataset to do very basic regressions and comparing with SPSS to see if the results are the same, but they're not. I'm close, the significance are slightly the same, while the magnitudes of the betas are completely different. The data was copy and pasted into each from an Excel.
can anyon... |
I'm having trouble interpreting my ARIMA results and would like to know what I can do to improve the model.
I am working with a crime data set with 7740 entries collected over 21 years which I've structured as daily aggregates:
My p,d,q values are 6, 1, and 7.
p and q come from (Using First Order Differencing on data... |
I have the following 3 data sets for the same quantity with errors as shown in the figure in different colors. How to find the best fit function of 1) each data set separately 2) combined of the 3 data set.
Suppose I find the best fit function of each data set separately; then how to combine the three best-fit function... |
I am planning to conduct a A/B test with data obtained through a deep learning algorithm. Say, I got a binary classification dataset through machine learning with about 100k rows classified into yes, or no. But, the accuracy of prediction in the classification process was 90%, which may mean that there are still falsel... |
Consider the following data:
20 +- 2, 25+-1, 30+- 3, 40+-1
If I have to find the average error, I can follow two methods:
(2 + 1 + 3 + 1)/4 = 1.75
Sqrt (4 + 1+ 9 + 1 )= 3.9
Since, (20 + 25 + 30 + 40) = 115/4
So the final answer is:
115/4 +- 1.75 OR 115/4 +- 3.9.
Which method is correct? Any views, please?
|
I am running a nested statistical analysis of variance on a field study I preformed. Unfortunately due to the conditions of the field it is non-orthogonal nested design where the number of sub-factors are not even across across main factors. Currently the design is set up where Site is nested with habitat and habitat ... |
I am having a hard time doing follow-up (post-hoc) comparisons for a 3-way interaction of 2 numeric predictors and one factor in a linear mixed model. It’s a longitudinal study where we have patients which either receive no treatment, treatment A, or treatment B (factor “group”). We measure patients at baseline, after ... |
I'm working on University Enrollment dataset and trying to predict whether an individual who is admitted will enroll or not. One of the variables in it is the scholarship test. This variable has the scholarship test score in it as well as missing values. I understand from the data that the missing values in this partic... |
I have a multiple linear regression I have completed below:
MLR_1 = lm(SB_xlsx9$charges ~ SB_xlsx9$age + SB_xlsx9$sex + SB_xlsx9$dzclass + SB_xlsx9$num.co + SB_xlsx9$sps)
summary(MLR_1)
##
## Call:
## lm(formula = SB_xlsx9$charges ~ SB_xlsx9$age + SB_xlsx9$sex +
## SB_xlsx9$dzclass + SB_xlsx9$num.co + SB_xlsx9$sp... |
In causal inference, one generally learns a Markov equivalence class of causal graphs when trying to reconstruct causal structure from data. This is known as a maximal ancestral graph (MAG).
I am wondering if there is an algorithm, or study/paper that shows how to construct a MAG given a DAG. In this study, the followi... |
Suppose I have a strictly positive parameter $\sigma$ and I need to estimate it using the random walk Metropolis-Hasting algorithm.
I know that I can do a parameter transform, i.e., $\beta=log(\sigma)$ and estimate $\beta$ instead. It is more convenient for me to assume that the prior for $\beta$ follows a normal distr... |
I feel like I might be missing something dumb, but in a set of non-negative numbers, is it possible for the mean to be less than half of the median?
Example: there are 999 numbers and we are told that the median is 10. This means that the sum of the numbers cannot be any less than 5,000. The configuration to achieve th... |
I would like to use some tool to detect spike in one class's proportion.
Assume I received roughly the same percentage of red, blue and yellow candies throughout time. That means the absolute number can go up and down for each type of candy but the percentage for each candy will stay roughly the same. For example, it c... |
I was working on a random forest model in R and I got a ROC curve that looks like this. This is very odd since there is no curvature. The data does have mostly qualitative features with only 2-3 quantitative features. The data is also mostly one class (i.e. 80% of my data is in one class and 20% in the second class). I... |
Suppose you have some function $f(x)$ which represents the mean value of an experiment related to $x$. Then $\epsilon = \sigma(x)/\sqrt{n}$ is the error associated with each point $x$. Assuming that each experiment considers the same number of samples $n$ and $\sigma(x)$ is the standard deviation of each experiment, w... |
Suppose I have the following model linear regression model:
$y = \beta_0 + x_1i\beta_1 + x_2i\beta_2 + e_i$ with $e_i \sim Pareto(k,\alpha)$
Now if $1< \alpha < 2$, I would suppose that the second moment of my parameters $\beta_i$ does not exist? With every observation I add the moment would jump around and never settl... |
I want to estimate the parameters for the distribution of the following data:
25 17 16 17 16 16 17 16 16 17 16 17 16 60 13 17 31 16 17 17 16 42 16 17 19 17 16 17 17 17
63 47 27 27 74 79 23 30 66 42 30 15 20 20 21 22 22 19 21 21 19 20 18 21 22 19 21 20 22 20
21 18 20 20 20 23 21 29 22 22 20 50 28 20 20 28
so that i can... |
I see that we have a concept called expected value being used in machine learning (ML) models. For example, SHAP has a concept called Expected value. It means when all input features are 0, we can consider model to output the expected value (baseline value).
Similarly, in linear regression, we have a term called interc... |
I am trying to analyze the historical result of golf. Golf is a game where the score you get depends not only on your skill but also on environmental factor such as weather and how easy/hard the course itself. I am trying to isolate the skill factor from the environmental factor. I have a question with a hypothetical g... |
Given two random variables x and y. Their PDFs P(x) and P(y) are known. However, if we do not assume the independence between x and y, how can we represent the Cumulative Distribution Function F(xy) (yes, x multiplied by y).
I am not familiar with probability theory, and I have attempted to write some double integral b... |
$x$, $y$ are two random variables. Given density functions $P(x)$ and $P(y)$, can we represent the joint probability density function $P(x,y)$? if not, what are the key conditions we require to derive $P(x,y)$?
I am not familiar with probability theory, forgive me if I asked a dumb question and it is highly appreciated... |
Let $X_{1}$ and $X_{2}$ be two independent and identically distributed random variables with the probability mass function as :
$f(x) = \begin{cases}
\left ( \frac{1}{2} \right )^x & \text{ if } x=1,2,... \\
0 & \text{ otherwise }
\end{cases}$
Then, We are required to compute $P(min\left \{ X_{1}, X_{2}\right \} \ge... |
In paper "A simple yet effective baseline for non-attributed graph classification" (https://arxiv.org/pdf/1811.03508.pdf) authors use empirical distribution for feature binning. Precisely, they have 5 features, and for each feature:
We aggregate features over different nodes in the same graph by performing either a hi... |
For a Gaussian process I run I have chosen to use the Matern52 covariance function, as from research this is practical to use for physical data as it does not overally smooth the function. However is there a numerical way to prove this suits my data?
What would be the benefits of using Matern32 or Matern52, as I am qui... |
I know that this question was already posed several times but I am not sure If I really got the interpretation for spline functions right.
I have an ordered model that is regressed on an index ranging from ca. 0.028 to 0.42 for which I created a natural spline with splines::ns(X, 3).
Below you can see an example from t... |
I am a mathematician and I am not an expert in statistics but I really would like to learn. I explain my problem.
There is an industry with several employes. Each of them can choose one between three possible options: A, B, C. I would like to understand which variables between sex, age, being a manager or not influence... |
I have trained a feedforward neural network with 12 input features of longitudinal (time-series) data. The data is one-dimensional but it is observed at 12 evenly spaced time points. How can I classify a sample with less observations than 12 observations, for example, only 8 observations using my trained neural network... |
I have almost no experience with math or stat, but I am trying to run an Adaptive LASSO on a continuous outcome with around 200 cases and a list of around 19 variables. Some of these variables have 3 categories. My questions are:
Is the sample large enough to use an adaptive lasso?
Do I necessarily have to have the tr... |
I did a Wilcoxon signed rank test to understand whether there is a difference in average sales in 9 different counties. There are multiple pairs of counties that are significantly different.
Would it be fair in this case to say that p-values are representative of the effect size? i.e.: the pair with the lowest p-value ... |
Analysis Goal: Identify features that provide an accurate prediction of a binary outcome and also explain how the features are related to the output
Data: 72 features and 200 instances.
Process: Sampled 70% of the data with a random seed and trained an XGBoost model. With different random seeds, variable importance an... |
I have this data frame (reproducible):
structure(list(age = c(62.84998, 60.33899, 52.74698, 42.38498,
79.88495, 93.01599, 62.37097, 86.83899, 85.65594, 42.25897),
death = c(0, 1, 1, 1, 0, 1, 1, 1, 1, 1), sex = c("male",
"female", "female", "female", "female", "male", "male", "male",
"male", "female"... |
When I read some articles that used logistic regression, many of them report OR values (usually adjusted ones) plus the "p for trend."
Usually, "p for trend" is put when presenting a set of OR's related to dummy variables concerning an ordinal variable. For example: if y (0 / 1) is predicted using various IV's includin... |
Question: How to construct standard errors and test statistics for a ratio of regression coefficients?
Background: I am running the same regression on two related outcomes
$$
Y_1 = \alpha_1 + \theta_1 X_1 + \beta 'X +\epsilon_1
$$
$$
Y_2 = \alpha_1 + \theta_2 X_1 + \beta 'X +\epsilon_2
$$ (where $\epsilon_1, \epsil... |
I try to learn prediction intervals for normal distribution , so i found this wikipedia source. Everything was okey until i came to the case where the population mean is known but population variance is unknown. It is said that
Solving for ${\displaystyle X_{n+1}}$ gives the prediction distribution ${\displaystyle sT^... |
I'm studying Linear Models again, after finishing my degree some years ago. I found in my old notes that, according to my professor, one can check multicollinearity calculating the determinant of the sample correlation matrix of the variables $X_1,\ldots,X_p$. If it is close to 0, there is a problem of multicollinearit... |
I'm trying to deduce from samples of observations from two finite sets of random variables $X_{1}, ..., X_{n}$ and $Y_{1}, ..., Y_{m}$ that the expected values of the average of those random variables are not the same. Let's denote $\frac{1}{n}\sum\limits_{i=1}^{n}{X_{i}}$ and $\frac{1}{m}\sum\limits_{i=1}^{m}{Y_{i}}$,... |
I am using the glmnet package to perform logistic regression on a dataset.
The x.train and x.test data is a simple dataset of numbers.
y.train and y.test is data with categories "Coffee" and "Tea".
Basically the prediction needs to be either "Coffee" or "Tea"
My first question is that do I need to factor the y datasets... |
I was reading this paper:
https://nhess.copernicus.org/preprints/nhess-2020-28/nhess-2020-28.pdf
Where the notion of "joint exceedance probability" is discussed for the bivariate case. That is:
(1 > ∩ 2 > )
where is some threshold (e.g. 90th percentile). This can be estimated by looking at the number of observations ... |
I performed the correlation between several variables. R makes it possible to separate significant from non-significant correlations.
I noticed that low corrections (corr=0.4) can be considered significant (p.value<0.05), while non-significant corrections (p.value>0.05) can assume relatively high values (corr=0.7 ).
In... |
I am trying to solve a problem about a case-control study, where I need to calculate the odds ratio the association of X and Y, stratified by two age groups.
First, I calculated the crude OR for each group, which is ok and gives me similar results (1.30-1.45). Nevertheless, when calculating the OR ADJUSTED for age, I p... |
More precisely, consider three random variables $X,Y,Z$, with $f(Y|X,Z)$ being the density of $Y$ conditional on $X,Z$. Say that this density is "regular" enough (e.g., continuous in all three variables). Is it true that, for each such density function $f(Y|X,Z)$, we can find a function $g(X,Y)\neq 0$ such that:
$E[g(X... |
I want to test a nullinterval with bayes. So the hypothesis I have is on the
absence of an effect. Group 1 and 2 do not differ in their mean (at least not beyond an
effect size of $\delta > 0.2$). However I am very unsure if my rural understanding of Bayesian Analasis brought me to the correct interpretation of my resu... |
For RMSEA there seems to be a regular value and two robust values. Are there any recommendations on which of the three values to report? Would you report 1, 2 or 3 from lavaan?
|
I've been experimenting with regression models and when checking the loss of some models (MLP, RNN, CNN) I constructed using MSE, the evaluation loss is bounded below by 1.1331, and the training loss is bounded below by 1.1101 (except for the MLP model which has higher bounds)
All 3 models are using the same test/ tra... |
The following combinatorially difficult problem has obvious applications in information retrieval and bioinformatics but I haven't seen its solution discussed anywhere.
I am interested in computing the probability that two samples drawn from a multinomial distribution have a specific intersection of elements.
To make t... |
Let $R_1$ and $R_2$ denote two real-valued discrete random variables.
The probability convolution is the probability distribution for the sum $R_3:=R_1+R_2$ when $R_1$ and $R_2 $ are independent. For example, if $p(R_1=3)=0.2;p(R_1=0)=0.8$ and $p(R_2=2)=0.6;p(R_2=1)=0.4$. Then $$p(R_3=3+2)=0.2*0.6,$$
$$p(R_3=3+1)=0.... |
In the image domain, for a given image, suppose that we want to understand if there is a bird on that image (0 and 1 label = no bird and bird), attention mechanism helps to pay more attention to the birds and like blurring (giving less attention) the rest of the image. However, the thing that I do not understand, isn't... |
I have created two multiple linear models of the same data. The two models vary only in the dropping of a few variables.
Model_A includes all X independent vars (A,B,C,D):
Model_B includes only A,B as C,D were found to be insignificant:
As you can see the F-statistic has decreased but the adjusted R^2 has decreased. ... |
We have a dataset of 977 records (77:23 class ratio) where we try to predict a binary outcome using random forests and neural networks. whether supplier met the target or not. However, we didn't have any labels in the 1st place. Meaning, though some suppliers have met target in the past, our system doesn't capture it. ... |
When 1 is added to word count in Laplace Smoothing in Naive Bayes, the new probabilities either increase or decrease as shown below.
Though the problem of "zero" probability has been solved.
Does the smoothing represents the true picture of probability?
Denominator of Old P(w/c) is 15.
Denominator of New P(w/c) is 21.
... |
For example I have 2 different Gaussian random number generators.
The first mathematical expectation is 50 and the variance is 5.
The second mathematical expectation is 60 and the variance is 5.
(Actually I don't know their mathematical expectation and variance)
They generate random signals at the same time.
Maybe the ... |
I have to solve the following exercise:
Let $X_1,X_2,…,X_n,…$ be a sequence of random variables, with $X_n \sim \text{Uniform}(0,n)$. Also, consider $Y_n= e^{-X_n}$. Does the second sequence converge in probability? If yes, what is its limit?
My brief answer would be no, because as $n$ tends to infinity $X_n$ tends ... |
This question is specific to object detection's metric Mean Average Precision.
I sieved through multiple articles like the one by Jonathon and here by Kaggler Tito.
One part I cannot grasp immediately is the need to sort the confidence scores of the bounding box in descending order. What is the reason behind sorting he... |
If we want to include a seasonal component in ARIMA model we have to include dummy variables. Another way to deal with seasonality in time series data is to consider SARIMA model, but could you please tell me, whether we need to include dummy variables also in SARIMA model or we don't need to?
|
Let's say I have the following table from a sample of 462 people:
Gender
Happy
Meh
Sad
Men
70
32
120
Women
100
30
110
I don't want to test it against the hypothesis of independence, but against the following hypothesized distribution:
Gender
Happy
Meh
Sad
Men
46 (0.1)
139 (0.3)
92 (0.2)
Women
46... |
I'm currently learning exponential distribution in class, and i have this random thought on my mind.
so, as we know, the probability density function of exponential distribution is $f_X(x)=\lambda e^{-\lambda x} $ for $x>0$
and as we know too, $e$ is a constant approximately equal to $2.71828$
I wonder if $e$ in expone... |
I have this data:
structure(list(age = c(62.84998, 60.33899, 52.74698, 42.38498
), death = c(0, 1, 1, 1), sex = c("male", "female", "female",
"female"), hospdead = c(0, 1, 0, 0), slos = c(5, 4, 17, 3), d.time = c(2029,
4, 47, 133), dzgroup = c("Lung Cancer", "Cirrhosis", "Cirrhosis",
"Lung Cancer"), dzclass = c... |
I was taught, that GEE, being not likelihood based, has no way to compare models. That we cannot assess the main and interaction effects the way we do with ordinary GLM, OLS, GLS, mixed models and so on.
We compare models to analyse the deviance, so we can determine which terms (effects) are statistically significant o... |
I am runing CFA in R with the lavaan package.
My model is one factor with 5 variales.
I set std.lv = TRUE, but the estimated factor loading is still > 1.
Can I report the std.all column as my standardized factor loading?
Thank you.
Here are my code and results:
fit <- cfa(APV.model,data = data_sun,std.lv = TRUE)
summar... |
I have a longitudinal dataset from a medical registry where every subject has a certain medical condition. Periodically, each subject is checked for a specific outcome (yes, no) of interest. I have date for each outcome check up, as well as time since diagnosis of the original medical condition and several other explan... |
I'd like to simulate, say 1000 cases, normal data (from normal distribution). For only one covariate (e.g., gender), the male group is from N(0,sd=1) and the female group is from N(1,sd=2), I can firstly generate the index of gender: rbinom(n=people,size=1,prob=0.5). Then, I generate two sets of normal data by, for exa... |
As I recalled, we can also assume the data points come from Laplace distribution and hence it will be the linear regression with absolute error.
Why did so many texts assume the data points came from a normal distribution then?
|
I am fairly new to Gibbs Sampling and I am trying to build a Gibbs Sampler for a Poisson-Gamma hierarchical model.
In this model, there are $m$ restaurants in a city, with $n_z$ number of observations per restaurant (i.e number of diners per hour), where
$$ Y_{iz} \sim \operatorname{Poisson}(\lambda_{z}\mu) $$
denotes ... |
I have usage data for the first month of operation of my music business. In this user can listen to traditional songs in diff vernacular languages. I see that 30% of user accessing my business from web client bought a subscription. Where as only 12% of user accessing my business via our app bought subscription. To plan... |
Although I tried to read the manual, I don't quite see how I can incorporate the following model in stan_glmer().
$Y_{ij}|\mu_j,\sigma_y \sim N(\mu_j,\sigma_y^2)$
$\mu_j|\mu,\sigma_{\mu} \sim N(\mu,\sigma_{\mu}^2)$ (independent)
$\mu \sim N(50, 16^2)$
$\sigma_y \sim \text{Inverse Gamma}(20,60)$
$\sigma_{\mu} \sim \text... |
I have fitted a logistic regression on my data, for which I have below example,
library(dplyr)
data(mtcars)
Model = glm(vs ~ wt + disp,
data = mtcars,
family = "binomial")
Pred = predict(Model)
Pred_Prob = exp(Pred) / (1+exp(Pred))
Error = (mtcars[, 'vs'] - Pred_Prob)... |
Let us suppose I have a value measured from experiment and given by
$$V_{\text{exp}} \pm \sigma_{V_{\text{exp}}}$$ and a theoretical value given as
$$V_{\text{the}} \pm \sigma_{V_{\text{the}}}$$
Is there a statistical way to measure how well $V_{\text{the}}$ matches with the $V_{\text{exp}}$.
In other words, what is ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.