instruction
stringlengths
9
38.7k
The textbook I'm currently reading says that the quartimax rotation in the factor analysis maximizes the rows' variance in the loading matrix. In order to do that, it says, the quartimax rotation maximizes Q, described below. (row no i and col no j). But about that Q, isn't it the same even if you switch the first sigm...
I've always been taught that a major downside of NMDS is that there's no way to calculate the amount of variance captured by each axis. Variance doesn't come into the calculation at all so this made sense to me. However, PC-ORD claims to be able to estimate the amount of variance explained by each axis in their demo he...
In optimization algorithms such as RMSProp, Adam, etc. why is an exponential weighted average used over a straight sum and divide? Seemingly an exponential weighted average would be useful when the further away something occurred the less useful it will be in predicting what is about to happen, but that does not seem t...
Doing some worldbuilding and was thinking about how connected my world is. I had thoughts on dealing with how I could calculate pedigree collapse and such, but wanted to use a simpler model to think about for now, so: Given a number of four-person families, how many people need to be selected so 50% of the time, half o...
OLS regression is not symmetric, meaning that it produces different relationships if you flip the dependent and independent variables; however, it would seem odd if the p-values were different and indeed empirical testing shows them to be identical: import numpy as np import statsmodels.api as sm xs = np.random.normal(...
I am working on a problem asking "Provide a Bootstrap bias of $\hat{r}$ using R = 1000 bootstrap estimators." However, I am stuck on what even to do. As far as I know, the formula for finding bootstrap bias is $Bias_{boot}(\hat{r}) = E[\hat{r}^\ast] - \hat{r} $ Please correct me if I am wrong. So from here, I used simp...
I read some comparison articles, and always find "asymptotic efficiency," "asymptotically less efficient," and "asymptotically normal." I am really confused about the meaning of these words. What is the difference between "asymptotically efficient" and "asymptotic normal distribution?" I searched many website but stil...
I feel like I am missing some easy point about this invertible resnet paper which is making it hard for me to grasp how the fixed point iteration works. stated simply, the residual connection in a resnet architecture is of the form $y = x + f(x)$. Therefore, one could run things in reverse to get $x = y - f(x)$. The ma...
I want to check screening count has changed over a time period within RACE. I have the results for two time periods. 1st is for 2010-2013 data and another for 2014-2019 data where scrn_count=screening count and eligible=Total eligible count race_time1 RACE scrn_count eligble scrn_rate <chr> <int> ...
I have size measurements of 1000 objects, measured over time. I would like to classify the objects based on the response of their size to time using unsupervised classification. For example, the size of the object can follow one of the below 6 different curves. I used k-proto from library(clustMixType) for unsupervise...
I have a dataset with repeated measures data but I'm unsure of the specification of my model and subsequent contrasts: In the dataset, participants responded to a measure (Score; continuous) at three different timepoints (Time; T1/T2/T3) that were not equally spaced (not sure if this is relevant). I'm informed that Sex...
Imagine that we collect time series data from a sensor. Due to measurement errors and let's say power outages, there are gaps in the time series that can be quite long. For example if data would be collected in five minute intervals, a two or three hour gap without any collected data is common. The goal is to estimate ...
EDIT: The terms at the end will not get cancelled as they involve different variables: $\alpha$ and $\alpha^*$, etc. Now the post is corrected. I will leave this question here in case someone is as dummy as me and finds this post in the future. I am trying to derive SVM regression model step by step in order to underst...
I have data from 70 studies reporting number of observed events in two time periods, one before Covid and one during the Covid pandemic. The duration of the timeperiods and the size of the population were the events occurred varies between the reports but are similar for the paired data within each study. There is no i...
Disclaimer: I am well aware that correlation and causation are different things, yet I will here write "A causes B" to keep it short. This is in any case completely unrelated to the point I try to make. Assume that we are interested in the effect of variable $X$ on variable $Y$, through a possible mediating effect of...
I try to figure out what a Bayesian approach to Machine Learning is. I start from a model that for any given features-vector and target calculate probability density: $ P (y, x_1, x_2, \dots, x_n, c_1, c_2, \dots, c_k) $ where $y$ is the observed target, $x_i$ are $n$ features and $c_j$ are $k$ model parameters. I try...
If we have iid random variables $X_1,X_2,...,X_N$ with $\mathbb{E}X_i=\mu$, is it true that $\mathbb{E}\prod X_i=\mu^N$? I had no doubt that this is true, until I tried it out with Python, using random.normalvariate() to generate the set of samples, and surprisingly found that the product of all these data points are g...
I have a dataset of trees, each with a location and a binary variable that indicates whether the tree is sick. I would like to predict the probability of a tree being sick at a location as dependent on the probability of trees at a radius of some kilometers from its location. My question is whether it defies model assu...
I have a group of subjects (name) which are tested for a variable of interest (var_y) along 5 different sessions (session). These sessions are not programmed for the same days for all the subjects, so it happens that in the same date some subjects are tested for different sessions or, viceversa the same session can be ...
Let's assume one is collecting measurements $x_i(t)$ of "true" variables $\bar x_i(t)$, where $0\le i<n$ is the index identifying each variable and $t$ represents different sampling times. Let's also assume true variables are linked together (via a dynamical relationship for example) such that : $\sum_i \bar x_i(t) = 0...
For a given (convex) hypothesis $h \in \mathcal{H}$, and the variables $X \in \mathcal{X}$ and $Y \in \mathcal{Y}$ I have the following optimisation problem: \begin{equation} \min_{p(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y)\ell(h(x),y) \,dy \,dx \\ \textrm{s.t.} \quad -p(X=x,Y=y) +\beta \leq 0, \quad \forall ...
Here is the context: So we can analyse this using a 2 sample t tests. The assumptions of t-test comparing the means of two independent samples are populations being compared should follow normal distribution and independent samples. I have two diagnostic plots essentially to test the assumptions. How do you test indep...
kindly guide me. I am stuck in the middle of my MS Research. I have 3D printed 9 samples of PLA material with process parameters of flow rate, extrusion temperature and print speed for 3D Printing. After getting results for Ultimate Tensile Testing (UTS) and Impact Testing, I put those values in Minitab Taguchi design ...
Imagine that you found two studies which did regression analysis of, say, the effects of social distancing on the number of covid cases. Let's say that in both studies the authors have operationalized the variables in the same way. Let's define social distancing as the lowest distance in cm that a certain individual ha...
In my area of studies, scientists and reviewers often look at the results of GLMM in the context of ANOVA, so they demand a single p-value for the whole factor (not its levels). I read a lot about the idea of not using p-values, but still, in many simple cases, it is just convenient and needed (to have a clear answer)....
I have a panel data set with companies and some variables expressed as changes year-to-year from 2017-2018 (2018) to 2020-2021 (2021). I am trying to estimate a regression estimating the effect of all variables on "OPEX" with the plm-function in R (from package plm). R tells me "n = 254, T = 4, N = 1016" and then I ...
I have a dataset (lalonde) with 429 controls and 185 treatments in sum 614 rows. Doing a propoensity score matching using the 1:1 NN (nearest neighbor method gives me the expected matched data with 185 treatments and 185 controls. But when I use the estimated with probit regression method the matched data (described wi...
Now I'm studying elementary probability thoery. And It changes every abstract notions to strict text. I mean, when I was in middle school, the probability of two times coin toss is like below. $$P(HH) = 1 / 4,$$ $$P(HT) , P(TH) = 1 / 4$$ $$P(TT) = 1 / 4$$ It is just computed because we have only '4' number of cases and...
Simply speaking, there are 85,000 spots. 20,000 is reserved for masters(or higher education). Previously, they were selecting 20k first from everyone with a masters and then grouping everyone remaining to select 65k randomly. Recently, they changed the procedure to select 65k first from everyone and then looking at the...
Here is a interview task of training a binary classification model. I will not show the detail of training data as the confidential issue. The variable $X$ has ten features and all the features are categorical value. Let's ignore the actual meaning of the data and just regard as a general binary classification problem ...
I came across the post here which mentioned the following: k-means assumes the variance of the distribution of each attribute (variable) is spherical I wanted to understand what does it mean by "variance of the distribution is spherical". Could anyone please help me understand this?
I've ran a linear mixed model using statsmodels and obtained the follow result: Mixed Linear Model Regression Results ========================================================= Model: MixedLM Dependent Variable: voxel_value No. Observations: 76 Method: REML No. Groups: ...
Can anyone perhaps confirm if it is true that this scatterplot indicates that my data is homoscedastic? Since there are quite some more datapoints on the upper side, I was a bit hesitating. Thanks a lot!
I'm hoping for some help with a problem that arose today. I have two groups measurements. A total of 200 blood samples from myeloid leukemia patients. 10 samples show mutations in a DNA binding protein that facilitates epigenetic modifiation of chromatin (addition of a methyl group, which impedes gene transcription)....
I have treated a species with two treatments: salinity: five different concentrations a pollutant (control and two different concentrations) organisms grown with the two lowermost concentrations of salinity have been treated only with two concentrations of pollutant (control and the lowest one). Trying to make a tw...
Suppose I have a distribution $U(0,a)$ where $a$ is unknown and we are interested to estimate it. Someone who has access to $n$ samples $\mu_i$ of this distribution instead decides to create a Gaussian distribution with mean $\mu_i$ and standard deviation $\sigma_i$ and draws 1 sample from each of $x_i\sim N(\mu_i, \si...
I am currently trying to differentiate the parameters in the beta generalized Gompertz distribution by Benkhelifa which has the following CDF and the following PDF with all parameters being larger than zero. When graphing the functions I can't clearly differentiate which are the shape, scale, and location parameters....
I am checking whether two columns in my pandas dataframe are correlated, but then wondering if it makes a difference if I do percentage change first (using pandas pct_change().mul(100) function) to both columns then use corr() Does it matter if I find correlation using the raw numbers instead of the percentages differe...
Let the input variable $X \in \mathcal{X}$ and the target variable $Y \in \mathcal{Y}$. For a fixed hypothesis $h \in \mathcal{H}$ I want to solve \begin{equation} \min_{p(X,Y)} \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y)\ell(h(x),y) \,dy \,dx \\ \textrm{s.t.} \quad \quad \int_{\mathcal{X}}\int_{\mathcal{Y}}p(x,y) \,d...
I have heard a lot about neural networks as an approach to sampling a large parameter space in aim of finding the space of model parameters that match a dataset. I've done some research online, but almost all articles or writings on neural networks are not welcoming to a person without some experience with it. I would ...
Let's say I went out each year asking people whether they really liked Pepsi, did not care about it, or hated it. But in the first year I asked people at my company when it was small, then the second year more employees came, each year the number of employees or my sample size increases; so the sample sizes are inequal...
I was wondering how I would adjust my model where there would be 3 treatment states. There is the untreated but the treated is split into longer treated or less treated. What I mean by this is that the treatment occurs in the 6th year and continued into the 7th year. But there is another type of treatment in which it w...
In the book "Elements of Statistical Learning", the author compares the OSL estimator with Lasso, Ridge and Best Subset for the special case of Orthogonal X. I am attaching the particular estimator. In the plot, the author draws red dotted line as the estimator. For ridge estimator, why the line gets shifted from the g...
Having sampled nitrogen at several points on the fields, we sent the samples to three different institutes. The results for the same point should be comparable but it seems that the values measured by Institutes 1, 2, and 3 are not highly correlated. I have checked the literature and found several papers where it has b...
I am modeling a time series using a multiple (dynamic) linear regression model. I suspect that at some point, the model no longer accurately predicts the true series. Is there a way to find the point where the true series and the model diverge? Ideally I'm looking for an already implemented R-package.
This title is an effort to elicit a simplified explanation as to how come the transitiveties term causes less numerical instability than ttriple when fitting an Exponential Random Graph Model (ERGM). From the ERGM R Package manual: Transitive ties: This term adds one statistic, equal to the number of ties i–>j such th...
In this PyMC3 tutorial on Bayesian Mixed Effects Models, there is some Re-parameterization "to avoid chain divergences." with pm.Model(coords=coords) as hierarchical: # Hyperpriors intercept_mu = pm.Normal("intercept_mu", 0, sigma=1) intercept_sigma = pm.HalfCauchy("intercept_sigma", beta=2) slope_mu = ...
I have results from 25 experiments that include an estimate of mean effect and a thousand posterior samples of the effect. Rather than use the standard deviation of these posterior samples as the standard error, and then assume a normal prior, can I directly incorporate these 1000 samples for each experiment? My questi...
I have a question about generating control variables in DID analysis. Let's say I am interested in examining the effect of policy change (2015 reform). So I use the year 2014 and 2016 for the DID analysis. In this case, which year should I use for generating control variables? For example, education level/salary in 201...
My question is easy, but I really got stuck here ... Say I have 500 people, among them, 200 likes eating ice cream. Among these 200, 60 likes strawberry ice cream. So the rate ratio of ice cream vs strawberry ice cream would be (200/500)/(60/500)=200/60=3.3 But how to calculate the confidence internal for this rate rat...
Suppose I have the following question: A school has yearly (historical) data on the height and weight of students - each year, students take a fitness test in which they either pass or fail ("score"). Some students have been at the school longer than other students and therefore have more data (randomly simulated data...
I have estimated several regressions on different samples. For example, I have estimated these regressions: $$ y = a_1 + b_1 x_1 + c_1 z + e_1 \\ y = a_2 + b_2 x_2 + c_2 z + e_2 \\ y = a_3 + b_3 x_3 + c_3 z + e_3 \\ y = a_4 + b_4 x_4 + c_4 z + e_4 \\ y = a_5 + b_5 x_5 + c_5 z + e_5 $$ $z$ is just a control variable, bu...
What is the distribution of $Y$ from using the Rejection Sampling algorithm? Repeat Sample $X$ with distribution function $F_X = (1-(1+x^\alpha)^{-1})1_{x\ge 0}(x)$ Until $X>x_0$, where $x_0$ is a positive constant. Set $Y=X$ The solution begins as follows, however i do not understand this part: "The probability ...
I want to calculate the expected duration of interactions between two aircraft. Here, 'interaction' is defined as the simultaneous presence of two aircraft in the same region. Now, we only look at how long each aircraft is in the specific region during the hour and considers that each aircraft may have passed through t...
I have 2 mutually independent random variables: $s$ is distributed exponentially with parameter $\lambda$: $s\sim F(\cdot|\lambda)$ $\epsilon_x$ is distributed exponentially with parameter $\chi$: $\epsilon_x\sim F(\cdot|\chi)$ Define $x\equiv s-\epsilon_x$, $s_0\equiv \max\{x,0\}$. How do I compute the expectation o...
I have what seems like a simple but fundamental question. Some posts on CV seem to be along similar lines, but not quite address what I'm trying to understand (for instance Comparing percentages from different sample sizes). Suppose I rolled six dice and counted the number of 6s that came up in each roll. I wouldn't be...
I have temporal data on an environmental stressor temperature and a continuous variable ecosystem health. They are moderately yet significantly correlated (i.e. r=-0.5; P<0.05). I do not know whether and how the increase in temperature caused a decrease in ecosystem health. There is no clear evidence for causality or t...
I am trying to simulate "correlated categorical data". For instance, consider the following example: Suppose there are 10 players (p1, p2, ...p10) - each day, a random combination of these players meet together (1 = present, 0 = missing). These players then try to solve a puzzle (1 = successful, 0 = unsuccessful). I wo...
I'm running a scikit-learn XGBoostRegressor with an RMSE loss function, on a variable with a distribution that is close to symmetric around 0 (think normal distribution, with a positive mean that generates more positive than negative values, apprx. 2:1). The model consistently predicts mostly positive values. Only 1-3%...
I have the time series of car rentals/demand in a location. The time axis is every hour for 3 months. The y-axis is number of car rentals/demand. I want to do prediction for future hours given this information. I would like to know the prediction models for this type of data. I am not sure about the performance of ARI...
I was seeking an alternative scoring rule sets instead of three points for a win (gained more engaging and balanced) to cancel the theory "Banking a draw meaning a new kind of loss". It's kind of unreal to assess the consequences of individual changes on game dynamics and appeal. The changes allow for novel strategic...
Imagine that you have a standard 2-component univariate Gaussian mixture model: $$p(x_i∣θ)=(1-λ)N(x_i|μ_1,σ_1^2 )+λN(x_i|μ_2,σ_2^2 )$$ $$θ=\{μ_1,μ_2,σ_1,σ_2,λ\}$$ $$L(θ;x)=∏_{i=1}^N p(x_i |θ)$$ The posterior distribution of parameters can then be obtained using the Bayes rule, and either the mean or the maximum of the ...
I have actually three questions about the Cochran-Armitage test for trend, which tests for an association between a binary variable and an ordinal one: Is it valid if the expected cell count is low (< 5) in many cells (> 20%) of a contingency table? Is it valid if there's not really a linear trend in the contingency t...
I am not able to apply OHE because tags feature has around 100 words in it so how can solve this problem? Here is my data book={'Title':['Geophysical deep learning','Deep learning for algorithm portfolios','Polymer electrolyte and polymer'], 'tags':['method comprising:\nselecting type geophysical data;\nselecting t...
On internet and in articles KNN ist mostly described as supervised algorithm. But recently I have find also few articles where it is mentioned as unsupervised algorithm.I cannot find articles that are reviewing/comparing both of them. Can you recommend someliterature/articles where I could read more about it? Can you e...
The .632 estimator (and extensions like .632+) developed by Bradley Efron are founded on the following premise. Suppose we have a data set with $n$ observations, and we draw $B$ nonparametric bootstrap samples (that is, each bootstrap sample consists of $n$ observations sampled with replacement with equal probabilities...
It is known that for any distribution a minimization of squared deviations from a value $c$ gives mean of the distribution. In other words, if we generate many values $y_i$ using our distribution, and then try to find $c$ that minimizes the following expression: $ \lim_{N \to \infty} \frac{1}{N}\sum_{i}^N (y_i - c)^2 ...
I have a black-box circuit problem, which consists of 40 switches and some circuitry elated to that which is unknown. Their states can either be On/Off. I can measure the output which consists of two continuous variables, where Output-1 can vary between 0 and 600 and Output-2 can vary between 1 and infinity. Task is to...
I have a very simple data set with just one real valued feature ($x_i$) and a real valued target ($y_i$). My model assumes that the targets depend on the feature in a very simple way: for the features that are smaller than some unknown split value ($x_i < x_{split}$), the targets come form one distribution, otherwise (...
Usually linear regression is done by minimization of squared deviation: $ E = \frac{1}{n} \sum_{i=1}^{n} [(c + k \cdot x_i) - y_i]^2 $ Where $x_i$ and $y_i$ are the features and targets, respectively. While $c$ and $k$ are the model parameters that have to be found by the minimization of the above given measure (mean s...
I am working on a problem where I have a multiple time series, each with a size of a 100 steps, each being described by a 8 variables variables. I want to identify "states" within each time series, where a state would reflect some cluster that is learned from the spatiotemporal pattern of values of the 8 variables. So ...
I tried all 3 correlation tests, and got the following results: Pearson's test: 0.04132983 Spearman's test: -0.009821993 Kendall's test: -0.02230622 I don't understand how the values can be so vastly different. Especially since I read Pearson and Spearman produce similar results. I am comparing 2 values, one ordinal (y...
Is it possible within causal inference using DAGs to sensibly include a categorical variable with 20 levels? I have seen that regression trees can be used in this situation but not in combination with a DAG. We use the DAG to map our assumptions about the causal relationships between the outcome and this categorical va...
I am using 2000-2020 quarterly data and want to test if an appreciation of the real exchange rate leads to a decrease in manufacturing output of a country. However, my data seems to be non-stationary using a ADF test. Since my knowledge in terms of econometrics is fairly limited, my plan was to use an OLS regression wh...
I am researching the effect of parameters on energy consumption. To determine the effect of parameters, I want to use the R Studio's F-test. In this way I want to investigate if the model with the parameter (dummy categories) is significantly better than a model without the parameter. Here I run into a problem. My data...
I have 100 patients all with specific benign tumor. They have radiotherapy and removed tumor. Some of them have secondary cancer after more than 15 years. Our question is, what is a probablity, they will get secondary radiotherapy cancer? From biological aspect please forget tumor relaps, genetics predisposition and mu...
If we have X and Y that are mathematically dependent: X = Y + Z, is it 'forbidden' to use Y as a predictor to X in linear regression? I'm trying to find a concise explanation for why it is, or isn't. One explanation I've found is that you shouldn't use simple linear regression in this case, but multiple linear regress...
Suppose I fit a linear regression model in R like so > head(mtcars[, c("mpg", "wt")]) mpg wt Mazda RX4 21.0 2.620 Mazda RX4 Wag 21.0 2.875 Datsun 710 22.8 2.320 Hornet 4 Drive 21.4 3.215 Hornet Sportabout 18.7 3.440 Valiant 18.1 3.460 # Fit linear regression model ...
Say I have a population, and take a random sample of that population. Later, I decide I'm only interested in a specific subset of the population. A subset of the random sample is found in the subset of the population, as you might expect. Is that sample subset still random, with respect to the population subset? To giv...
I'm trying to build a text classifier with keras using word embeddings (glove) and a RNN (in this case a LSTM) using keras. I searched in several sites and decided to start with this configuration: model = Sequential() model.add(embeddingLayer) model.add(LSTM(LSTM_DIM, dropout=DROPOUT)) model.add(Dense(NUM_CLASSES, act...
I'm having trouble understanding one of the steps of the Wald test used in two-sample binomial proportions. More specifically, when $X_1, ..., X_{n_1}$ are iid Binomial$(1, p_1$), $Y_1, ..., Y_{n_2}$ are iid Binomial$(1, p_2$), with these two samples mutually independent, and the hypothesis being $H_0: p_1=p_2$ versus ...
Say I have a data set df of individual patients, the doctor they saw, the cost of each visit, and the patient age and sex. I want to use a mixed-effects model with a random effect term for each patient and each doctor and a fixed-effect for the age and sex. Many patients have repeated measures where they saw different ...
I have a production process, and I can measure the % of total defects every month and I know the granular breakdown of the defects A, B, C. I want to compare the breakdown of the defects A,B,C for two months to see whether it actually went down, how do I normalize the data to see whether defect A actually decreased rel...
Are there any well-known techniques that are capable of estimating the similarity between a closed-form distribution (specifically a Gaussian if that helps) and a distribution obtained by sampling? I'm not sure what the metrics are typically used for similarity estimation but one that makes sense intuitively would be t...
The experiment: I am analyzing samples from patients presenting two different diseases (e.g.: Cond_A, and Cond_B). I have 50 samples from each group. I have additional information about these samples, such as age, sex, and how long the samples have been frozen. For the actual analysis, we used a technique that quantifi...
I am working on a dataset on time devoted to domestic work by individuals I have grouped the data based on the day of the week the information has been collected. This was done to examine the relation between mean and variance for the variable. So, we have 7 points, 1 for each day of the week. My finding is that mean a...
I have a model of the form: library(nlme) lme1 <- lme( y ~ 1, random = ~ Var1 + Var2 | J, weights = varIdent(form= ~ 1|Var1*Var2), data = df ) I want to estimate the standard deviations of the groups J based on factors Var1 and Var2 (the random argument in the model), and the standard deviations of the observ...
Any recommendations for models (or applications in papers) to test theoretical predictions about non-continuous effects, e.g., based on a threshold, rather than marginal effects? Some examples of the sort of threshold theoretical predictions I'm interested in testing: The simplest example would be where the threshold i...
Faraways Linear models (2ed), page 75, does the following: data(savings,package="faraway") lmod <- lm(sr ~ pop15+pop75+dpi+ddpi,savings) sumary(lm(sqrt(abs(residuals(lmod))) ~ fitted(lmod))) Estimate Std. Error t value Pr(>|t|) (Intercept) 2.162163 0.347880 6.2153 1.175e-07 fitted(lmod) -0.061366 ...
I would like to construct an Arjas plot to test the proportional hazards assumption. The example data set I am using can be found here: https://stats.oarc.ucla.edu/sas/seminars/sas-survival. I have googled "Arjas plot", I have tried contacting one person who is familiar with them and my email has gone unanswered, and I...
Is it possible that GEE and mixed effect GLM give contradictive answers in significance of covariates? I assume both GEE and GLM selects same covariates. If so, which one should be trusted? From asymptotic viewpoint, GEE and GLM should give same answer. However, I am always in finite sample case. The same answer is not...
I have a dataset where a number of samples (>600) were weighed by three different instruments, called V G and P. Each instrument was used three times to weigh each sample so there are nine values total per sample. One of the instruments (V) is considered a "standard," so the comparisons of interest are really between t...
I know that there are a lot of topics about it but I still don't understand something. People say that if we initialize weights of a neural network with the same value there is no learning because the gradient is the same for each weight (so the weights are updated in the same way). However, for me, this assumption is ...
Hi supposed I have 1000 bins. On average each bin has 100 blue balls and 20 yellow balls. What I like to do is to test whether each bin has significantly more blue or yellow ball than the average. For example, if bin x has 200 blue balls and 25 yellow balls I would like to know if this bin has blue or yellow ball the...
When you run lm and then summary, you get an R2, F statistic, and P value for the overall model. How do you get this (particularly the overall P Value) when you use mixed models? library(lme4) library(lmerTest) library(car) data(mtcars) m <- lm(mpg ~ wt + cyl, data = mtcars) summary(m) mm <- lmer(mpg ~ wt + cyl + (1|h...
In Faraways Linear Models (2ed.) page 77, he mention: "when non-constant variance is seen in the plot of $\hat{\epsilon}$ against $\hat{y}$", a transformation of the response $y$ to $h(y)$ where $h()$(a comment on what h() means here is appreciated) can be chosen so that $\operatorname{var}(h(y))$ is constant." Then he...
Any help on this would be much appreciated. Let $x_{t} = b x_{t-1} + u_{t}$, where $u_{t} \sim N(0,1)$ and $\lvert{b}\rvert < 1$. What can we say about the distribution of $y_{t} = \max(x_{t+2},x_{t+1}) - x_{t}$? What would be a good way to estimate the percentiles of $y_{t}$?
I was wondering if anyone might know of a way to calculate confidence intervals around an ICC(1) value? I'm running a multilevel model using the lmer() function in lme4 where I'm interested in seeing if there is a significant amount of within-person variation in a particular construct. I've run a null model for the var...
I want to do a QQ plot, where I compare a sample to multiple standard distributions, scaled, so that the points represented by the correct distribution are on the black line. I expect to do basically what https://www.youtube.com/watch?v=okjYjClSjOg describes. What I aim to do Sort the sample values. Consider each valu...
Question: how can one obtain a good confidence interval for the estimated random effects from gamm4? Motivation: The example below, using binomial data with a random intercept, shows that estimated random effects are similar with gam, gamm4, and stan_gamm4 but the CI obtained from the fitted gamm4 model by using "postV...