instruction
stringlengths
9
38.7k
Experiment Design Mice belonging to knock-out ($n=7$) and wild-type ($n=6$) had their food intake recorded per hour across a 24 hour period. Within this 24 hour period, the first 12 hours is labelled as "light phase" while the remainder 12 hours is labelled as the "dark phase". Food-intake is considered a continuous da...
This code is based on the example on https://en.wikipedia.org/wiki/Radial_basis_function_interpolation : def f(x): return np.exp(x * np.cos(3 * np.pi * x)) - 1 def rbf_exp(x, epsilon=3): return np.exp(-((epsilon * x) ** 2)) # Why doesn't this work? def rbf_lin(x, epsilon=3): return np.maximum(0.0, 1.0 - e...
Given $$\begin {align} \beta&\sim\mathcal N(1.5,1)\\ y&\sim\mathcal N(\beta x,5.5) \end{align} $$I have 10,000 samples from the posterior $\beta_S\sim P(\beta|x)$ Is it enough to get the prediction posterior samples by computing $\hat \mu_s=\beta_s x$ for $s=1\cdots10,000$? And getting a Single sample with dimension $...
In his Is Medicine Mesmerized by Machine Learning? blog article, Frank Harrell shows a calibration curve (below) and states that it is quite poor. I follow the logic: the claimed probability of $0.20$ corresponds to an actual probability of $0.08$-$0.10$. Doubling the true probability sure seems like poor performance....
In my study, 40K completed household surveys. However, when we suggested visiting a nearby health center to measure their physical parameters (height, weight, blood pressure, and blood glucose), only 20K visited. Is it possible to replace the unmeasured parameters of those who completed the household survey but did not...
I am currently studying ARIMA models. When I checked for a Python library to train one, I stumbled upon statsmodels which features ARIMA (and SARIMAX from which ARIMA inherits). However, there is one thing I'm not quite sure I understand. When differencing, we account for a trend in the time series. Nevertheless, we ca...
I'm hoping to find a method/algorithm/approach for fitting to a distribution to regression data. Essentially I have a problem where I have survival data with independent variables, but only cases that actually had an event. All data where an event did not occur before censoring has been purged. I understand a cox model...
The rules of the final round of King's Lottery in Byteland are simple: The player starts to draw balls from an opaque bag containing $a$ red balls, $b$ green balls and $c$ blue balls initially. After the player draws the ball, the ball is not returned into the bag. The player continues the process until he collects all...
It seems to make intuitive sense that if the events $A$ and $B$ are independent then $P(A|B\cap C)=P(A|C)$ because the occurrence of event $B$ should not change the probability of event $A$ even when we know of the occurrence of another event $C$, however I can't seem to prove or disprove the above claim so I'm prompte...
I have data that is grouped by 5 groups. I want to check for outliers as part of a one-way anova. Should the check for outliers on the whole sample, or by group? I am using box plots to look for outliers, plus homogeneity of variance plots and qq plots. Follow on question. If I identify outliers, but think they are pl...
This interesting question: Recurrence definition for a Markov chain gives the definition of a recurrent state for some discrete process. I was wondering, in the case of a continuous (time) process, what is the correct way to define a state $y$ as recurrent? In that case, would the (first) sum become an integral? I imag...
How to compute the log likelihood? Let's take a simple example using a normal distribution and scipy to do the work. Assuming X is the data, and the normal distribution as the model (dist = scipy.stats.norm(X.mean(), X.std())). From what I read, the log likelihood is supposed to be dist.logpdf(X).sum(), in other words ...
I chose the topic of consumption for my assignment in econometrics. My explanatory variables are interest rate, consumer credit, oil price, disposable income and lagged consumption by 1 year. Using these variables and conducting a omitted variable Wald test shows that although all the coefficients are positive ,basical...
Suppose I want to compare some countries to see how similar they are with respect to the relative sizes of the industries in them. So I find data on the distribution of GDP across all industries for each country, and end up with a probability distribution over industries for each country. What distance measure should I...
PageRank is the directed form of eigenvector centrality, denoting how influential a node is in terms of indegree edges. Is there an outdegree version? PageRank assumes that “ important nodes are those that have many in-links from important pages or important other nodes.” “ PageRank measures the transitive (or directio...
I have some troubles finding a strategy to identify the causal effect I am looking for from my observed data. I am assuming the following DAG: where $Z$ is the result of a coin toss (randomization), $A$ is the exposure of interest and $Y$ is the outcome of interest. I am assuming that $A$ is binary (0 or 1) and $Y$ is...
I am using the R function joincount.multi from spdep to look for spatial autocorrelation with my data. The joincount column is not an integer which is my expectation. I note that my adjacency matrix (from nb2listw) is not 0/1: the weights are 1/n, where n is the number of neighbours (so it sums to 1 over the rows). Is ...
I have a Conditional Generative Adversarial Network for Quantum State Tomography. The metrics I am monitoring during the training process are the losses and the Fidelity (the degree of similarity between two matrices). Fidelity close to 1 is good and close to 0 is bad. My result is a Fidelity over 0.999 which is excell...
As I was reading through this paper http://www.jstor.org/stable/25652278 I came across the following problem: Consider an urn with $N$ colored balls, the number of red balls, $X$, has a binomial distribution $X \sim B(N,p)$ with $p$ known. We independently and randomly draw two balls from the urn with replacement, that...
I have two elastic net model and I want to compare their coefficient to say if they have any significant beta effect changes across these two models. I thought of using Anova but realized since we don't know the variance associated with the beta effect, I can't use anova. For example: B1 and B2 are beta effect sizes ac...
I have a response variable (Yes/No) by visit with some missing values. I am considering imputing the underlying continuous variable in SAS using proc MI. After this process, I will have, let's say, M imputed datasets. How should I combine them into one dataset? In other words, how can I apply Rubin's rule if I need a s...
I am trying to figure out generally speaking how the standard errors for an individual estimated random intercept can be computed given the group-level and the individual-level variances. The model would be the random intercept model $y_i=\alpha_{j[i]}+\beta x_i + \epsilon_{ij}$ where $i$ is an individual measurement i...
Context: I am using national mortality database to compare the mortality of X disease by demographic factors. I divided the county based on social vulnerability scoring into 4 groups (1,2,3,4 based on which quartile). So I want to compare the mortality rate between group 4 vs group 1. I have calculated the age-adjusted...
I implement a classifier in python based on Negative Selection (Artificial Immune Systems) that classifies a dataset of transactions as either fraud (Class 1) or non-fraud (Class 0). The dataset is highly imbalanced so I use 5-Fold stratified cross validation and undersampling in the training data. For some reason I al...
Problem: Show that the following distributions are conjugate priors for the corresponding densities.. The multinomial distribution with $k$ categories and $$ p_{X|\theta_1 , \dots, \theta_k} (x_1, \dots, x_k) = \frac{n!}{x_1! \cdot \dots \cdot x_k!} \prod_{i=1}^{k} \theta_i^{x_i}$$ where $x_i \geq 0 $ are integers and ...
I am trying to write a model for an experimental design that looks like this: There are 5 farms (A,B,C,D,E) , and each farm has a RCBD design with 2 treatments(1,2) randomized in 4 blocks in each farm. Repeated measurements of response are taken from each treatment at 4 dates. I want to test the fixed effects of treatm...
I work in cell biology where the field standard is now to do 3 biological replicates of experiments. However, each data point is extremely laborious to get and we receive very little statistics training. I believe some kind of nested model would be the most rigorous, but I'm also worried about how "unfamiliar" tests ar...
I am exploring the relationship between a 5-class ordinal severity score modelled as numeric (predictor) and a range of continuous outcome variables. There are up to two observations per patient so I am using linear mixed models with lme4. Some of the continuous metrics are on very different scales and their units are ...
I am trying to conduct a survivability analysis (particularly a Kaplain-Meier curve) on data for estimating the likelihood of university drop-outs over time. The study began in 2015 (accounting for people joining Uni from 2015 onwards) and finished in 2020. So this study uses right censoring. Certain university courses...
On SARIMAX.predict, when you have an exog but the exog is only known today and in the past, how do you predict the endog's next 12 months off just the exog and data known through today? Is that what the SARIMAX.predict is doing as a default? Example, my exog is SP500 price. I do not know what it will be tomorrow, bu...
I am currently trying to understand the implementation of batching in policy gradient / actor-critic methods. My understanding is that these methods in principal work as follows: collect a batch of $N$ trajectories $\{\tau_i\}$ of length $T_i$ and optimise the policy by following the policy gradient: $$ \nabla_\theta J...
I've always heard that there isn't a lot of ways to diagnose the assumption that you've found the correct set of confounders in causal inference in confounder-control studies, and the best we can do is to incorporate methods that make the assumption more convincing but never rigorously prove. For example there is sensi...
I am building a pipeline in a machine learning project in which I would like to automatically discretize variables containing NAs. These NAs are justified in the context of the research and it is impossible to remove the rows or impute the values as this would bias the results, hence the choice of binning. I use optima...
Suppose we have a 2x2 contingency table with binary RVs $X, Y$ and we want to test for independence. Let $n$ be the total amount of measurements. Let $n_{11}$ be the number of occurrences of both $X = Y = 1$. Let $n_{+1}$ and $n_{1+}$ be the number of occurrences of $Y=1$ and $X=1$ respectively. Let $p_{11} = P(X=1, Y=...
I am trying to sample a piecewise power law distribution: $$ \ f(x) = \begin{cases} a_1x^{-\alpha_1} & \text{if } x_1 \leq x \leq \tilde{x} \newline a_2x^{-\alpha_2} & \text{if } \tilde{x} \leq x \leq x_2 \newline \end{cases} \ $$ I want to make this distribution continuous in $\tilde{x}$ so I obtain $a_1 = a_2 \ti...
There are two arms in a clinical trial. If ten centers recruited subjects. How do I test in R that distribution across centers into two arms are statistically same? The distribution appears exponential where one center recruited 50% into each arm and the next two highest recruiting centers had 10% in each arm. In R ks....
During the update step while training a self organizing map, the best matching unit for a particular input is found, then that BMU (and to a lesser degree it’s neighborhood) is perturbed to better match the input. If we are using a Euclidian distance metric to find the neighborhood and update weights, is there a point ...
It is well known that $\beta = (X^{T}X)^{-1}X^{T}Y$ for linear regression. While experimenting with this, I found that $\beta$ (excluding the intercept term) remained the same before and after demeaning $X$. The p-values for coefficients' t-tests also remained the same. From a statistical sufficiency perspective, a wel...
My question stems from this one I recently posted (I've fixed the issue raised in the comments, though that wasn't the topic of the question): Strange interpretation of odds ratio from logistic regression To summarize, I have 281 samples of seafood which are either correctly labeled (1) or mislabelled (0) based on seaf...
I've been learning about GAMs and was curious about how sensitive they are to noise within a given sample. I know people generally say that GAMs are more prone to overfitting than GLMs and need to be validated or cross-validated, but little more is said about how prone they are to overfitting. I ran a simple simulation...
I am trying to understand: 1 - why p-value is calculated as it is in Games Howell test, and 2 - how to modify an R function to obtain a one-sided (alternative: greater) p-value for the test When it comes to calculating the p-value for the test, most R functions I can find (here, and here) calculate it as such: p <- p...
Context I have a randomized controlled trial with three groups and three time measurements (pre, post, follow-up). I noticed that from pre to post, and then from post to follow-up, the attrition rates seem different by group. A reviewer asks whether the differential attrition is statistically significant. Reprex Here i...
I have a set of paired observations, corresponding to patient blood pressure before and after a treatment. I'd like to test for the significance of the treatment by conducting a paired t-test (or Wilcoxon signed-rank test) on the paired differences in blood pressures. For each patient, I have multiple pairs of observat...
If there is a function $Y=f(Z)$, is the following mutual information equal to zero? \begin{align} I(X;Y|Z)=0 \end{align} Intuitively, it is correct. But how can we prove this?
On p.87 in this online Understanding Machine Learning book, the authors wrote: Unlike the ERM paradigm discussed in previous chapters, we no longer just care about the empirical risk, $L_S(h)$, but we are willing to trade some of our bias toward low empirical risk with a bias toward classes for which $\epsilon_{n(h)}(...
I'm really new to statistical analysis, and I've been playing around with exact tests for 2x2 contingency tables. I've noticed that for the Barnard test (implementation with library(Barnard) in R) gives different results depending on how the contingency table is organized as shown below in the two images. Can anyone ex...
We have two Chocolate bags X and Y. Each chocolate bags have total 1000000 chocolate boxes randomly sampled from 100 types of chocolate boxes (B1, B2, …, B100). These chocolate boxes are of different sizes S1, S2, …, S100 having randomly filled with 10000 variety of chocolates V1, V2, .., V10000. I am interested in kno...
I estimated a GARCH(1,1) assuming that the residuals follow Student-$t$ distribution. garch = arch_model(Y, X, mean="LS", vol="GARCH", p=1, q=1, dist="t") Now I can't get what aspects should I check. I need standardized residuals or residuals? What test should I use and how many lags? (Number of observation is 1039.)
I'm trying to fit a signal modelled by a Lorentzian ($f(x) = \frac{\text{Amplitude}}{1 + 4((x-\text{center})/\text{width}^2)}$), thus I have 3 parameters : Amplitude, Central frequency and width. I use uniform priors for Amplitude and Central frequency ($\frac{1}{\theta_{\max} - \theta_{\min}}$), and Jeffreys prior for...
I collected data from an experiment with a mixed-design, specifically a 2x3x4 mixed-design, where the factors are populations (2 levels), conditions for the first population (3 levels), and conditions for the second population (4 levels). In each condition, there are 5 repeated measures for 13 collected items. Not all ...
In the notes of Andrew Ng's CS229 Machine Learning course, it is mentioned: The $\ell_2$ norm regularization is much more commonly used with kernel methods because $\ell_1$ regularization is typically not compatible with the kernel trick. Knowing that Lasso regression can lead to sparse models where many parameters a...
I would like to determine the mixing between two Poisson distribution means. I have $N$ observations that are drawn from two Poisson distributions. Each observation is drawn from one of the two Poisson distributions {$P(\lambda_1)$,$P(\lambda_2)$}. The probability that an observation is drawn from $P(\lambda_1)$ is $p$...
I am trying to go through a proof of the problem that as the number of parameters grows in a model with $n$, the MLE may not be consistent. An example is the model $y_{ij}=\mu_i+\epsilon_{ij}$, where $\mu_i$ is the mean for individual $i \in (1,...,n)$ and $j\in (1,2)$, so each individual has two measurements $y_{i1}$ ...
I am reading this paper and it states that - "In what follows we retrieve the maximum/predicted class probability from a softmax distribution and thereby detect whether an example is erroneously classified or out-of-distribution." However, I don't see how they use the softmax distribution to detect OOD samples. In thei...
I need to understand how a particular statistical challenge has been formally recognised or is commonly described in literature, and what the best academic resources are that discuss it. Here's the problem: consider you need to detect a rare phenomenon and in classifying the whole population (no need to sample) to dete...
I have a very simple question about CNNs, which I unfortunately couldn't find an explanation for. Imagine we have a CNN, that has four filters (eg right, left, top, bottom edges) each of those outputs a 2x2 feature map for simplicity. Each of them gets flattened, so we are left with 4 4x1 feature maps. Does the fully c...
I'm working on an political science article where we want to study the evolution of what determines the support to Quebec independence from Canada. We have survey data from 1974 to 2023. More concretely, we want to see the evolution of the force of the association between each IV (language, age, education, vote intenti...
I am estimating a model of the following form: log(y) = b1 x + b2 x^2 + b3 log(z1) + b4 z2 This is an econometric model with a focus on the impact of x x^2 (the inverted U relationship), where x ranges from 0 to 1. I included the other variables z1 and z2 just to be clear that there are other controls (some which are...
Let us assume a $n$-sized random sample $\{ X_1 , \dots, X_n \}$ from a random variable $X \sim N(\mu, \sigma)$. Let $X_\mathrm{min} = \mathrm{min}\{ X_1 , \dots, X_n \}$ $X_\mathrm{max} = \mathrm{max}\{ X_1 , \dots, X_n \}$ and let the range be defined as usual: $R = X_\mathrm{max} - X_\mathrm{min}$. Let us also d...
Suppose that the time that a phone call lasts is a random variable with density function given by: $$ f(t) = \begin{cases} \frac{1}{5} e^{-\frac{1}{5}t} & \text{if } t > 0 \\ 0 & \text{another case} \end{cases} $$ I want to first determine some probabilities for the call: 1. Takes longer than 5 minutes. We have...
When conducting a logistic regression analysis in SPSS, a default threshold of 0.5 is used for the classification table. Consequently, individuals with a predicted probability < 0.5 are assigned to Group "0", while those with a predicted probability > 0.5 are assigned to Group "1". However, this threshold may not be th...
If I have 3 IVs that are categorical/nominal and 1 DV that is categorical/nominal not rank or order, can I run a multinominal regression?
We will be conducting an experiment where a group of $N$ people take a test that has $M$ independent yes-no questions. We compute the number of questions each person $j$ gets correct as a score $m_j$. It seems reasonable to model the score as a binomial random variable $m_j\sim B(n=M, p=p_j)$. However, we have no prior...
I need to calculate MAU (or just the number of unique users) of a large service, with several conditions. I have a huge log (100B+ lines) of user actions, so I need to select some lines (satisfying the conditions) from this log and then just take count(distinct user_id) on the filtered set. But the filtering condition ...
I would like to understand the meaning of the term "random effect", in the context of running a mixed effect model with lme4's lmer() function. I have several related questions, so I will walk through a contrived example, and pose several questions at the end. i) Making an Example Dataset I will create an example dat...
I am working through Introductory Statistics for Business and Economics by the brothers Wonnacott, and am stuck on this problem in chapter 3 (problem 3-40): For various forms of transportation, the 1975-78 U.S. death rates were approximately as follows (deaths per billion passenger miles): Car: 16 Train: 0.84 Schedule...
I am looking for convergence rates of the RMSE of various machine learning algorithms and conditions for them. Essentially, I would like to find something of the form $$E[ |\hat{f}(x) - f(x)|^2] = o(1/n^\alpha)$$ is it possible to find something like that?
I know this has technically already been asked here, but it doesn't look like the previous question had a reproducible example. I am having the same problem: Very simple, running a zero-inflated negative binomial model, and finding a different result across Stata and R. The difference is minor for the count model, but ...
I'm performing the HAR model by Corsi. However, I don't quite understand what Corsi means by this in the original paper. He writes: It is worth noticing that if we accept the interpretation that realized volatilities aggregated over different horizons are reasonable proxies for volatilities generated by the correspond...
Are population principal components scale invariant? The answer is no. I'm not sure whether my understanding regarding the first two is correct; please, correct me if I'm wrong. Also, I don't understand the third proof at all. Graphical intuition. PCA results are sensitive to the shape of the data cloud (the ellipsoid...
I am quite a novice in statistics and I have a complex model (at least for me) that I need to build for a test. I have a treatment plan and I am doing some frequency measurements in different regions of the brain. The idea is to compare these measurements before and after treatment for the same group of subjects. Essen...
I have a categorical variable that has $4$ categories, and I have two dummy variables, $x_1$ and $x_2$, that cover this categorical variable. The $x_1$ variable has values of only $1$ without any zeroes $[1,1,1,1,1...1]$, while $x_2$ has values of both $0$ and $1$ $[0,1,1,0,0,0...0]$. When I use multiple linear regress...
Say you have a game in which users answer five questions daily. Would the distribution of average scores for a single user among all of their games meet the criterium for the central limit theorem? I wouldn't think so but in practice it seems to be roughly normal. This could be a coincidence but I cannot think of a rea...
I am building a classification model using deidentified patient data with ICD-10 codes as inputs. Each code is a string and represents a diagnosis, and these follow the pattern of 1 letter, followed by 2 digits, followed by numbers and/or letters. However, patients can have multiple associated ICD-10 codes, so I am not...
Prove that for random variable with natural numbers from 1 to infinity the expected value $E(X)$ is equal to $\sum_{n = 1}^\infty P(X \geq n)$. Is this the mathematically correct way to prove it? And are there any steps I missed or mistakes made?
I'm new to survival analysis and will apperciate your help regarding predictions after Cox regression. I'm running a cox model (using stata's -stcox-) in which I examine the effect of a continuous independent variable (ranges from 0 to 1) on the hazard to commit crime. The coefficient I get for this variable makes sens...
I am trying to decide what is the right random effects structure for my given experimental design. I've read quite a few of the other posts regarding linear mixed effects models and have come across papers like the Barr et al., 2013 paper suggesting to use the maximal random effects structure for confirmatory hypothesi...
If I have 2 regressors in regression, with low vif (less than 5 for each of them), after squaring them, the vif increased significantly (more than 10), in the course, we haven’t covered how to fix high vif. In the excercise, the regressors were squared to make the relationship linear between the regressors and the outp...
I have a question regarding my regression model and would be grateful for any help. I have a dataset that contains every tranche of a Deal (a Deal may contain multiple Tranches) and its Variables like Poolsize, Rating etc. The Tranches are included into the dataset at the time the Deal is launched and are from all Deal...
So I'm trying to predict when gas concentrations change from sensor conductivity readings over a day. The gases randomly change concentrations around every 80-120 seconds and are kept constant between changes. There are two gases - methane and ethylene. Right now, I'm just trying to predict when the changepoints occur ...
For Dunnett adjustment, multicomp package and emmeans package in R give different results. Anyone knows why? Thanks. Please see my example below. You can see the reported adjusted p-values from multicomp package and emmeans package are different. > library(multcomp) > library(emmeans) > library(DescTools) > > ##genera...
I would like to know whether this model is valid with respect to the calculation of the probability outcome. I apologize for the length, but to determine its validity you will need to know the definition of the terms. Additional information is provided below in a separate section if needed. $$ P_3 = P_1 P_2 $$ $P_3$ r...
I have a bivariate dataset on $[0,1]^2$ in which I am interested in fitting a joint distribution. I fit a Gaussian copula but am unsure how to judge if it's a good fit. I tried transforming my data using the fitted cdf to see if the transformed data would be uniform on $[0,1]$. It turned out to be far from uniform. I t...
I need some help to figure out how to choose the appropriate statistical analysis, it's driving me crazy. We are conducting a service evaluation, where we have two different groups who voted on their priorities for the service (11 priorities). Each person could vote on their top 3 priorities (voted for multiple priorit...
The interval $[0, 2]$ is divided into two parts by randomly marking a point in $[0, 1]$ according to the rectangular distribution. Let $X$ be the length ratio $L_1/L_2$ of the shorter segment $L_1$ to the longer segment $L_2$. Thus, $L_1$ is in the interval $[0, 1]$, and $L_2$ is greater than or equal to $1$, and also ...
I am attempting to obtain a standardized solution for simple slopes and indirect effects in a SEM in R using lavaan and semTools::probe2WayMC, following the methods of Schoemann & Jorgensen (2021) (https://doi.org/10.3390/psych3030024). I found another post that provided some insight on the topic (How to use probe2WayM...
I'm struggling to set random effects for my linear mixed effect model. I've been trying to go about it using a top down approach in accordance to Zuur et al. (2009), but due to the fact that you have to specify a model with a complexity beyond what you expect or want, defining the combinations of random effects for the...
I have a set of variables all measured on a nominal scale. I have applied the MCA function within the FactoMineR package to reduce the dimension of my data set. Next I would like to calculate a score for each participant. Here is an extract from the article: The following equation was used to calculate a composite asse...
The value of the "ever_treated" coefficient obtained with this DID regression is .0397682: keep if (first_treated==3 | first_treated==0) & (period==2 | period==3) gen after=0 replace after=1 if period==3 reg vote_share ever_treated##after Source | SS df MS Number of obs = 14,710 ...
Let's take the CBOW (continuous bag of words) model as the example. Suppose that, there are $c$ context words, each of which is a one-hot encoding vector. So the total number of elements of input vector is $v \cdot c$, where $v$ is the total number of words to be learned. Suppose the first hidden layer has $d$ neurons,...
I am learning the double (Brown) exponential smoothing. Comparing to the simple exponential smoothing, the Brown exponential smoothing smooths the output sequence $Y_t$ twice, such that \begin{align} S^{(1)}_t &= \alpha Y_t + (1-\alpha)S^{(1)}_{t-1}\\ S^{(2)}_t &= \alpha S^{(1)}_t + (1-\alpha)S^{(2)}_{t-1} \end{align} ...
In the book "Understanding Machine Learning, S. David Ben et al.", the authors describe the Batch Perceptron Algorithm as follows: However, in the book "Python Machine Learning, Sebastian Raschka et al., 2nd edition", the authors describe the algorithm as follows: Which is, to my calculation, don't look quite the sam...
I'm seeking advice on determining the ideal time span for optimizing a weather forecast strategy using historical data without overfitting/underfitting our model. In pursuit of optimal performance and highly accurate predictions in the upcoming month(s), what factors and methods should be considered when choosing the t...
I have some environmental monitoring data that I've collected and I'd like to compare the condition plots that have more resources designed to improve their condition "managed" vs. those that haven't "unmanaged". Managed Unmanaged Very good 9 28 Good 10 50 Fair 5 44 Poor 3 26 Unknown 1 20 Each tre...
The distribution of height of students in a class has a bell shape. Moreover: the average height is 68 inches and 16% of students were taller than 71 inches What percentage of students in this class are taller than 65 inches? Since it's bell-shaped, and the distance of 65 from 68 and distance of 71 from 68 are both...
Surveys like PISA, TIMSS etc. do not report individual achievement scores per observation, but five (sometimes ten) so-called "plausible values", drawn from a constructed probability distribution that represents the students achievement. The general way to analyse this (as given in many papers in technical reports) is ...
I am aware the Jaccard similarity coefficient, $J$, is classically defined as the cardinality of the intersection divided by the cardinality of the union of two sets, $A$ and $B$. I can easily understand and comprehend this equation. $$J=\frac{|A\cap B|}{|A \cup B|}=\frac{|A\cap B|}{|A|+|B|-|A\cap B|}$$ However, I hav...
I'm new to mixed effects models and am trying to use the lmer() function from the lme4 R package to specify a random effects structure. In my experiment, subjects are spread out over 11 non-overlapping groups. Groups were fairly big (hundreds of subjects) and were tested on at least 4 successive days. On each day, subj...
I'm using the ols_eigen_cindex function to assess multicollinearity. With these variance proportions: model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars) ols_eigen_cindex(model) Eigenvalue Condition Index intercept disp hp wt qsec 1 4.721487187 1.000000 0.000123237 0....
I'm using the mvrnorm function from MASS library, and I have a question regarding the empirical argument. In one of the comments in this question, Billy says "when empirical = FALSE the mean and covariance matrix are treated as known/true population parameters estimated without sampling error", whereas Bo WANG in his c...