instruction stringlengths 9 38.7k |
|---|
I am having problems understanding how I can evaluate a set of (Monte Carlo) simulations based on randomly distributed points.
Assume you simulate a random point pattern in a square and you plot the cumulative distribution function (CDF) of the nearest neighbor distances. Repeat the simulation, let's say 10 times, and ... |
Let's say our full model is a mean centered:
$$ y= B_0 + B_1(x_1-\bar x_1) + B_2(x_2-\bar x_2) + e$$
I know $B_0$ works out to be equal to $\bar{y}$, and so $SS_{Reg}(B_0) = 0$
My question is if we remove $x_2$ from the model, and use a new model does the variability of the estimator for $B_1$ always decrease from the ... |
I have a bimodal distribution which is an equally weighted mixture of two normal distributions with known means and standard deviations. I can easily compute a two quantile values using the percent point function for each normal distribution, but how can I obtain the quantile value for the combined bimodal distribution... |
I have a data set where my binary dependent variable is rarely equals one (about 0.3 % of all observations). My goal is to predict the dependent variable based on a few variables and a constant term. I was wondering whether a penalized logit regression approach could make up for the fact that I have only a few events. ... |
I have a conceptual question.
I have a dataset with a categorical response variable (integers from 1 till 10) and numerical predictors (independent variables).
I want to be able to predict the value (rank, perhaps) from 1 to 10 depending on the values of predictors.
Logistic regression with a family = binomial will not... |
I'm working with the 'mgcv' package in R and I just want to know if I am going about the right way of fitting a functional autoregressive (FAR) model. The FAR model is represented as
$$Y=f_1(x.1)x.1+f_2(x.1)x.2$$
For the case of my data, I am using the gam function in R from the mgcv package where $x.1$ and $x.2$ are t... |
Could someone please check if my model fit is correct??? Thank you!!!!!!
Here is the background: participants fill out one baseline survey and seven identical follow-up surveys during a week. I have a variable BN in the baseline, DN and DE in the followup. In summary, each participant has a baseline measure BN and 5-7 ... |
Elements of Statistical Learning notes that the $K$-fold cross-validation error is defined as follows where $\hat{f}^{-\kappa(i)}$ is the fitted function with the fold $k$ corresponding to observation $i$ removed (7.48):
$$\mathrm{CV}(\hat{f}) = \frac{1}{N} \sum_{i=1}^N L\left(y_i, \hat{f}^{-\kappa(i)}(x_i)\right)$$
In... |
I am wondering that how the scores in Select K Best be calculated? I applied the SelectKBest with f_regression as score function. According to the documentation of SelectKBest(https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectKBest.html) and f_regression(https://scikit-learn.org/stable/m... |
Suppose we have estimated parameters $\hat{\beta} = [\hat{\beta}_{0}, \hat{\beta}_{1}, \hat{\beta}_{2}]$ from a level-level regression:
$$\hat{y} = \hat{\beta}_{0} + \hat{\beta}_{1}X_{1} + \hat{\beta}_{2}X_{2}$$
I want to use these estimates to set a prior on $\gamma_{1}$ in a Bayesian log-level regression:
$$\log(y) =... |
I am currently engaged in a project to try and compute standard errors for coefficients for multinomial logistic regression. I saw answers with code in this post here How to compute the standard errors of a logistic regression's coefficients which I believed very enlightening but I am wondering how it may extend to cla... |
Sorry if the question is naive. I have a problem where i should predict the probability that someone will make a claim given a bunch of predictors. Let's say that the claim can take a range of values between 0-5 and it's highly skewed (gamma distribution).
Could someone tell me what is the benefit of using ML logistic ... |
I am trying to understand the cointegration coefficient, $\gamma$. In the following case,
$$P_{A,t }- \gamma P_{B,t}= \varepsilon_t$$
where $P_{A,t}$ and $P_{B,t}$ are the prices of the assets A and B at time $t$, respectively. If $P_{A,t}$ and $P_{B,t}$ are I(1) and $\varepsilon_t$ is I(0), I can say that the assets A... |
As part of a meta-analysis of a disease in R, I received some feedback on the paper of which it is a part by external consultants. I cannot contact them again, and am confused about the advice they have given.
This is part of an undergraduate project, and I am relatively new to meta analysis in general.
I have been giv... |
Dataset: I have a hyperspectral dataset that consists 250 wavelength bands (x1,...x250) and corresponding reflectance measurements (y) for each band. Plotting X vs Y yields a spectral profile. I have a sample of n = 30 spectral profiles, each associated with a unique value Z (age). -- see attached images for spectral p... |
I am trying to solve this problem for when $X_1, X_2, X_3$ are independent $U(0,1)$-distributed random variables. The joint density function should then be given by
$$f(x_1,x_2,x_3)=
\begin{cases}
6, \; 0<x_1<x_2<x_3<1\\
0, \text{ else}
\end{cases}$$
My idea was to split the probability into different cases for when $... |
In the book of Imbens and Rubin, they discuss four common classes of assignment mechanisms
that fit into this framework: Bernoulli trials, completely randomized experiments,
stratified randomized experiments, and pairwise randomized experiments. Chapters 5, 6, 7, and 8 are then for completely randomized experiments. Ch... |
Given $a, b, c, d$ as numeric vectors of the same lenght (e.g. 2), and $\phi$ being a measure of linear correlation (e.g. Yule-Pearson correlation = Matthews Correlation Coefficient),
I would like academic references on this inequality:
$l[\phi(a,b),\phi(c,d)] \neq \phi[l(a,c),l(b,d)]$
where $l$ is any linear function ... |
After using PCA to reduce dimensionality, does PCA preserve linear separability for any linearly separable set? Will the data still be linearly separable after the transformation? I am thinking that it does preserve linear separability because the PCA just reduces the dimension and not the relationship between the poin... |
For example, no offense to anyone, I'd like to test if smoking is related to gender. Both smoking and gender are nominal variables.
I know I can use the Chi-Squared test to know if there's a relationship. But what test method to use to know the direction of the association? In other words, I want to know whether male o... |
Say your equation in a paper has 6 coefficients, one being your main interest (dummy for Disability == Having at least one disability: coded 0/1).
This estimation is done. BUT you want to dig deeper, and study how Disability, by its different types, affects Y (I have dummies for the different types: motor, visual, hea... |
I want to apply the Bonferroni correction to the following confidence interval:
Since $\alpha _{Bonf}\:=\:\frac{0.05}{k}$ and I have two groups, should I just substitute $\alpha$ above with $\frac{0.05}{2}$?
|
I'm currently studying Hamiltonian MCMC by reading Betancourt's 2014 and Neal's 2011 pedagogical papers, but I still don't understand why following a Hamiltonian trajectory for our proposed update guarantees us staying in the typical set, given that we started in the typical set.
I understand that this is essentially t... |
It seems that batch gradient descent is the traditional gradient descent, except that the objective function is in the form of summation?
|
This is a multiclass classification for an imbalanced dataset. I set the class_weight for this model to "balanced". I have a perfect training accuracy (1.0) and a nearly perfect testing accuracy (0.994). I looked at my confusion matrices but they predicted each class really well. Am I overfitting? I ran a cross val sco... |
How to get random numbers following "exponentiated gamma distribution"?
I tried to search some functions in R
and this is what i got:
https://rdrr.io/cran/Newdistns/man/expg.html
I want to know the exact code for generating random numbers following "exponentiated gamma distribution".
|
I am a learner of R and machine learning. I don't really understand caret's train function. To make it simple, for example, I want to build a model and get the internal validation result.
At the beginning, I don't use package caret.
# 1 prepare data_table
library(tidyverse)
library(mlbench)
data("PimaIndiansDiabete... |
I tried a linear model with interactions on my data ($n=95,840$ rows):
$ NUM_SITE : Factor w/ 9 levels "8647","8666",..: 3 4 5 8 9 1 2 3 4 6 ...
$ TEMPERATURE_AIR : num 6.29 6.13 6 7.05 8.16 ...
$ MonthNumber : Factor w/ 12 levels "1","2","3","4",..: 10 10 10 10 10 10 10 10 10 10 ...
$ HO... |
I am learning some insights of Neural network but I have some problem with the derivation of matrix for backpropagation. On an assumption that the formula for calculating for one node in a neural network, which as been vectorized, is $Z^{[i]} = W^{[i]}A^{[i - 1]} + B^{[i]}$.
For notation,
$Z^{[i]}$ is the score for lay... |
I want to generate a confusion matrix for class 2. There is a total of four input classes namely 0,1,2,3. In particular test data batch, there is no input class 2.
I have shown actual and predicted class, confusion matrix, and TP-TN-FP-FN values. Is this correct?
|
I have some daily timeseries (27 right now but will be over 200 when I get more data) for electricity consumption. For each hour I want to know what the probability density function looks like.
What I did so far is extracting the hourly values for each series, to know what values are present in each hour.
E.g.
12_am = ... |
I'm training a transformer based deep learning model in a regime where overfitting isn't a concern. Infinite training samples are generated on demand and never repeated, so there is no training dataset to overfit on. I've confirmed experimentally that performance on a fixed validation dataset is no worse than training ... |
this is my first question here :)
This was seen in a machine learning exam:
Suppose that $X_1 ...X_n$ are n i.i.d random variables with the following distribution:
$f(x;\theta) = \begin{cases}
\theta & x=-1\\
(1-\theta)^2\theta^x & x=0,1,2,...
\end{cases}$
Suppose that K is the number of times observat... |
How do we calculate unconditional P(A) given P(A|B,C), P(B), P(C), where B & C are independent?
I've gotten to the below, but I'm getting a negative number, so I think there's something I'm doing wrong.
P(A) = P(A|B=T,C=T)*P(B=T)*P(C=T) + P(A|B=T,C=F)*P(B=T)*P(C=F) + P(A|B=F,C=T)*P(B=F)*P(C=T) + P(A|B=F,C=F)*P(B=F)*P(C... |
I used three methods (M1, M2 and M3) to generate rankings, which is the result database.
result<-structure(list(n = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29), M1 = c(29L, 1L, 28L, 27L, 25L, 26L, 24L, 20L, 21L,
22L, 23L, 15L, 12L, 17L,... |
Forecasting: Principles and Practice, 3rd edition by Hyndman and Athanasopoulos states in section 2.8, Autocorrelation that, for trend in data the autocorrelation function has positive values that slowly decrease as lag increases.
The definition for autocorrelation function for lag $k$ is defined here as -
$r_k=\frac{\... |
I'm looking for a statistical test that could be appropriate for the following case:
I have a continuous variable (Y) and two categorical explanatory variables (A and B). There are significant differences in Y between the distinct categories of A and between the distinct categories of B. I'm particularly interested in ... |
I have solved the following problem and felt a little bit uncertain about the my answer.
Here is the problem.
Let $Y_i \in L_{2}$ for $i=1,2,...,N$ be a scalar random variable with iid with $\mu_Y=E(Y_i)$ and $\sigma_Y^2=var(Y_i) \lt \infty$. The sample average is defined as $\overline{Y_N}=\sum Y_i/N$.
Suppose that $... |
I am conducting a meta-analysis. Most of the studies reported raw numbers for each group, but some reported only odds ratio with confidence interval. Is there a way in r that I can back-calculate odds ratio to raw number?
If not, is there a way to use odds ratio with confidence interval for all studies to do a meta-ana... |
Let us consider the following Hierarchical Bayesian model:
$mu \sim\ Beta(1, 1)$
$k \sim\ Exponential(1)$
$a = k*mu$
$b = (1-mu) * k$
$theta \sim\ Beta(a, b)$
$y \sim\ Bern(theta)$
The above example is a simplification of the example in figure 2.19 in the book Bayesian Analysis with Python by Osvaldo Martin.
I use th... |
I have learned how to estimate a mean, variance or proportion from a sample.
and also, how to compare those for samples.
I'm understanding well why we might need to estimate or compare means or variance.
But the need of a specific formula for estimating or comparing proportions troubles me.
Please accept my question ev... |
How does one calculate the joint conditional probability?
We're making a Naive Bayes classifier for a set of black and white images, representing digits in the range $Y\in (0-9)$.
The point of using Naive Bayes is to reduce the number of required computations for $P(X_1=x_1,X_2=x_2,X_3=x_3|Y)$. We have been given, that... |
I am trying to understand the different Panel Data models and I am getting confused by the different terms that people use, i.e., Random effect models and Random effects estimators and Fixed effect models and Fixed effect estimators- are these 4 all different?
Is it the case that you can have a fixed effect estimator i... |
I am running a 3-way interaction linear mixed effect model using lmer function to see how reaction time varies as a function of age (older vs. younger), task (AJ vs. GJ), and repetition of images (4 in total). In my study, all the subjects viewed the same set of images 4 times (thus 4 repetitions) regardless of the tas... |
For example, I'd like to know if a person's age (a continuous variable) is related to whether the person drinks (a categorical/binary variable of Y or N). What method should I use to know
If there's a significant relationship.
The strength of the association.
The direction of the association - whether younger people t... |
I don't quite understand why, in conditional variational autoencoders (CVAEs) we condition on both the encoder and the decoder. In particular, in CVAE the objective function is defined to be:
$$\mathcal{L}_{CVAE} = \mathbb{E}_\textbf{z}[log \, p_\theta(\textbf{x}|\textbf{z},\textbf{c})] - D_{KL}[q_\phi(\textbf{z}|\text... |
My current understanding is that the MLE of a statistic is the mode of its posterior pdf under a uniform prior. The problem with this is that I don't think the posterior pdf needs to exist. The posterior cdf could be non-differentiable at points. In such circumstances is the MLE undefined or is there a more general def... |
I'm studying second order optimization methods in statistics, and I've run into a conceptual barrier that I was hoping someone can help me with.
First for some notation: consider a sample $X_1,\dots,X_n\thicksim P_{\theta^\star}$ [edit: $\theta^\star$ is the true, unknown parameter. I had originally denoted it as $\the... |
Is it possible to have the interaction of a time-constant continuous variable with a time-varying binary treatment in Fixed effect models? The outcome is a continious variable and I am doing a panel data study.
|
I'm working on a spam detection binary classification problem, but the dataset is very imbalanced (99% to 1%). I know there are techniques like over/under sampling, but I don't think it can be used in this scenario due to the extremely low raw number of positive class samples.
However, a large number of the samples in ... |
We have seen some definitions of common estimators and analyzed their properties. But where did these estimators come from? Rather than guessing that some function might make a good estimator and then analyzing its bias and variance, we would like to have some principle from which we can derive specific functions that... |
I'm trying to prove that multicollinearity doesn't introduce bias into a multiple linear regression model, but my proof seems to indicate the opposite.
If we represent the model as
$$y = \hat \beta_0 +\hat \beta_1x_1 +\hat \beta_2x_2+\hat \beta_2x_2+\hat \beta_3x_3 +\hat \beta_4x_4+\hat \beta_5x_5 + \epsilon $$
Assumin... |
This question is to give a general exposition of the relationship between goodness-of-fit statistics in regression analysis, to answer questions like this one.
Consider a nonlinear Gaussian regression model of the form:
$$y_i = f(\mathbf{x}_i, \boldsymbol{\beta}) + \varepsilon_i
\quad \quad \quad \quad \quad
\varepsil... |
I have two random variables $X\sim \mathcal{N}(\bar{x},\sigma_x)$ and $Y\sim \mathcal{N}(\bar{y},\sigma_y)$. I denote $\alpha_1$ the linear regression coefficient of $Y$ versus $X$, and $\alpha_2$ the linear regression coefficient of $X$ versus $Y$.
How do I find the distribution of the product $\alpha_1 \times \alpha... |
I have a dataset consisting of 6000ish employees and am trying to predict rapid employee turnover (someone who quits within 180 days) with a survival analysis model. Roughly 3000 have quit within 180 days and the other half either have not or haven't been employed long enough to know at the time the data was pulled. ... |
I'm pretty new to time-series forecasting and I hope that someone could help me out. Referring to Holt-Winters' multiplicative method in https://otexts.com/fpp2/holt-winters.html, how does frequency of time series affect the performance of the model's predictions? Specifically, is there a difference if I take m = 7 vs ... |
I am new to simulating data and want feedback on the proposed simulation given the biological relationships I am trying to simulate. Did I make a good model to simulate this data or can it be improved based on the relationships stated below?
Here is the simulation I developed:
#######################
# Treatment Variab... |
I'm asked to fit a polynomial model on the FTSE column from the EuStockMarkets dataset available in R. How is it possible to fit on just one column in this case? Is there another column of sorts in time series data that I can manipulate like time? i.e. Would time be a feature in predicting FTSE?
|
I have data that is sequential. Here, I am showing a toy example of my data in the following image:
I need to input the data into the model as groups of samples based on the class duration. To accomplish this, I determined the class's beginning and ending samples.
For instance:
I feed the data sample segment from S1 ... |
I conducted a simulation that had baffling results and would love your help understanding.
Context: I want to estimate the required sample size to detect a difference in proportions for a sequential, online experiment. Users land on my web page one by one and 50% of them convert on some action. I believe that in my new... |
For some kernel function k which by definition has a symmetric and positive semidefinite kernel matrix K, is the new kernel function sqrt(k) also a valid kernel function?
If we use Mercer's theorem, it is easy to show that the new kernel matrix is symmetric. The confusion is regarding checking if the new kernel matrix ... |
We can calculate the conditional density using Eq.1[3].
$$
p_{\theta, \Lambda}(y \mid \boldsymbol{x})=\frac{\exp \left(f_{\theta, \Lambda}(\boldsymbol{x})[y]\right)}{\sum_{k=1}^{n} \exp \left(f_{\theta, \Lambda}(\boldsymbol{x})[k]\right)}\tag{1}
$$
where $f$ is the classifier.$f_{\theta, \Lambda}[k]$ represents the $k^... |
I do research on a dataset having texts, I split them into 80% training and 20% for testing. I submitted my research article to a journal and the reviewers responded with major revisions that include a suggestion to make an ablation study on overfitting because I stated that I use a specific procedure to prevent overfi... |
While studying hyperparameter tuning in Machine Learning, I have come to read Bayesian Optimization for Hyperparameter Tuning and Using validation set when training the model but it is kind of ambiguous to me to tell the usage of Bayesian Optimization and validation set when training the model. Using validation data se... |
I have independent random samples of $R^d, d>1$ $X=\{X_1,..X_n\}$ and $Y=\{Y_1,.. Y_n\}$ with respective distributions $F_1$ and $F_2$. In a regular two sample problem we test $H_0:F_1=F_2$ vs $H_1:F_1\neq F_2$.
If we know that $F_1\neq F_2$, can we make a variation of the two sample test that tests how close are the t... |
Doubt
How can I set chi-square test on city and brand as the column city and brand doesn't have number but string like city name and brand_name
I'm new to statistics so any hint will be helpful...
|
It is well known that an L1 regularized linear regression is equivalent to a regression with a Laplace prior on the distribution of the coefficients. This is explained here:
https://bjlkeng.github.io/posts/probabilistic-interpretation-of-regularization/
I would love to make use of this face and convert a bayesian model... |
I've been looking through several publications on modeling (LMM or GLMM) tree growth over a specific time period and found significantly different approaches: whilst some studies use "time" variable in their modelling (e.g. y ~ x1 + x2 + time|subjectID), others seemingly omitted it from the conditional model (e.g. y ~ ... |
Can someone please explain this question and suggest an understandable solution??
|
I classified some medical images. And distribution of the dataset is :
494 Train Anormal
469 Train Normal
37 Test Normal
64 Test Anormal
84 Val Anormal
37 Val Normal
...
My training result is (by ViT):
loss: 0.2714 - accuracy: 0.9102 - val_loss: 0.2624 - val_accuracy: 0.9196
and test result is:
precision... |
I am working with a dataset that contains 35 variables. I would like to determine the correlation just between the dependent variable and independent variables only, however, I can't seem to find any information on how to do this plus a correlation matrix produces a 35x35 matrix.
Any advice would be appreciated.
Michae... |
Here's the code to fit a GARCH(1,1) model with a external regressor x.
library(rugarch)
set.seed(1)
x <- matrix(rnorm(1000))
y <- rnorm(1000,mean=x)*x + rnorm(1000)
garchspec <- ugarchspec(mean.model=list(external.regressors=y),
variance.model=list(model="sGARCH", garchOrder=c(1,1)))
fit <- ugar... |
Suppose I have a data set consisting of $n$ observations: ${\displaystyle \left\{\mathbf {x} _{i},y_{i}\right\}_{i=1}^{n}}$.
If I apply linear regression :${\displaystyle \mathbf {y} =\mathrm {X} {\boldsymbol {\beta }}+{\boldsymbol {\varepsilon }},\,}$
where
${\displaystyle \mathrm {X} ={\begin{bmatrix}X_{11}&X_{12}&\c... |
TL;DR what DNN architecture for 1xn (n<50) tensor to 256x256x6 tensor regression?
I'm facing a supervised regression problem where I need to predict the outcome of the numerical simulation of a physical process. Each simulation takes as input a 1xn tensor of features ($n = 10-50$) and outputs a 256x256x6 tensor of real... |
I've done a MLR model to determine and analyze what factors affect life expectancy. This is my data^. For the variable estimates, could you help me answer: Significance (one-sided alternatives), Sign (are there any signs as to be expected?), and Magnitude?
In addition, I was wondering how you can see which variable is ... |
I am attempting to implement a back propagation algorithm that can efficevley read from a file of features and there targets and predict there outputs correctly, however for sake of testing I am hard coding the inputs (features and target). I am using this pseudocode for reference:
My code
import math
# Features
x = ... |
Suppose $X$ has $N(\theta, \phi)$ distribution for a known $\phi$. Suppose that the prior distribution for $\theta$ is $N(\theta_0, \phi_0)$ (both parameters known).
The question asks me to find the posterior distribution of $\theta$ given $X = x$.
Well, I applied the formula to get:
$\pi(\theta | x) \propto f(x|\theta... |
I'm building a churn model. Each user's historic data (observation window) is a constant period, but each observation window contains different dates.
For example the next figure:
Let's say, that the observation window contains the last month data before the user's last action.
The user's last action detriments the wi... |
I have two datasets A and B, and for each entry in both datasets I have a mixture of ordered and unordered categorical variables such as gender, age (integral value) and date. It is believed that dataset B is a subset of dataset A, i.e. some of the entries in B in fact came from A, however with the possibility that the... |
I have data like this:
c1 c2 c3 c4 c5
r1 a a b c d
r2 NA a b c a
r3 NA b b b c
r4 a b c b c
Here, each row is a data record, each column is a feature. I have several thousand such matrices, sizes range from 10-100 rows and most have around 50 columns. In this data NA entries mu... |
Gaussian - symmetric case:
consider a statistically independent sample of N observations from a normal distribution.The mean (loc) of the population is the results on which you would like to make a prediction. You can report the value of the sample mean and as an error on it the standard error (SD/$\sqrt{N}$), i.e. $me... |
An interesting scenario that I'm trying to wrap my mind around.
Let's say you were running a giveaway, and have a probability of 10% for every participant to potentially win a prize. The way you would choose the participant would be using an RNG for each one (1,10) and if the output was 1, they win, otherwise, they don... |
I want to select important features of a given dataset which contains a lot of noisy features. My question is general: If I select features, by let's say Recursive feature elimination or L1 penalty using one algorithm, does that separate noise from important features once and for all? Basically, would it be right appro... |
wilcox.test tests the median difference between two distributions.
ks.test tests for any difference between two distributions.
How to test (better having an implementation in R) for the difference in the one-side tail (e.g., right tail) between two distributions (e.g., one distribution has a longer right tail distribut... |
Let's say D is a Bernoulli distribution with parameter $\mu = 0.6$ and we want to test whether or not $\mu=0.5$. So,
Null hypothesis: $\mu = 0.5$
Alt hypothesis: $\mu \neq 0.5$.
Suppose we have a sample $X_1,\ldots, X_n \sim D$ for large $n$. Now, my understanding is there are two ways to do the hypothesis test. One ap... |
I want to fit this models
$$
Y \sim D(μ, σ) \\
μ = X1 * (β1 + β2 * X2)
$$
(D is probably Gamma)
Y is 0 when X1 is 0, but the slope depends linearly on X2.
I can fit something close with the R formula Y ~ 0+X1:X2_c, where X2_c is a categorized version of X2, but I want to model it continuously.
(Sorry for the informativ... |
Monte Carlo Estimates from Different distributions for $\theta = \int_{0}^1 \sin(x) dx$
So I understand that a monte carlo estimate for this integral should look like this $\hat\theta = \frac{1}{m} \sum_{i=1}^m sin(x_i)$, where $x_i \sim U(0,1)$
And in R I can see this works:
> m = 10^4
> x <- runif(m)
> theta.hat = ... |
I ran an ordered probit regression with the following equation:
(Eq.1) $$Y = B0 + B1 X1 + B2 NotPoor + Other controls$$
Where Y is a categorical variable, X1 is a continous variable and Not_Poor is dichotomous variable that takes the value of 1 if an individual is not poor and 0 otherwise.
I got and insignificant B1. T... |
When running models from a bayesian perspective — a regression for example — we get posterior distribution for every parameter/statistic we want, right? I’m wondering whether I should see this this posterior distribution as a regular distribution (as in rnormwith a mean and Standard Deviation), or as a sample mean dist... |
I fitted a generalized additive model (GAM) using SAS PROC GAMPL with a Poisson distribution and a log link function.
The outcome was a measure of repair cost for a large collection of units (4k+). There is a percentage of units with values that are zero ($0) which I expected to simply drop out of the model estimation ... |
I have data from an experiment that tested responses to stimuli in females and males. I measured baseline for both groups prior to presenting the stimuli. The baseline for males is higher than for females. The response to the first stimulus is positive for females and negative for males. In comparing the responses betw... |
I have two datasets which contains the same samples, but have different measures. I wanted to test which measures were better to separate the groups in a PCA. Thus, I plotted a PCA for both datasets and observed that one dataset had a better clustering.
The question is: Is there a quantitative measure that could indica... |
I suspect the solution will be pretty straightforward but I'm struggling to figure it out.
The problem:
I have an experimental design with several video stimuli of different time lengths (between 90s and 120s), seen by different subjects. Data is in longform and I'm using mixed models/multilevel modeling analysis, with... |
I am using R Studio to run logistic regressions. I have a dataset, which analyses voting behaviour. I want to analyse the effect of different independent variables on the dependent variable "participation in election". Moreover I want to see if there are differences between the subgroup of the first time voters and the... |
Two questions: 1. Concurvity for factors =1, is this normal? 2. How do you interpret a partial effect when the effect is linear and lines for confidence intervals are pinched at 0?
Is it okay for covariates in gam models that are entered as factors (and random effects), to result in a concurvity value of =1? One facto... |
Given the formula of the third moment that define the skewness:
$$skewness=E\Bigg[\bigg(\frac{x_i−\bar{X}}{σ}\bigg)^3 \Bigg] = \frac{\mu_3}{\sigma^3}
$$
I understand that this formula calculates the ratio of the spread of the data relatively to the mean and the standard deviation. and raising to the cube preserves the ... |
Im not a mathematician but need some help trying to calculate the sample size of a population needed to be indicative of the whole population with respect to the prevalence of names. Assuming sample size is 1/x total population.
This has two implications. 1) a sample large enough contain all or most of the names and 2)... |
Suppose you have a set of communication systems {A, B, C, D}, which speak with each other as well as other systems not contained in the set. Our concern is how they speak with each other. They communicate via frequencies between 0-100 and some unknown translation frequencies {t1, t2, …tn}. A detection method allows us ... |
I am looking at the gradient descent method for group lasso questions. Here's what I am currently stuck at.
Given the quadratic form of the objective function:
$$
f(x) = \frac{1}{2} x^T V x - m^T x + \sum_{l=1}^g \|x_{G_l}\|_2
$$
where $x$ and $m$ are vectors and $V$ is the positive semidefinite matrix. The $x_{G_l}$ i... |
Is it right in saying that the Jacobian Matrix of a Matrix output of an elementwise operation to the same input is a diagonal matrix ?
Context below.
From ref 1 it is clear that when you have an elementwise operation on a vector; the Jacobian matrix of the function wrto its input vector is a diagonal matrix
For an inpu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.