instruction
stringlengths
9
38.7k
According to the Wikipedia, the Bayes classifier assumes knowledge of the distributions of $X | Y$, where $X$ and $Y$ are the random variables of the features and the classes, respectively. Let's assume that one knows that these are normally distributed and decides to estimate the parameters of the normal distribution ...
I generally work with skewed and heavy-tailed lifetime distributions, so I need to check the goodness-of-fit of certain data to such distributions. After some exploration, I came to know that the AD test is preferable to the KS or CVM test in such cases as it can capture the deviations in the tail. But the AD test also...
I'm working on an unassessed course problem (paraphrased for brevity), Consider the time series model $$y_t=\alpha+\beta t+\epsilon_t$$ where $\epsilon_t$ is a white noise and $\alpha,\beta$ are known parameters. Show that $x_t=\nabla y_t$ is not invertible. The course notes have, Suppose $$y_t=h(B)\epsilon_t$$ wher...
Take e.g. an observational study sample where subjects have varying follow-up lengths. We want to compare two treatments, A (intervention treatment; n=100) & B (control treatment; n=500), and see if there is a difference in the occurence of event X during follow-up. Propensity-score matching is applied to create compar...
When participants arrived at the lab, I showed them curriculum vitae with different profile pictures and different types of university information. After viewing each curriculum, I asked participants to rate the competence of the person from 1 to 7. So I have a within-subjects design with a Likert scale dependent varia...
I have a simple confusion regarding the interpretation of logistic regression. Suppose married people are more likely to be employed compared to single people. In here, unemployment = 0, employment = 1. Similarly, married = 1 ,and single =0. Assuming odd ratio = 2. Can we say "Married people have 2 times higher odd of ...
I am trying to fit a linear mixed model for a randomised controlled trial where women are randomised to one of two treatments, but the outcomes are at the baby level. Most women will give birth to singletons, but there will be some twins (or higher), which will need to be accounted for. I am thinking of using a random ...
I was doing some project about multi state model, and I used the code below: library(survival) ck <- survcheck(Surv(estart, estop, to) ~ 1, data=mydata, id=id, istate=from) ck$events Then, the result came like below: I can't find the meaning of the last line. (the (any) part) Does anybody know about ...
In the official documentation for the python function scipy.optimize.curve_fit, the following description is given for a boolean-typed parameter absolute_sigma. If False (default), only the relative magnitudes of the sigma values matter. The returned parameter covariance matrix pcov is based on scaling sigma by a cons...
So I know that a connected Markov chain has a stationary distribution $\pi$ that satisfies $$\lim_{t \rightarrow \infty} a_t = \pi,$$ where $a_t$ is the average probability distribution at time $t$. So this average converges to our stationary distribution. However, does that mean that $\lim_{t \rightarrow \infty} p_t =...
I have data with incidence rates for each quarter between 2015 and 2022. I am supposed to model the association of the incidence rates with the general time trend(quarter 1-40 as numeric value) and seasonality (quarter 4 is the reference category and compared to q1-q3) using least square regression. However, for the ge...
I have a question regarding the logistic growth model. Can proportion values that have been converted into logit be mean-centered? When we calculate the actual difference value between two proportion values (0.8 and 0.6, which is the mean value of a certain variable), we get 0.2. However, when we first convert these tw...
I'm trying to ascertain whether a particular type of article, $T$, is associated with higher engagement scores in academic journals, and how substantial the effect size might be. I have raw data of engagement figures for every article published in one year period for 10 different journals. The first thing to note is th...
I have a dataset with attributes X, Y, W, and Z. X is the predictor, Y is the outcome, Z is the confounder and W is the mediator. I have defined 1 STL formula for each attribute denoted by f(X), f(Y), f(Z), and f(W). I have the following relationship between the satisfaction time of the formulas T(f(Z)) < T(f(X)) < T(f...
I would like to use a Cox regression model with time-varying covariates and time-varying exposure using a standardized inverse probability weight (IPW). My exposure can be continuous (exp_continuous) and categorical(exp_quartiles). Q1: For different types of exposures, should I estimate two IPWs and fit two Cox models ...
I am working on a model to analyze a categorical outcome variable (7 categories) for a design with two fixed factors (Condition and Group) as well as the random factors of Subject ID nested in Dyad ID. I know how to do this type of nesting in lmer, but I am unsure in MCMCglmm. I am using the MCMCglmm package and I have...
I have implemented a Thompson sampling algorithm with beta distribution that chooses between two processors to process the payments for each transaction such that it maximizes the success rate. For each transaction, there are only two available processors and for different transactions, these two processors can vary. ...
In a study investigating a time-to-event outcome in a propensity score matched sample, the authors state the following in their methods: "Where no evidence of difference between the compared groups was found, the minimum detectable effect at α = 0.05 and 1 − β = 0.80 was estimated with 200 simulations" How does such a ...
I am doing some regression analysis on a stratified sample where the stratification variable is the dependent variable. Do I need to adjust the regression or the results to account for the disproportionate subpopulations at all? In other words, I have a sample containing groups A and B where B is very rare in the popul...
I need to compare two groups of participants to each other in a model that contains fixed and random effects in R. It was suggested to me that a non-parametric test might be ideal for these comparisons. Here is the data: structure(list(item = c("'accordion_1'", "'accordion_3'", "'apple_01'", "'apple_03'", "'asian_01'"...
If I generate a sample that includes p1 and p2 drawn from a bivariate normal distribution. Then I generate a sample that includes n1 and n2 drawn from a different bivariate normal distribution. Then I generate a variable y=n1p1+n2p2+noise. Suppose that I do not observe p1 and p2. How do I estimate the variance covarian...
Context: I am considering here a variational Bayesian framework where I need to calculate the optimal variational distribution for some covariance parameters. Formally the model can be expressed as: $$P(W|X,\beta, \Sigma^{-1})P(\Sigma^{-1}|\lambda)$$ where $W$ is a matrix of outcomes of size $NJ$ where $N$ is the sampl...
I am currently attempting to optimize the dimension of the SOM grid, as well as the number of metaclusters for some flow cytometry data in R, using the well documented flowSOM package. From what I have seen so far, the dimension of the SOM grid as well as the number of metaclusters, two primordial parameters for the fl...
I have two binary variables (X1 and X2, coded 0/1) as predictors in a growth model in lavaan. I want to understand their individual contributions and their interactive influence on both intercept and slope. I believe there is no way for me to run the interaction in the lavaan model syntax, so I have created an interact...
I am trying to estimate the first order conditions from the following: p1,p2~N(mu1,mu2,sigma1,sigma2,sigma12) In addition, another variable total_cost=p1x1+p2x2+noise If I observe x1,x2, and tot_cost, how do I estimate sigma1,sigma2, and sigma12 using maximum likelihood? I hope to get the first order conditions.
Can I get standard error from a constrained optimization problem in R? I have calculated transition probabilities. Now I am trying to calibrate it. Using these transition probabilities I have simulated a distribution. When I compare the simulated distribution with real data, I found a significant difference. To tune th...
Imagine a treatment that, if it has an effect, is likely to affect two groups in opposite directions. As a concrete example, suppose I am testing the effect of a Republican politician endorsing a policy on a binary measure of support for that policy. The endorsement is likely to increase support among Republicans and d...
I currently have a set of data: 1 40950 2 27749 3 14786 ......... 15 95 16 75 .......... 12205 1 15344 1 19991 1 The first column is the "length", and the second column is the frequency of the "length" data. In other words, for length 1, it occurs 40950 in the dataset, and for extreme ...
I am trying to get my head around when and how to include Competing Exposures in DAGs. In my searching I keep finding statements that are very similar to the quote from the dagitty tutorials - "Including competing exposures in a regression model does not affect bias, but should improve precision." In my example below, ...
I tried two different normalization methods, generated the PCA plot above on the combined data, and colored the samples by the normalization type. Both normalization methods should give similar results for a standard dataset (proteomics). By looking at the plot, it looks like the overall shapes are the same. However, ...
I have survey results (n=14, small size, I know) which scored several health measures from Poor (1), Fair (2), Good (3), Very Good (4), and Excellent(5). I want to see if having a physician (0=no, 1=yes) and insurance (0=no, 1=yes) predicts the likelihood of someone reporting poorer or greater health scores. How would ...
I'm fairly new to machine learning, and I know similar questions have been asked but I can't find an answer that satisfies my curiosity. I'm working on a Random Forest Classifier model in python, and I am trying to use GridSearchCV to tune the hyperparameters. At first I ran the classifier class with default params and...
I'm working on a project which is using mixed effects model. There are different group of subjects given different treatment during 2 different periods. There are errors associated with subjects by time effects during the same period and also errors associated with subjects between 2 different periods. The error of sub...
Given an existing regression curve, how do I properly account for the known variance of the dependent variable when back-calculating for the (nominally) independent variable? If I had an observation $Y_{new}=1.09$ with a variance $\sigma_Y^2=0.012$ then how should I incorporate that information into my final answer for...
I am currently implementing Tree-Reweighted Belief Propagation (TRBP) to optimize edge appearances. The authors in the main manuscript of this work keep the edge appearances, represented by , fixed [1]. However, in their previous research, they introduce a tighter bound that allows the problem to be framed over all spa...
I am using scikit-learn to build two binary classification models--one is a random forest, and the other is a linear SVM. I want to compare the relative importances of the input features to the trained models. LinearSVC has an attribute "coef_" while the random forest classifier has an attribute "feature_importances_"....
The two-way ANOVA model with interaction for some continuous variable $y$ can be expressed as $$y = X\mu + \varepsilon,$$ where $X$ is the design matrix (the first column of $X$ contains the constant, the second and third columns the two main effects, and the fourth column the interaction of the two main effects), $\mu...
I had to normalize my data using this equation : $m ↦ (m - r_{min}) / (r_{max} - r_{min}) * (t_{max} - t_{min}) + t_{min}$ as seen here: scale a number between a range If I calculate the mean of these data and I want then to calculate the standard error, how do i do? Do I only take into account the multiplication/di...
Suppose I would like to do extractive question answering on scientific literature. I'm interested in using BERT which was pretrained on Wiki and Bookcorpus. I see two routes here: 1. Fine-tune BERT on scientific literature (specifically abstracts) using the masked language modeling task, then replacing the head and fin...
I want to ask some leads on how to quantify or propagate an epistemic type of uncertainty (e.g. statistical uncertainty) when performing a branch-and-bound (sort of fault tree analysis). The literature that I am currently looking at right now are the Markov Chain Monte Carlo Methods but I can not see any specific examp...
I tried to look up the answer but am confused by what this means exactly. It seems like one is a precursor to the other, thus you need both to conduct a study unless you're working with existing data. For example, qualitative data seems to be later be quantified in order to run any sort of analysis. Quantitative data n...
I am currently running a group invariance test with R, lavaan. My total sample is 794. The results came out as the attached photo. I understand that the chi-sq, CFI, and RMSEA all indicate that full invariance holds within the groups but it concerns me that the RMSEA value itself goes from "not optimal" to "bad". Is t...
Assume I have three events A, B, and C, and I know the following probabilities: Scenario 1: $P(A)$ and $P(B)$ $P(C|A)$ and $P(C|B)$ Scenario 2: I additionally know $P(C)$. I am looking for $P(C|A\cap B)$. I think it is clear that I cannot calculate this conditional probability in both scenarios because no informati...
I've got a dataset wherein only every third success in a series of n trials is observed. I had originally used the following Bayesian model: $$ y_i \sim \mathtt{floor}(z_i / 3) \\ z_i \sim B(n_i, p_z) \\ p_z \sim \text{Beta}(\alpha, \beta) $$ Where $y_i$ is the number of observed successes and $z_i$ is the latent count...
I want to fit a beta regression with an scaled continuous predictor, and express the slope in terms of proportion (not at the transformed, log-odds scale). In other words, I would like to express the change in the response variable (a proportion), when the predictor increases 1 standard deviation from the mean. I can g...
I would like to use a Cox regression model with time-varying covariates and time-varying exposure using a standardized inverse probability weight (IPW). My exposure can be continuous (exp_continuous) and categorical(exp_quartiles). For different types of exposures, should I estimate two IPWs and fit two Cox models with...
I am confused with how I could use ConvTranspose2D function as I'm not familiar with how it is actually working. What I understood is for a simple toy example of input size = (2x2), stride = 1, padding = 0, and kernel size = (4x4), and the output map size is 5x5, by multiplying each elements (scalars) to the kernel its...
I am new to statistical survey analysis and I'm using R. We have ran a pre-test with a very small sample (n=50). Our respondents were sorted into two treatment groups (T1 and T2 - basically treatment and control). We also had the respondents answer a Yes/No (coded 1,0) Question before treatment (Q1). We are interested ...
I have two different groups of devices with different failure rates: Group 1: 72 devices, 57 % did not fail during observation. Group 2: 11 devices, no device failed during observation. How could I determine whether these groups resp. their reliability, lifetime or the like is different from each other? My ad-hoc app...
I have two datasets where my independent variables (of which I have 6) are highly correlated. In one dataset I know for certain that the dependent variable should only depend on 1 independent variable (say x6). I want to test, using regression, whether the other dataset also only depends on 1 ind. variable or whether x...
I have a dataset of 18 continuous variables measured over 3 time points for 90 patients. I hypothesise that there are clusters of patients with similar characteristics and that cluster membership may change with time (a drug was given at t = 0). I have identified Latent Transition Analysis/Generalized Markov Models as ...
I know that a a "random slopes" model usually has both intercepts and slopes models varying randomly across groups. Was reading the classic example with sleepstudy data. I understood that when you using a random slope model, you creating a personal intercept and a personal slope for each subject. My predictor variable ...
I am trying to fit a GARCH(1,1) model using the rugarch package. When I use residuals to extract the residuals, I find the data is the same as the original data, and I am not sure what's wrong with my code. > spec_2 <- ugarchspec( + variance.model = list(garchOrder = c(1,1)), + mean.model = list(armaOrder = c(0,0),...
I have been asked the following question related to SVM (Hard Margin) in the exam, and I failed to answer it. Can anyone help me find the solution? Consider the dataset M: \begin{align*} & \left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}^T, 1\right), \\ & \left(\begin{bmatrix} 0 \\ -1 \end{bmatrix}^T, 1\right), \\ & \left(\b...
The story so far is that I am comparing the climate niche of wild native UK tree species, with the climate niche of commercial growers that grow that species in the UK. Using the species code 'agl' as an example, I've extracted the wild agl climate values and the commercial agl climate values for a number of points (11...
I'm working on an unassessed course problem, Consider a time series consisting of quarterly observations of temperature in a city. The seasonally differenced time series $\{x_t\}$ with $D=1$ is modelled with an $\text{ARMA}(1,1)$ process $$x_t=1+\frac{1}{3}x_{t-1}+\epsilon_t+\frac{1}{2}\epsilon_{t-1},$$ where $\epsilo...
I am confused about the derivation in Section 2.3.5 of Pattern Recognition and Machine Learning (Bishop, 2006). The Robbins-Monro algorithm (Eq. 2.129) to find a root $\theta^\star$ of the regression function $\mathbb E[z \mid \theta]$ is: $$ \theta^{(N)} = \theta^{(N - 1)} - a_{N - 1}z(\theta^{(N-1)}), $$ where $N$ i...
I have two 5-point Likert scales (Strongly Disagree to Strongly Agree) and I want to compare the results within one population sample. I expect participants to choose 'agree' or 'strongly agree' on both scales. My sample size is small and in my study, I have assumed that my data is not normal so I have utilised non-par...
I am running a large number (potentially hundreds of millions - billions) null hypothesis significance tests (specifically a Poisson test, but the question is general). I would like to apply to them a correction for multiple hypothesis tests (e.g. false discovery rate). Due to computational considerations, I am runnin...
My question is regarding the comparison between the CRB of a given vector parameter and RMSE/MSE obtained from Monte-Carlo (MC) simulation. The approach I used is this: For $\boldsymbol{\theta} \in \mathbb{R}^D$, the RMSE of the estimate is $$\text{RMSE} = \dfrac{1}{D} \: \sqrt{\dfrac{1}{N}\sum \lvert \lvert \widehat{\...
I'm new to statistics. I'm solving a problem where I'm given three sets of data, the measured sizes of the population of rabbits, the drug dose that's been given to each of them and the method of administering the drug (oral or IV). The problem literally states: Test whether adding the drug affects the size of the rabb...
I'm running a regression model to see if my dichotomous independent variable (family type) predicts my outcome variable (well-being). I'm including four mediator variables, as a parallel mediation. I'm using Hayes Process Macro Model 4 for this. But...the problem is that I know that two of my four mediators have a dire...
I'm trying to understand how the equations (respecting indices) and the variance and covariance matrices of some mixed models adjusted in R are expressed, which are initially expressed by the lme4 and nlme packages. The first model is a model of just one random effect on the intercept, this one doesn't seem difficult t...
I am a biginner for multiple imputation. Now trying pool all the results, but wondering how to do so. I need to make a table for number of patietns in each categories, percentage, and OR and 95%CI for it. I couldn't find any code in R, Do I have to do with rubin;s rule manually? Detail Building a prediction model with ...
I would like to know if there is any statistical explanation on why it would be a good idea to group some data into the following way: find the maximum ($\max$), minimum ($\min$), mean ($m$) and standard deviation ($sd$) of a sample; group the data into the following 4 subintervals: $(\min, m-sd)$, $(m-sd, m)$, $(m, ...
I am working with a longitudinal dataset exploring cognitive ageing (e.g., memory performance over time). Participants complete the study annually. Inclusion criteria for this study are 1) UK resident, 2) Aged 50 years or older, 3) no dementia diagnosis at baseline. The study is open to anyone meeting these criteria an...
I'm evaluating some settings for using graph convolutional networks for image classification. I'm using train/validation/test split of 64%/16%/20%, and adopting 5-fold cross-validation. That is, in each iteration of the cross-validation, I'm using one fold as the test set, and from the union of the remaining 4 folds, ...
ORIGINAL QUESTION What are the differences, or relationships, among "relative probability", "relative frequency", "probability density" and "probability"? A simple example would help to better understand the differences and relationships among those terms. As far as I understood, these terms are used to indicate/repr...
Suppose I have a data set that contains insurance claims $X$. Each claim also is assigned the calendar year during which the insured event happened. Now, I want to build a frequency/severity model but only for the extremely large claims, say $X \geq \mu$. Assuming a homogeneous poisson process for the frequency compone...
Clustering algorithms often use some affinity metrics to cluster a dataset. Given some data points $x_1, x_2, \ldots, x_n$, it is common to compare $x_i$ and $x_j$ using a function $f(x_i, x_j)$ which could be, for example, the norm of the difference between these two points or a Gaussian kernel. My question is rather ...
I am working on a multilabel text classification problem. The text data is called 'cleaned_text' and has shape (92259, 1) and the one-hot encoded label data is called 'labels' and has shape (92259, 32). The text is consists of the text from MathOverflow questions and answers with latex and stopwords removed. The labe...
I conducted a Spearman's correlation to determine if there was a relationship between emotional clarity and cognitive empathy. I found that they were positively associated, but the relationship was not significant. I then controlled for depression in a partial correlation, since I expected that less clarity = depressio...
I am reading the paper Athey & Imbens (2016) paper "Recursive partitioning for heterogeneous causal effects" from PNAS. I am not able to fully understand which criteria is used to construct (train) the causal tree. I have read this post How does a causal tree optimize for heterogenous treatment effects? but I still don...
background Some algorithms are linear in operations, so the number of operations to complete is $O \left(N\right)$, while others are quadratic $O\left(N^2\right)$, cubic $O \left(N^3\right)$, or non-integer $O \left(N\cdot log N \right)$. Sample entropy has been around for a while (link) but I can't seem to find a clea...
I am extremely new to statistics so pardon me if this question is really easy to answer. I am trying to analyze two time series that should be physically related (wind speed and temperature). Since both time series are cyclic, I figured that a linear correlation technique like Pearson would not work and instead somethi...
Question: Is it "quantitatively sound" to decompose/upsample year-bins (e.g., 2002-2006) into the component years when analyzing Likert Score data that was collected as a recollection of conditions within the year-bin? Background: A series of interviews were conducted asking to Likert Score (1-5) the condition of locat...
I am trying to generate both left-censored and interval-censored datasets which both have the same features. I wish to fit and compare a cox model, Aalen's additive model and an Accelerated failure time model to these 3 datasets. I have initially generated a right-censored dataset using the below code (survsim package)...
Does anyone know how to compute the sampling distribution of the Pearson correlation between two continuous IID random variables, given only the sample size $n$ and the PDFs, CDFs, characteristic functions, or the like of the distribution?
I need to bound on a covariance quantity that has come up in a sampling problem. $\widehat{Y}$ and $\widehat{T}$ are Horvitz-Thompson estimators of population totals, $Y=\sum_{i=1}^N y_i$ and $T=\sum_{i=1}^N t_i$, and take the following forms: $$\widehat{Y} = \sum_{i=1}^N \frac{Z_i y_i}{p_i}$$ $$\widehat{T} = \sum_{i=1...
Please can someone help me interpret what the asterixis mean and how it is statistically different to the groups. I am so confused. I am doing a one way ANOVA looking at the effect of age on physical perpetration
Suppose that $X_{ik}\sim\mathcal N(0,\sigma^2)$ for $k = 1,2,\dots, n_i$ are independent and identically distributed for each $i \in\{ 1,2\}$. Note that I assume equal means ($0$) and variances ($\sigma^2$) across both groups. The standard t-test uses the pooled standard deviation $$s = \sqrt{\frac{\sum_{i=1}^2\sum_{i=...
The following is a toy example to help me understand how to perform test of difference between two proportions in SPSS. I have two main geographic regions (Region 1 and Region 2) and several subregions (Subregion A, Subregion B, Subregion C and Subregion D) on which I recorded answers to simple questions. For instance...
When reading the explanation for the "The reparametrization trick" on the Stanford's cs228 notes, I saw a claim that It is easy to check that the two ways of expressing the random variable z lead to the same distribution. See here: (Just search or scroll down on that page to the section on reparametrization on that...
I'm interested in predicting the sequence of the order of the events in an individual giving a bunch of predictive variables using Machine Learning. So my guess is, for an specific instance with around 10 predictive variables, I write the rank of each event (Let's say that there are 6 of them (Event A, B, C, D, E and F...
Suppose X, Y, Z are three jointly Gaussian random variables and X and Z are independent given Y. For example, take three r.v. from a OU process. Here is some R code: nr <- 3 gg <- seq(0, 1, length.out=nr) C <- exp(-.1*as.matrix(dist(gg))) The precision matrix has a zero at element 1,3 and 3,1: so the first (X) and thi...
I am looking at using the Brown-Forsythe test to test equality of variances for a national rate observed in four years -- is this valid to conduct a test for equality of variances, with four data points? Or does this test require that multiple data points be observed in each year, and then run the test compared across ...
I am currently doing a research on determining a cut-off of a ECG signal's number of 12 patients with their diseased/normal label that is produced by classifier for diagnostic decision purpose. However, I am struggling to find a statistical test(s) to justify whether the cut-off is significant or not. Here is how my da...
I'm trying to understand the results from emmeans::contrast applied to a linear mixed model with continuous covariate (WR) and categorical fixed effect (Condition). A simple version of my post-hoc analysis question is: is there a significant effect of Condition based on the model predictions at a particular set of work...
I have data (change in mass) ranging from ~ -400 to + 4,000. I'd like to run an ANOVA comparing change in mass in different treatments. When I plot the residuals they are not normal and the residual variances are not equal. To normalize the residuals and deal with the variance I transformed the data via a log transform...
Let's say I have multiple timeseries, representing different features, all of length n, and I want to predict a new timeseries which represents another feature, without any past history for that feature. So for example, one sample might look like this, where the red and blue are "input series" and the yellow was the "o...
I've had this as a homework problem as a true or false type of question and I'm trying to wrap my head around why this is true. Is the reason simply represent each datapoint as a scaled version of a single vector? Could someone illustrate this for me I've been having a hard time coming up with an example. If I am compl...
According to the study protocol, we used the MIXED model technique (in SAS) to estimate the ratio for example C vs A , C vs D, and its 90% confidence interval. However, in the ANOVA output, for treatment C, different geometric least square means values are showing (i.e, different value of geo lsm for C in C vs A with ...
Can anyone recommend a very good textbook or PDF with a full, complete and detailed derivation of the statistical distribution under the null hypothesis of the original Granger Causality Test? I'm looking for one since weeks and didn't found anything.
I have a dataset of mass spec analysis which was sent to me in 200 excel files. Importing into R, I get a dataframe that looks like this: | Unique Sample ID | Chemical Name | Concentration | | -------- | -------------- | -------------- | | 001| Chemical 1| 50| | 001 | Chemical 2| 100| | 002 | Chemical 1| 100| | 002| Ch...
I am studying perceptron for the first time. I came across the assumption from online resources that if the data is linearly separable with gamma margin then the perceptron algorithm will converge. Is this true? Also does this assumption mean that if there is a classifier corresponding to w* which separates both classe...
When performing a multiple comparison in a binomial model, I encounter a problem when one of the groups has the probability of success = 1. For example, y <- c(1,5,9,10) N <- c(10,10,10,10) x <- factor(c(1,2,3,4)) dat <- data.frame(y,N,x) model <- glm(cbind(y,N-y)~x,family=binomial,data=dat) library(multcomp) summary(g...
I am using Python (statsmodels) to create a dynamic factor model on which I apply the Kalman filter. Thanks to earlier questions on this forum, I landed upon using exact diffuse initialization. My code is below: mod = DynamicFactor( endog=NG.astype(float), # nobs x P exog=HDD.ast...
I am performing the quantile regression in R on a non linear model (that is done by using nlrq). I am getting the coefficients for the desired quantiles (tau = 0.05, 0.50, 0.95). All very nice, but running the code without reasoning is not a good practice. As we determine quantiles at the extremes, i.e. 0.05, 0.95 (but...
I have data from a daily diary study of participants nested in couples. To analyse the data I used lme4 to do multilevel modelling in R to create my models. After doing this I wanted to check if the model assumptions were given. I plotted Residuals vs Predicted, and my understanding is in order for the assumption of l...
I have to do mediation analysis for my research and my IV and DV are both continuous and mediator variable is ordinal (time spent on Instagram where categories are: less that 30 minutes a day 30 mins to 3h a day 3h to 6h a day more than 6h I labeled this mediator as ordinal since measure differences in the categories...