instruction
stringlengths
9
38.7k
I have fitted respectively a zero-knot, a one-knot and a two-knot linear spline to my data, and I need some index of model performance for model selection. The crucial point is that the splines are fitted with robust linear regressions, specifically with Huber estimations, which makes the usual estimator of prediction ...
I am a physician conducting some research in Critical Care patients (I have full ethical approval, none of my results will be used to inform patient treatment, etc). When a person's lungs are enormously sick, they can be turned on their front. It often helps. I have a dataset from around 135 patients who have had this ...
I was task with analyzing some within/between-subject data, but my current guess is that I have no way of analyzing a combined within-subject score since an identifier/ID is missing. Is there a different way to how to do significance testing between groups for a overall score? Given are 2 tables (t), t1 has first ratin...
I am new to neural networks. I am studying back propagation and saw different references. for a layer $k$, some references state that the error $\delta_j^k$ for neuron $j$ at $k$th layer is $$ \delta_j^k = \dfrac{\partial E}{\partial a_j^k} $$ while some other references state $$ \delta_j^k = \dfrac{\partial E}{\partia...
I am going through a Machine Learning tutorial, where the problem statement is expressed using Bayes theorem. Particularly, $P(y|Data) = \frac{P(Data|y) P(y)}{\int P(Data)}$ The data part is particularly confusing to me as is meant to be a normalizing constant, however, it does not depend on $y$ from the above definiti...
I'm currently working on a mobile app that offers premium subscription plans. I'm interested in testing whether increasing the price of the subscription might result in a significant increase in revenue even though the number of subscriptions might drop. I have data on the number of subscriptions and revenue for two ra...
I am analysing HR data where event is leaving (so right-censored and many more survivors than not). My Kaplan-Meier survival curves all look like this (and many of them wilder, so Cox is not an option): data("Melanoma") fit <- survfit(Surv(time, ulcer) ~ status, data = Melanoma) ggsurvplot(fit) I am aware from the lit...
I've recently started an introductory machine learning course and the first topic we have covered is prinicpal component analysis (PCA) and overall I am finding the whole topic quite tricky to wrap my head around. I understand that the goal is to reduce the dimensionality of the data, but how we interpret results has m...
I am using OLS on log(outcome) to predict future outcomes.  My question is which method of correction to backtransformed predictions will least bias the modeled effect of change in predictor values.   I know that transforming outcomes is fraught.  An answer of “don’t transform” or “don’t use OLS” is often or even usual...
From Causal Inference In Statistics, A Primer by Judea Pearl, I learnt that for linear SCMs (Structural Causal Model), the arrow strengths can be related to the appropriate linear regression coefficients. For example, in SCM - $Z:=U_1$ $X:=aZ+U_2$ $Y:=bX+cZ+U_3$, where $U_1,U_2,U_3$ are assumed to be independent of eac...
If we have two variables, $X$ and $M$, which follow a multivariate normal distribution, have a mean of 0, are correlated ($r_{XM}$), and have known reliabilities ($\rho_X$ and $\rho_M$), then the reliability of the interaction term $XM$ ($XM = X * M$) is: $\rho_{XM} = \frac{\rho_X*\rho_M + r_{XM}^2 }{1 +r_{XM}^2} $ Se...
I have p-values from several tests (k~50) that I'd like to combine. I don't have a model of their correlation structure. They aren't independent. In the worst-case scenario, my effective sample size might be more more like 15. I'm dealing with marginally significant results (About 10% remain significant after a two-sta...
I have a complicated data set which was made by a multistage stratified cluster design. I had originally analysed this using glm, however now realise that I have to use svyglm. I'm not quite sure about how is best to model the data utilising svyglm. I was wondering if anyone could help shed some light. I am attempting ...
This is a question I have after seeing Q1 of this question. There are a total of 6 people including you and your friend, and you guys are about to sit at a round table. The method of counting the number of sitting positions makes sense to me in this answer, i.e. First there are 6 ways for you to take a seat, 2 ways fo...
I am reading about the bias-variance decomposition from An Introduction to Statistical Learning with Applications in R (Second edition at page 34). It states that $$Y = f(X) + \epsilon$$ where the term $\epsilon$ is random. Does $Y$ vary? It then calculates the expected test MSE at $x_0$ as: $$ E (y_0 - \hat{f}(x_0))^2...
I would like to simulate a structural equation model in R and fixing the mean and standard deviation for each variable. I attempted to perform a simulation in Onyx, but I can't fix this parameters My model should include: Three endogenous variables Four latent variables Eight exogenous variables (two for each latent va...
I would like to use the cube root transform on data in order to preserve the sign of the original data and 0 values. The data are percent differences between control and treatment groups, (treatment - control)/control left in decimal form. I wondered how the cube root transform would affect fractional values. If I ha...
In this answer is shown that the variance of the sample variance is $$ \text{Var}(S^2) = \frac{1}{n} \left(\mu_4 - \frac{n-3}{n-1}\sigma^4\right) $$ where $\mu_4$ is the fourth central moment, ie $E[(X-\mu)^4]$. My question is, what prevents the variance from being negative? As far as I know, it can happen that $\mu_4 ...
Let’s say I want to measure the correlation between two variables, both measured on a ratio scale. Let’s say however that the relationship between the variables isn’t linear (so I can’t calculate Pearson’s r because one of the assumptions is linearity). Let’s also say that the relationship between the variables isn’t m...
I'm having a lot of issues trying to derive an equation for the relative error in the following problem. Someone has used the following incorrect formula to perform Neyman allocation $n_{h,e}=n\frac{W_hS_{U_h}^2}{\sum_{h=1}^{H}W_hS_{U_h}^2}$ instead of the correct formula given by $n_{h,o}=n\frac{W_hS_{U_h}}{\sum_{h=1}...
In Bayesian inference, the gamma distribution is the conjugate prior to many likelihood distributions: Poisson, exponential, normal (with known mean), etc. The update rule seems to always add to $\alpha$ and $\beta$. For example, if: $$ X \sim \Gamma(\alpha, \beta)\\ Y\sim Poisson(X) $$ then $$ X|Y \sim \Gamma(\alpha +...
I want to measure the associations between a number of variables and all of them are measured on a ratio scale. If I am to run Spearman's correlation, can I just run it on the variables as is? Or do I have to rank them first? So to give a simplistic example, if variable 1 is IQ score (subject 1 has a 100, subject 2 has...
It is often the case that the predictors are variables that take continuous or categorical values in machine learning. However, if the predictors or some of them are vectors, how can we deal with it? Take interpolation in traditional practices for an example, we use the neighbors to predict the values at the center loc...
I have a question about correlations. Let's say I want to measure the associations between a number of variables and all of them are measured on a ratio scale. I know I can use Pearson's $r$ correlation to do this, assuming the assumptions to run Pearson's correlation are met (i.e., normality, linearity, no outliers, h...
I want to draw the same exact graph in R. However, I want to consider two options: (1) with one x axis for each of the genders & (2) two different xaxes for each of the gender. Here is also the link for where I found the image: https://rpubs.com/WhataBurger/Anovatype3 Thanks for sharing the knowledge.
On my current project, I have to form four or five clusters describing different types of banking customers. The data is based on a survey of around 3500 participants and contains more than 250 variables. Almost all variables are on a likert-scale, e.g. "My bank should provide branches nearby" or "Sustainable investmen...
I'm a beginner in stats and I have a very basis question on GLM. Suppose Gaussian distribution. GLM tries to do this: $$g(E(y|X))=X\beta$$ where $g$ is a link function. But if I transform $y$ before regression: $$y'=g(y)$$ and do this: $$E(y'|X)=X\beta$$ now this is an ordinary linear regression. So my question is how ...
I want to run a binary logistic regression and I guess some variables have nonlinearities. So I want to use splines method to understand affect of each range in a continuous variable. When I 'guess' that nonlinearities it will enough to using splines method or I should run a 'test' on variables?
I have a question about correlations. So let's say I have 9 variables: Y1, Y2, Y3, X1, X2, X3, X4, X5, and X6. All of the variables are measured on a ratio scale. Let's say I want to measure the correlations of each Y variable with each V variable (so 18 analyses in total). I'm looking at my data to see if it meets ass...
Let $X_n$ is Markov chain for $n\geq 0$ and state space is $E=\{1,2,3\}$. One-step transition probability matrix is $$ \left[ \begin{matrix} p_{11}& p_{12}& p_{13}\\ p_{21}& p_{22}& p_{23}\\ p_{31}& p_{32}& p_{33}\\ \end{matrix} \right] $$ how can I solve $P(X_n =1)$? As far as I know, if state space is $E=\{...
I have framed a classification problem as follows: I have $N$ items, and wish to predict a set of relevant tags for each out of $M$ tags. An item can have anywhere from 0 to $M$ applicable tags. To use sklearn.metrics to measure a model's performance on this task, for every item I use a multi-hot encoding of it's predi...
Assume x,y,z are dependent variables. I want to sample z from p(z|x,y) but direct sampling is impossible. Instead, I can sample z from p(z|x) and p(z|y) independently. But I would like to sample z using all information (x,y) I have. If I sample z from: $z \sim \dfrac{p(z|x)p(z|y)}{\int_{z'} p(z'|x)p(z'|y)dz'}$ would th...
I understand that kernel methods are used to exploit nonlinearity in a data set. For example, let $\mathbf{x} = \begin{bmatrix}x_1\\x_2 \end{bmatrix}$. We can define the feature map $\phi(\mathbf{x}) = \begin{bmatrix}x_1^2 \\\sqrt{2}x_1x_2\\ x_2^2 \\ \end{bmatrix}$. I understand that once we compute $\left <\phi(\math...
This question has probably been asked before but I couldn't find it so here we go. Let's assume we have a finite statistical population of $N$ members $x_1... x_N$. Then for sure $\mu = N^{-1}\sum_{i=1}^Nx_i$ is a fixed parameter of this population. How does it make any sense to assume $\mu$ has a certain distribution ...
In a cox regression, modelled by the coxph function in the survival package, I got the following output for group only: coef exp(coef) se(coef) z Pr(>|z|) Group2 0.2972 1.3461 0.1714 1.734 0.083 . However, when I add a covariate, the effect of group gets significant: ...
I was watching a Youtube video about Confidence Intervals and came across a slide that threw me: I get that the blue region is $1-\alpha$ (often 0.95 in practice) while the bits to the edge are each $\frac{\alpha}{2}$ (often 0.025 in practice). However, I don't understand the tick marks down the bottom. Why can't they...
the closed form solution of the weights for the ordinary least squares problem is given by $\mathbf{w} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{y}$. This is the almost 'universal' form that I have found in all derivatives and textbooks, except for one source. In this source: https://www.cs.cornell.edu/courses...
I have a GLM with (quasi)poisson family. My dataset has 3 variables: rate_data rate_benchmark X So fitting the model: model <- glm(formula = rate_data ~ offset(log(rate_benchmark)) + X - 1, family = (quasi)poisson, data = data) model_null <- glm(formula = rate_data ~ offset(log(rate_benchmark)) - 1, family = (quasi)po...
I'm running an bayesian AB test to compare a normally distributed metric with unknown mean and variance between two groups. My goal is to compare the average value of the metric between the two groups, similar to a t-test. A toy example is shown below: library(bayesAB) # Creating metrics from two groups set.seed(1234)...
I apologize if my questions are too naive, I'm just approaching the subject. Let's say that I have a population following a probability distribution with mean $\mu$ and standard deviation $\sigma$. I want to estimate $\mu$. I therefore take a sample $X_1 ,...,X_n $ from the population and compute the average $\overline...
The paper 'Deep Learning with Differential Privacy' proposed DP-SGD and moments accoutant. The authors consider the NN layers separately, which allows they set different $C$ and $\sigma$ for different layers. But I don't understand how the layer-wise DPs are composed in DP-SGD. It seems the authors didn't handle the pr...
I'm working on an academic project. The aim is to forecast some cointegrated time series. I retrieved the data from 2008 to 2018 of the observations of 30 time series. I performed a unit-root test to each of them and 16 of them are integrated of order 1. Then I performed a Johansen test to this multiple time series and...
"An interpretation based on coefficient magnitude also suggests that an increase of x (independent variable) by one standard deviation is associated with the increase of y (dependent variable by 2.63% of its standard deviation." Could somebody explain to me the formula for calculating 2.63%? The coefficient of the x is...
I am about to use geographically weighted random forest (GWRF) for regression prediction (I want to predict a continuous raster). I have one dependent and 4 independent variables. One of my independent variables is a categorical raster (several land use categories, named "1", "2" etc) while the rest of the variables ar...
In my machine learning course we have covered the key ideas behind principal component analysis. To round this part of the course off, we have learned to interpret the results of PCA, specifically using a biplot. Have I missed something, or is PCA mostly something that is used in conjuction with other ML methods to obt...
I have some datasets where the distribution of errors is expected to be highly skewed. I'd like to do a linear fit that takes this into account. Here is some synthetic data that shows this: import numpy as np import scipy.stats import matplotlib.pyplot as plt n = 1000 slope = -30 x = np.random.normal(loc=0, scale=2, ...
Suppose I would like to determine the causal effect of $X$ on $Y$, where the relationship is confounded by $U$, but I measure $W$, which is a mismeasured proxy of $U$, as in this paper. That is, $$U \sim N(0,1)$$ $$W = \alpha_1 U + \sigma_1 \epsilon_1$$ $$X = \alpha_2 U + \sigma_2 \epsilon_2$$ $$Y = \beta X + \alpha_3 ...
Let's say I have two variables and I want to measure the association between them. I've been reading up on running Pearson's correlation vs. Spearman's. I understand that Pearson's measures linear relationships and Spearman's measures monotonic relationships. Here are several thing I've concluded: 1) In cases in which ...
I got the following significance after running GAM, does that mean that the pattern of my 2 groups of data in comparison_types are distinct? library(gam) # smooth for stage and an additive effect for comparison_type b <- gam(ssim_exp ~ s(stage) + comparison_type, data = df) summary(b) Call: gam(formula = ssim_exp ~ s(...
First I read this definition which introduces $X$, $Y$ and $Z$ as sets of random variables. Definition (Pearl 2009) Let $V = \{V_1, V_2, \ldots \}$ be a finite set of variables. Let $P(\cdot)$ be a joint probability function over the variables in $V$, and let $X$, $Y$, $Z$ stand for any three subsets of the variables ...
I have a question regarding the interpretation of coefficient magnitude (not coefficient) in linear regression when the dependent variable is log-transformed. When the y is not log-transformed the interpretation is like the following an increase of x (independent variable) by one standard deviation is associated with t...
I am using GLMMs in R to examine the influence of various continuous predictor variables (x) on several biological counts variables (y). My response variables (n=5) each have a high number of zeros (data distribution), so I have tested the fit of various distributions (genpois, poisson, nbinom1, nbinom2, zip, zinb1, zi...
I measured blood glucose for a sample of 500 participants at baseline and one year after. My issue is death. I already did a Cox survival analysis for the first blood glucose with my 500 participants. What type of statistical analysis should I do for the second measure? It's not the same number of my sample size init...
In the paper Small-sample estimation of negative binomial dispersion, with applications to SAGE data, section 4.1 Conditional maximum likelihood: For RNA sequencing data, assume the counts for a single tag across $n$ libraries is a negative binomial random variable. Consider $Y_1, \cdots , Y_n$ as independent and $NB(\...
How can q(z,l,u,c|x) be factorized to q(z|x)q(l|x)q(c|z)q(u|c,z)? I don't know what assumptions are behind this equation, which is I want to know. I think normal chain rule of probability is in the process, but only chain rule can't derive the formula. What I know is that z, l, u follows gaussian distribution, and c fo...
I have nearly 30 variables going in to a large PCA, but the variables really fall into two conceptual categories. I want to test whether leaving all the variables to correlate freely with one another is a better fit than running two separate models for each concept. I have "behavior" and "cognition" variables, and I do...
Good morning, i am looking for some help with longitudinal data with time-varying binary exposure in linear mixed model. Outcome is continuous variable. I am going to use R and the lme4 package. I want to identify association between time varying smoking status and hemoglobin A1c with random intercept and random slope....
Let $X \sim \mathcal{N}\left(\mu, \Sigma \right)$, and let $A$ be a symmetric matrix. My understanding is that the Rayleigh quotient of vector $X$ is given by: $$R=\frac{X^T A X}{X^T X}$$ I've been trying unsuccessfully to find an expression for the expected value of R. This seems to be a very well studied and relative...
I am working with bounded Pareto distributions and was wondering whether I can say anything about the distributions of linear combinations of Pareto RVs? Suppose the PDF $f(x; \alpha_i, L_i, H_i) = \frac{\alpha_i L_i^{\alpha_i}x^{- \alpha_i - 1}}{1 - \left(\frac{L_i}{H_i} \right)^{\alpha_i}}$ where $\alpha$ is the shap...
The Karlin-Rubin Theorem states that for $H_0 \colon \theta \leq \theta_0$, $H_1 \colon \theta >\theta_0$, for distributions that have monotone likelihood property, test given by thresholding the sufficient statistics $T$ is the uniformly most powerful. I understand that for each $\theta_0 < \theta_1$, the likelihood r...
Suppose $Z$ is a binary (0 or 1) variable. I do not know how to prove the following $$ \frac{E[Y \mid Z=1]-E[Y \mid Z=0]}{E[D \mid Z=1]-E[D \mid Z=0]} =\frac{\operatorname{cov}(Y, Z)}{\operatorname{cov}(D, Z)} $$
I am working on a spatial time series analysis project. The task is to study the spatial distribution of point features (e.g., crime events, traffic accidents) over time. I aim to find the places with the following characteristics given the spatial distribution of point features across time: places with consistently h...
I am running an autoencoder model and have to select my activation function. I have structured data (i.e. not an image) which comprises continuous variables which have a range of -4 to +4 for each continuous variable. Which activation function should I use for this? As background, I am using autoencoders as a dimension...
I have a machine learning classifier model and I want to evaluate how its performance on the test set depends on stochastic effects during training. Such effects happen, for example, because the weights for the model get initialized randomly, or the GPU's architecture is different, which can have an effect as well. Ide...
A meta-analysis reports its results as RR and relative SE. I need to convert these to logarithm response ratio and have SE(lnRR), instead of SE(RR). How do I convert SE? I don't think it's correct to do the ln of SE (also because the SE becomes negative).
I conducted a one way anova followed by a tukey-test in Rstudio and used a compact letter display to add letters of significance to a ggplot. After a positive Grubbs-outlier-test I removed an outlier from the dataframe and ran the tests again. I saw that the Treatments LFs and LK still share the Tukey-letter "b" althou...
Problem statement Show that the Boolean function (x1 ∧ x2) ∨ (¬x1 ∧ ¬x2) is not linearly separable (i.e. there is no linear classifier sign(w1 x1 + w2 x2 + b) that classifies all 4 possible input points correctly). Assume that “true” is represented by 1 and “false” is represented by −1. Show that there is a linear sep...
I want to estimate the distribution of a variable in certain subgroups of the population based on pooling of aggregate data reported in various observational studies. For simplicity, assume there is a variable $y$ and an explanatory variable $x$, e.g. age, then for each observational study I have only aggregate data: $...
How to calculate a suitable sample size for reducing the standard error by a factor of 4? For instance if I have sample size of 1000 how much would I increase it to have a standard error reduced by 4?
Suppose we have two features $x_1$ and $x_2$ and want to predict $y$ using a Bayesian framework (with isotropic gaussian noise). Assuming a gaussian prior and likelihood we have an analytical formulation for the parameter posterior distribution. Suppose I generate two predictive distributions, one using a model contain...
I have built a linear mixed model (rt.m6) with 2 fixed factors, namely condition and suffix, which also interact with each other. However, my experimental design isn't fully crossed, meaning that not all suffixes are included in all the experimental conditions. When running the model (rt.m6), R is dropping 1 column/coe...
I would like to know how to calculate the Cox-Snell residuals in Cox regression, in case there are multiple deaths per time, using Efron's approximation. In particular, how does the calculation of the "estimated cumulative hazard and survivor functions" vary using the Efron approximation?
I have an object detection model that outputs bounding boxes and probabilities associated with them. The probability expresses the chance that the object found is a tumor. I have noticed that the default 0.5 probability threshold works well for small objects but is heavily underestimated for small ones. I would like to...
If my sample variance of a random sample from a $\mathop{\mathcal N}\left(\mu,\sigma^2\right)$ distribution is $$S_2^2=\frac{1}{n}\sum_{i=1}^n{\left(X_i-\bar{X}\right)}^2,$$ then $$Q \mathrel {:=}\frac{\sum_{i=1}^n{\left(X_i-\bar{X}\right)^2}}{\sigma^2}\frac{n}{n} = \dfrac{nS_2^2}{\sigma^2}.$$ Does this mean that $Q$ ...
David Spiegelhalter in Art of Statistics states the below analysis would be problematic. Can anyone give an example (real or simulated) of how this would be a problem? Measuring two groups at baseline and after an intervention, and saying the groups are different if one is significantly changed from their baseline, an...
I have a large set (10^6) of very small sets (5-10 entries) of numbers. For each of them, I want to compute a sensible average measure. An example might be this: $$ x = [-2, 5, -1, 3, 100] $$ Because of the nature of the data, I know that the 100 is not an outlier, but it should also not be taken too seriously (hard to...
What is the maximum number of pairs allowed in a Spearman correlation to calculate the p-value in order to check the significance of the correlation coefficient? As per the articles I've found online and their formulae that I tried, I'm getting a p-value of above 1, I want to know where I'm going wrong. My data sets' s...
I am comparing the same continuous variable (age) for two different groups. I would like to know if this variable has significant differences between the groups. As I have high sample sizes for both groups, I am also calculating Vargha and Delaney's A to obtain the effect size. The thing is I would like to know if ther...
Assuming that $a_t$ is a White Noise process with 0 mean and $\sigma^2$ as variance I know how to prove $E(Z_t)$ = 0 but does anyone know how to prove the variance and covariance parts (for $k\neq0$)? Thanks a lot
In a simple linear regression: Assume that the leverage of a specific data point equals 1 (maximum leverage), from my understanding, it also means that the variance of the estimated error (e) of that particular data point equals to 0. does it also mean that the value of e must equal to zero (the prediction matches perf...
We know that if a random variable say x ~ Gamma(a, b), then its probability density function is $ \propto x^{a-1} exp^{-bx}$. In a Bayesian hierarchical model, for example $Z_1, \cdots, Z_n |\theta \sim iid \; Gamma(r, \theta)$, (r known)$ ; $\theta \sim \; Gamma(a, b)$, the full conditional distribution of $\theta$ ...
I would like to conduct power analyses related to an experiment conducted under a triple difference estimation strategy. However, it doesn't seem like there is a lot written on this subject. Ideally, someone can point me to a closed form solution of the appropriate sample sizes needed for each treatment arm as well as ...
I've been working on a meta-analysis off and on for a while. I am at the analysis stage. Meaning that all relevant effect sizes have been computed. However, I need help understanding what to do when a study reports more than one relevant comparison but some of those comparisons are not significant. For example, let's s...
I am trying to solve the following problem of probability: "In a certain factory, there is an alarm system composed of 5 sensors that work independently to detect fire. The probability that a sensor works well, that is, warns people when there's fire is $0.8$. If two of the sensors don't work well, which is the probabi...
Not sure whether what I’m after is possible, but thought I would ask. I am trying to create a database with a dichotomized dependent variables and a bunch of binary (1/0) independent variables. I'd like to pre-set some associations between the independent variables and the outcome. Doing so is relatively easy - I basic...
I would like to estimate the following model in EViews using ML: y_i = x0 + x1*beta_i + epsilon_i I get three values as output: C(1), C(2) and C(3) I think the meaning of C(3) is that it is the mean variance of the residual. But I also get a standard error for C(3) as well as a p-value. My question is: What do these tw...
I have a one-hot vector $y \in \{0,1\}^{n}$ giving the case/control status of a group of genetic samples. I also have a genetic vector $G \in \{0,1,2\}^{n}$ and a vector of covariates $K \in \mathbb{R}^{n}$. I'm hoping to show that the matrix $G$ helps explain $y$ even in the presence of $K$, so I first run a null logi...
I have a dataset of about 1000 patients with cancer and I was interested at looking at competing events. I plotted out the cumulative incidence curves for deaths from cancer and deaths from other causes The curves subjectively look very different, but I was wondering is there a statistical test that I could use to com...
I have a tricky data set for factor analysis with 71 ordered likert-type items. The items have five levels. I'm using psych::fa. I use ``avaan::lavCorto get a smoothed covariance matrix. to avoid errors withpolychoric`. The base analysis I've tried is: test1 <- fa(postImputedCor, nfactors = 11, ...
I am working on a computer program. The program uses an open-source method to generate a score of how well details of a smaller image are found in a larger image. I am trying to find a cut-off value that will indicate if the smaller image is contained in the larger image. I suspect there will be different cut-off val...
We can show that the regression for two variables can be written as $$ E(\mathbf{Y} \mid \mathbf{X}=\mathbf{x}) = \alpha + \beta X $$ So for example if I consider let the gaussian vector Z=(X,Y) It means we have So Is my reasoning correct ?
I would like to produce this type of figure from the article "Thinking twice about sum scores". Figure 3 shows the path diagram of a congeneric model for the same data used in Fig. 1. The major difference is that the loadings from the latent true score to each observed item score are now uniquely estimated for each it...
I am trying to find shellfish densities for a field-based aquaculture program and wanted to understand the impact of reef structure and site on the response. This experiment only has a sample size of 36. I looked at the distribution and log-transformed it for normality before running a linear model: model<-lm(data$log...
The following is a question posted to Stack Overflow, but the answer is more to-do with statistical theory than software. I am reposting it here because this is a more appropriate venue, and because similar questions have remained unanswered on this site for 8+ years. Poisson regression can be fit to raw data or can ...
Actually I want to use "ns" method but since I have a problem (Error in visualize splines logistic regression with ns) to visualize log odds with "ns" method I forced to use "rcs" method. I understand how "ns" is working but I am confused by knots and coefficients in "rcs" method.
Problem in my book: A class of n students takes a test consisting of m questions. Suppose that student i submitted answers to the first m(i) questions. a) The grader randomly picks one answer, call it (I,J), where I is the student ID number (taking values 1,...,n) and J is the question number (taking values 1,...,m)...
I wonder how do u decide if family = gaussian() or family = cox.ph(link='identity') or family = binomial(link="logit") in GAM ( generalized additive model ) is suitable for the analysis? For my case, my dependent variable is in the form of percentage from 0 - 100%. Stage is a form of time variable. comparison_type is t...
I'm working with a OLS model that includes dummy variables (quarters of year). Here's what I would specify it: $$y = \beta X + \gamma_1Q_1 + \gamma_2Q_2 + \gamma_3Q_3 + \epsilon$$ However, in the material I'm reading, the model specification is instead like this: $$y = \beta X + \gamma_1Q_1 + \gamma_2Q_2 + \gamma_3Q_3 ...
This page has a margin of error calculator: https://www.surveymonkey.com/mp/margin-of-error-calculator/ Below, it gives a detailed example. The example conforms to my understanding of MOE. However, their calculator does not. Specifically, the calculator does not require p (the ratio of positive responses in the sample,...
I am using R to investigate the effect of tied values on rank-based correlation statistics I wish to simulate correlated bivariate standard normal data with some specified proportion of tied values (in, say, X). Consider the univariate standard normal distribution, One way to generate ties is to round the data. However...