instruction
stringlengths
9
38.7k
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...
So I'm reading the Guihenneuc-Jouyaux & Robert paper from 1998 about discretization of Markov Chains in which they claim that a naive discretization of a continuous Markov chain is not usually a Markov chain. I can't find a way to prove it, and i just need the proof that a naive discretization does not lead to a Markov...
I have gathered 41 variables that are supposed to explain dependent variable Y in a dataset. Is the following reasonable? First, I will conduct EFA, reduce the dimension, conduct CFA to confirm/reduce. and then multiple linear regression be logical on the outcomes of the CFA? with the goal of finding a base model in th...
I am doing a study to measure the level of agreement between two pieces of medical equipment (one gold standard one and a new device). I will measure the agreement using weighted Cohen's kappa and other correlation statistics (Spearmen or Pearson's correlation). The two devices will be taking measurements for a group o...
I am interested in the audio classification problem. After labeling the audio recordings I have in Praat software environment, I extract the MFCC features from each labeled frame and create an SVM classifier model from random 80%-20% separated data set. The results are quite good on the 20% separated test data, the tes...
Consider a regression task (e.g. predicting house prices) with a given train and test sets. We start with constructing a linear regression model, in which we assume $y_i=X^T\beta+\epsilon$ with $E[\epsilon_i]=0$ and usually $\epsilon\sim\mathcal{N}(0,\sigma^2I)$. As we know the real value of the dependent variable $y$,...
For the context, I was writing my BSc thesis on the topic of Linear Regression through the Origin (RTO). My goal is to analyze RTO, and find the appropriate use cases for it. In the case of simple linear regression, we know that we can take partial derivatives of log-likelihood function $l$ to get the maximum likeliho...
I am performing a linear mixed model to asses whether pain scores differ between surgically treated patients who tested positive for a bacterial culture versus negative. I have 5 follow up moments but do not know if I should only include the follow up moment as a "repeated measure" or as a fixed factors as well. As var...
I've seen previous questions here that the sample mean can be considered an unbiased estimator of the population mean. e.g.1, 2. While the examples seem to refer to independent sample points, it seems to me that their argument should also be true for autocorrelated data (or for that matter for any data). This intuition...
Background I am interested in the distribution of $$\theta_0=1-\prod_{i=1}^n(1-\theta_i)$$ where the $\theta_{i>0}$ are iid beta random variates: $$\theta_{i>0}\sim\text{Beta}(\alpha,\beta)$$ In my case $\beta\gg1\gg\alpha$ and $n\gg1$, so I used the following transformation: $$\phi_i=-\ln(1-\theta_i)\\\theta_i=1-e^{-\...
I have following dataframe: Impute Technique Mean Std SMAPE 1 EINSTEIGER_ROH 0.00 0.00 NaN 6 MEAN 20.18 8.83 123.40 5 KNN_IMPUTER 20.30 8.79 126.56 7 MEDIAN 22.12 9.30 112.35 3 INTERPOLATE 28.91 10.56 120.24 2 FFILL 35.67 11.27 112.86 0 ...
I'm taking a course in advance statistics and we have to prove whether the following expression is true: $E[zz^T]=E[z]E[z^T]$. I am assuming it is not, since the formula of the covariante matrix is $Cov(z)=E[zz^T]-E[z]E[z^T]$. However, I don't know how can I prove that.
We want to run Bayesian statistics on 2 variables on which the H1 hypothesis to be directional for both of the variables at the same time (ex. A>0 and B<0), while the rest of the case to be H0. We are not sure what is the best way to do it and would really appreciate if anyone has some experience or could give us a hin...
Is there a proper name for the following misfit quantification? misfit=√{∑[(xi−xi')^2/(n*i^2)]} where n is the number of data points xi−xi' is the ith residual, and i is the standard deviation (uncertainty) of the ith data point.
I am performing Bayesian Optimization to select a hyperparameter configuration for my supervised learning model. I understand that with each additional hyperparameter that I choose to optimize, the search space grows exponentially. My initial idea was to increase the number of search iterations exponentially as search ...
I am trying to replicate a study that created a structural equation model (SEM) to explain effects on the intention to reduce meat consumption. The interactions of the latent variables are as follows: mident affects att, norm, pbcon, and redint. att, norm, and pbcon also affect redint. att, norm, pbcon, and redint wer...
I have a model that looks into a 3-way interaction between 2 categorical variables (Group: Gr. A, Gr. B, Gr. C; Area: A1, A2, A3) and a numerical linear interaction (Distance from center - ECC: 1, 2, 3) on participant accuracy. Formula = lmer(Accuracy ~ Group + ROI + Group:ECC:ROI + (1+ECC|ID), data =Ecc, REML = TRU...
I am trying to model my proc surveyreg from SAS in R, because their survey package provides an IV option that I intend to use. proc surveyreg data=df varmethod=brr(fay); class IC152Q02HA; weight w_fstuwt; repweights w_fsturwt1-w_fsturwt80; model score_m = IC152Q02HA active_l passive_l gender klasse_8 indvandrer ESCS ...
I have a Gibbs sampling algorithm, for which I would like to estimate burn-in time. The model isn't hugely complex, and I run sampling for 1000 iterations. One approach I took was tracking the running mean/standard deviation with increasing samples. This showed me that approximately 100 samples were needed before the m...
I am conducting a Monte Carlo simulation to assess how OLS homoskedastic standard errors (i.e., based on $\sigma^2(X^\prime X)^{-1}$) change as serial correlation changes in a bivariate linear regression. Theoretically, OLS standard errors should be too large (relative to the true standard deviation of the estimate) wh...
I am trying to calculate sampling error for a questionnaire that was answered by some of the participants in a program (say about . I want to calculate the sampling error for the proportion of the respondents that answered "yes" to a "yes/no" question. I have seen some sites that use this formula for the calculation: S...
There is a large concern about using control variables that are not predetermined (i.e. may be affected by a treatment), in DID and Matching approaches. How is this in an RD approach after the newest advances? Should we hesitate to add controls that may be affected by the treatment? Take a pension reform as an example,...
I was reading through Wasserman's All of Statistics and I came across this property in the Bayesian statistics chapter: I think I don't really get what is supposed to be the intuition behind it, and the "appropriate regularity conditions" even less so. I would get it if a connexion between the MAP and the MLE existed ...
When extrapolating a regression line a bit further from the observed range of predictors, I get values way over what seems expected from the fitted model. If the intercept and the slope create a line that should go through the original dataset, I wonder why the predicted new values do not just lay close to an extension...
When applying Gaussian Processes to applied problems, the choice of length-scale parameter parameter for the radial basis function (RBF, ie Gaussian) kernel makes a big difference. In practice, I have found that instead of using a single length-scale parameter, then optimizing it via cross-validation, it often works we...