instruction
stringlengths
9
38.7k
I developed a ML algorithm (Xgboost) to predict a target in my data set. I obtain here the results of my predictions on my test set : tibble( truth = factor(c(0, 0, 0, 0, 0, 0, 0, 1, 0, 0)), response = c(0, 0, 0, 1, 0, 1, 0, 1, 1, 0), prob_0 = c(0.8829266, 0.8831959, 0.7404993, 0.3993190, 0.6625459, 0.3192227, 0....
I am running a logistic regression in a sample with ~150,000 observations. I am predicting three different outcomes, x, y, and z, that occur in ~10,000, ~4,000, and ~2,000 cases respectively (for each I am running a separate glm). When checking the residuals, they cluster in two groups, with most of the residuals from ...
I am trying to figure out t test for dependent samples and need help. Let's say that our research question is "is there a difference between length of essay and narration text in children with developmental language disorder", in class we learned that our dependent variable would be "length of essay and narration text"...
Can anyone help me solve this confusion? I don’t know why z-test and p-value test for hypothesis testing is used for this, given that the pattern between the two questions are same. Records show that students on average score less than or equal to 850 on a test. A test prep company says that students who take their co...
I have applied binary logistic regression. My independent variable is bullying victimization (0/1), dependent variable is self-cutting (0/1), covariates are age, gender, school performances, depression, family relationship and so on. In model I in adjusted only bullying victimization and self-cutting, i.e. crude odds r...
I did an experiment in which I asked 150 people to predict the likelihood of the home team winning eight upcoming NBA playoff matches. Subjects were separated in four different treatments in a 2x2 design. The aim was to find the influence of different stakes on their answer, and more importantly if they significantly b...
for this formulas PE(pos,2i)=sin(pos/(10000^(2i/modelDimension))) and PE(pos,2i+1)=cos(pos/(10000^(2i/modelDimension))) we know PE for position i follows: [sin(i/denominator[0]),cos(i/denominator[0]), sin(i/denominator[1]),cos(i/denominator[1]), sin(i/denominator[2]),cos(i/denominator[2]),...]. note each element here i...
I have a categorical data that I don't know how to generate the significant level. Row = Group A and Group B; Column = Unchanged, upgrade, downgrade (From left to right) 7 6 4 4 0 6 I tried to run in SPSS but pearson chi square test cannot be used as 4 cells have expected count <5. Fisher exact only limited...
To give you an example: let's suppose I have 3 subscales A, B and C, each with 5 item, and I know The Cronbach's alpha of each subscale (let's suppose: 0.80 for A, 0.85 for B and 0.90 for C), The Cronbach's alpha of the global (15-item) scale (let's suppose: 0.90 for A+B+C=S). If I assume that the three between-sub...
I am having trouble understanding the application of chi square "power of the test" in context to hypothesis testing. The following is not homework, I'm simply providing an example to convey my confusion and obtain clarity from more experienced people throughout this forum. Consider n=12 failures, total testing time is...
I have a dataset with calf serum BHB concentration expressed as low (<150) or high (>150). I want to know if there is a difference in BHB between age categories (weeks). I tested two analysis: Pearson Chi-squared test. Here is the script with the results: t <- table(file$BHB_gr, file$stade3) chisq.posthoc.test(t, met...
I work in biology and I´ve done an experiment exposing an invertebrate to a pesticide at different temperatures. One of my endpoints is hatching success of their eggs. The animals lay clutches of eggs, usually 10-30 eggs. My impression is that I shouldn’t model the data using proportions as datapoints (e.g., 0.7 propor...
I'm very new to SEM/Path analysis. I'd like to know how to design/visualize a within-subjects SEM/Path analysis. For example, suppose I'm measuring a path from a cognitive measure X that should impact vocabulary and grammar (which share some variance) that, in turn, should impact a linguistic outcome Y. However, the sa...
I had the idea that we can overcome the conditional independence of features within Naive Bayes classification by assuming that we have latent (hidden) sub-classes. Let me explain. For example, if we have this features vector (1, 1, 0, 1, 0) in Naive Bayes we would calculate probability of this vector given a class li...
I have a dataset with approximately 2500 observations and 50 variables. The response variable is numerical, so my objective is to build a regression model. I have built one penalized linear regression model and one xgboost regressor model. The linear model has obtained a MSE of 7.31 and a R2 score of 0.62 The xgboost m...
I am trying to compare two groups of different sizes in a dependent sample. Here's a fictional example of how my data looks like: | ID_Nr | Value |Treatment | 1 | 12 |1 | 1 | 22 |1 | 1 | 4 |1 | 1 | 17 |1 | 1 | 7 |0 | 1 | 29 |0 | 2 ...
I am starting a new project and need to determine the sample size needed to be able to determine statistically if there is a difference between treatment and control groups. I was going to use power calculations in order to determine the sample size needed. However the one wrinkle is that the team we are working with w...
Let the one-step transition dynamics of a system be given as \begin{equation*} \mathbf{P}[X_{t+1} | X_t] = N(f_\theta(X_t), I) \end{equation*} that is the Normal with mean a function of $X_t$ paramterized by $\theta$. My question is what would be $$\mathbf{P}[X_{t+2} | X_t] = \int_{-\infty}^\infty\mathbf{P}[X_{t+2} | X...
In ecology, we are often working with very small samples, i.e. I only have 13 sites of each of the two farming practices I am comparing. Thus, I really don't want to discard any of my sites and thus I am planning to do weighting rather than matching. However, should I first try to match my sites first (without discardi...
I'm implementing a decision curve analysis in my project and since the cost of screening is very low and has the added benefit of reassurance for the patients, false positives aren't of great concern- in contrast to false negatives. I think I don't fully understand the concept/how net benefit is actually calculated. Ho...
What if we do tests, try reduce variance, but still can't get low p-value to reject the hypothesis. How to find out that there's no difference, and if so we can choose variant B just because we like it more?
I am trying to build a prediction model from longitudinal study after intervention. So after intervention, we followup patients 1,3, and 6 months later to see if they are cured or not. So dependent variable is cure or not, then independent variable is patients' information at baseline(sevirity level, age, etc) I found ...
I've got a simple (two variable) data set that resolved nicely with k-medoids clustering (PAM) into three clusters. However, for presentation, I'd like to plot the points along with a Voronoi-style diagram, with estimated borders for the clusters. The borders would, of course, lie outside the convex hulls of each clust...
I have the following data: Which shows how many days my sample was thermo-cycled, and the corresponding CFU/mL values per treatment (with the treatments being that some samples had water, some samples had glycerol, and some samples had F68 in them), so like after 3 days, the sample with water had a CFU/mL value of 1.1...
I have run an experiment where in a series of trials, each of 10 animals was presented with each of 6 stimuli, and each stimulus was offered once to the left and once to the right nostril. Overall, each animal participated in 12 trials (6 stimuli x 2 nostrils). My point is to calculate the reliability of the data by me...
Suppose I have three i.i.d. random variables $X$, $Y$, and $Z$. A model is used to generate $i$ outcomes for each variable that are used to estimate the sample mean and sample variance for each of the random variables. Where $x_i$, $y_i$, and $z_i$ correspond to the $i$th outcome of $X$, $Y$ and $Z$, respectively, and ...
Thanks in advance! I am attempting to quantify hospital resources using database derived variables that are all believed based on theory to be important for surgical patients. There are about 70 variables and 140 hospitals, so dimensional reduction is key. I also have data on tens of thousands of patients at these hosp...
I am trying to build a prediction model of outcome of intervention. I used the logistic regression model, and Calibration and discrimination was confirmed very well. but the final model shows very small coefficient for all predictors. How can I interpret them? Are they not associated with outcome? My sample is only 90 ...
I'm trying to conduct a GLMM in SPSS with a DV that is ordinal (multinomial logistic regression as dist. and link function). I've encountered two issues: It seems like in SPSS it is not possible to have a REPEATED statement if the DV is non-scalar. My DV is a repeated measure (pre- and post-treatment for each subject)...
I'm new to GAM so please be patient with me. This is a theoretical question rather than a coding question. I have a model as follows: response variable (y) = insect abundance; Disturbance type (categorical fixed effect) with 3 levels; Transect (categorical fixed effect) with 2 levels; Distance (continuous variable); an...
I am reading Blitzstein's Introduction to Probability and come across with the following proof that I don't really understand: Theorem: The random scan Gibbs sampler is a special case of the Metropolis-Hastings algorithm, in which the proposal is always accepted. In particular, it follows that the stationary distributi...
Mr. X wants to compare 5 different varieties of wheat. He has access to a piece of land which has been divided into 25 smaller plots as shown in the figure below. Mr. X has asked for your help in his venture. (a) Give an allocation of the wheat varieties to the plots so that you're able to compare them. Justify your a...
I think I have a misconception that I hope someone can help me clarify, I do not have a background in measure theory so that might be the problem. Say we have two random variables $X$ and $Y$ distributed according to $f_X(x)$ and $g_Y(y)$ respectively, without necessarily a common support. Both random variables are rel...
I'm trying to do a survival analysis and I want to know how to handle unequal right-censorship. Essentially, people enter the trial at different ages and exit either at death or at the end of the trial. I want to know how to analyze the data against standard actuarial expectations: do those in the trial tend to live lo...
there are participants who are applied 2 different treatment methods. I tested whether these Treatment methods are effective or not with a paired sample t test, but what statistical analysis should I use to test whether the treatment method differs? So basically i'd like to if the treatment methods differs? Below there...
--REPRODUCIBLE EXAMPLE INCLUDED! See below -- Hi! I'm attempting to measure a difference in sales using a Controlled Interrupted Time-Series methodology; that is, I have a collection of 'exposed' and 'unexposed' time series and I am trying to infer the effect of an exposure based on the magnitude of level-change and s...
Setup Suppose I have two normally distributed random variables, $s_\mathrm{prev}$ (with mean $\mu_\mathrm{prev}$ and variance $\sigma^2_\mathrm{prev}$) and $s_\mathrm{curr}$ (with mean $\mu_\mathrm{curr}$ and variance $\sigma^2_\mathrm{curr}$). Now suppose I combine them as follows: $r_\mathrm{curr} = \omega_\mathrm{p...
I am trying to analyze a dataset containing several observations for n = 27. Unfortunately, not every participant answered the question every time, i.e., when plotting the graph it has holes in it. I am trying to provide an analysis of the mean and variance across those functions. For this, I have to smooth them. I can...
I am looking at a particular genomic feature in two sets of genes: set A is a positive control set, where I know this feature is overall enriched in the genomic DNA of these genes, and set B is a (much larger) negative control set, where it occurs at a lower, background frequency. I wanted to see if the distribution of...
I understand that LSTM architectures are purposed for sequential data where an understanding of context could positively contribute to a prediction. But if leaving this factor out (or, i.e., assuming that no context can be learnt from the data), would it be safe to assume that generally, processing larger sequences is ...
Let's suppose I have weighted my population using WeightIt data("lalonde", package = "cobalt") library(cobalt) library(WeightIt) W.out <- weightit(treat ~ age + educ + race + married + nodegree + re74 + re75, data = lalonde, estimand = "ATT", method = "ps") W.out bal.tab(W.out, stats = c("m", "v"), ...
In a conversation about fitting CFA with clusters and sampling weights (inverse probability weights) for ordered/ordinal/categorical data in R Lavaan, fit indices (GoF) were referred to as "voodoo", and robust standard errors as 'true' and 'fake'. Stata does not provide such indices, perhaps for a reason. (I don’t know...
I am trying to build some linear mixed models in SPSS, and am having a little trouble with the syntax - particularly with regards to the repeated measures aspects of my design. I have around 40 participants, each of whom took part in 4 sessions: baseline, active, passive and control. I would like to find out if the rel...
I'm currently trying to re-teach myself some econometrics (last studied about 10 years ago) by reading Causal Inference, the mixtape and the classic Mostly Harmless Econometrics. I'm currently running through the three arguments as to why we should think that linear regression is a sensible thing to do. The first of th...
I am currently investigating the effect of the implementation of eco-labels on unit sales with a difference-in-difference estimation. I have a variable period indicating the pre- and post-period, a variable label indicating whether the product is labelled or not, some control variables and the variable lr which contain...
I'm fitting a logistic regression on a large dataset (n=89260, 17 predictors) with a class imbalance (1% positive class). I've tried to follow Dr. Harrell's teachings so I fit my full pre-specified model (I don't expect any interaction between predictors): Logistic Regression Model lrm(formula = label ~ rcs(ery, 3) + ...
I have been doing a little research about the several cross validation methods but there is an issue that remains as a doubt for me in the Monte Carlo method. Let's suposse I have 2,000 data points. 500 with target 1 and the others 1,500 with target 0. So what will be the correct procedure with balanced train-test data...
I am trying to build a model for predicting Olympics Medal counts. My data looks like this; year country gdp pop athletes gold tot tot_gold avmedals muslim host comm soviet oneparty 1 2000 Afghanistan 5316 20094 0 0 0 298 915 1 0 0 0 0 2 2000 Algeria 54790 3...
I have a linear regression model which its only task is prediction, not inference. I'm making an analysis to check a few assumptions of the linear regression model I created are attended, such as no endogeneity by checking the relationship of the independent variables with the error term, and linearity itself, by check...
I am running some exploratory tests on a dataset and have a conceptual question as I start to dive in. One of the strongest predictors of the DV (which is interest) was level of education, a dummy variable. OLS single regression results below. Residuals: Min 1Q Median 3Q Max -2.6304 -0.6304 0.3...
I wanted to get some opinions with an idea that I have explored for a little bit. This is an experiment and I would like to know if this is mathematically plausible or not. Imagine $\bar{x}$ is the reconstruction of $x$ in a typical vanilla VAE. Since the VAE output is considered lossy, we can assume that the pixels ...
I did propensity score matching for retrospective data, and now I want to run outcome analysis. For dichotomous variables, I heard that I need to do McNemar test since I should treat propensity score matched data as paired ones. Typical t-test table for dichotomous variables would be like: Treatment group Control ...
I have results of testing four different image datasets that are identical in all aspects sample size number of classes, number of images for each class etc. except they were captured using different methods. They are tested on the same object detection model and I have the Precision, Recall and F1 scores of the tests....
I have been searching for an estimator that can find patterns for data with two columns. Below is an example of data to explain what exactly I am working with: A B 1 0.22 1 0.30 1 0.11 2 0.07 2 0.50 2 0.90 3 0.89 3 0.01 3 0.99 4 0.76 4 0.56 4 0.45 So, data is something like this and I ...
I have a dataset with columns: (subject, method, recordingDate, side), which I am modelling in R using lme4: modelA.full <- lmer(ASSR ~ Method + Side + (1|subject/side) + (1|recordingDate/method) + (1|subject/method), data = Data, REML = FALSE); In the above, the point is to model recordingDate & subject as random fac...
I am running a linear regression (random effects GLS) with a log transformed dependent variable and a non-log-transformed independent variable. I am using standardised coefficients. The standardised coefficient of that linear dependent variable is -0.156. I know when the dependent variable is log transformed one needs ...
I am trying to find the best way to fit my data, it looks like a modified sigmoid (code below). The problem I have is that my critical chisquare value is very high, am I then correctly calculating the degrees of freedom ? In my opinion it should be the number of data points minus the parameters of my function ? Then w...
I have used a function in the R package boot that give me diagnostic plots for a generalised linear model: glm.diag.plots(). I dont have experience with these, and thus don´t know how "strict" to be in assessing them. Can I rely on my model? glm(formula = cbind(Hatched, Nothatched) ~ Temperature + Pesticide + Temp...
I have a following issue. Suppose that I would like to know, how age of a marathon runner impacts his or her final marathon time. I run two separated regressions (for men and women): Men: $time = \alpha_{0}^{M} + \beta_{1}^{M} \cdot age$ Women: $time = \alpha_{0}^{W} + \beta_{1}^{W} \cdot age$ Of course, men are faster...
Normally if you have $N$ samples of a random variable, from which you estimate both the sample mean and sample variance, you need to account for the missing degree of freedom in the sample variance: $$Var(X) = \frac{1}{N-1} \sum^N_{i=1} (x_i - \bar{x})^2 $$ But what if the sample mean is estimated from a larger dataset...
As the title suggests, I am trying to divide a group of people randomly into different teams of equal size. However, each person has parameters that go with them (such as age). If there is only one parameter, I understand that it is easy(ish) to equally distribute people based on that single parameter. However, if each...
I know there are several posts about this, but I could not find exactly what I need. I have GPS track data (from an underwater vehicle) for short intervals of 1 second (time-stamps on data). The data are noisy and especially when the vehicle stops the track becomes messy. I'd like to smooth the track to calculate a rea...
So i got a data set, where the depented variables as well as the predictors are binary. Now I'm a bit confused about what test i should use to examine which predictor has a significant influence to y. Below an example data set: set.seed(556) y <- data.frame(y = rbinom(8, 1, 0.6)) predictors <- expand.grid(list(x1 = c(0...
Good morning, I'm interested in the convergence of empirical distribution functions. In particular, let us suppose to have a population with unknown distribution function $ F(x) $ and that I can sequentially draw samples from it. While I collect the samples, I can build a histogram and update it as soon as new samples ...
I want to generate a random sample of size n from poisson distribution with parameter l but the sum of these samples should be equals to some number say y. Is there any way to achieve this? i dont want to generate n-1 samples and subtract the sum of these from y.
I am trying to do Poisson regression from scratch (only using numpy). I have the following code, but the output makes no sense to me. import numpy as np First I generate some data: # generate data x1 = np.random.normal(10, 5, 1000) x2 = np.random.normal(20, 5, 1000) error = np.random.normal(0, 1, 1000) y = 3*x1 + 4*x2...
While I was looking into the difference-in-differences (DiD) approach, I found many posts commenting that beyond ordinary calculations, the model should control for unit and time fixed effects. Suppose: $$y_{} = \beta_0 + \beta_1Treat + \beta_2After + \beta_3(Treat \times After)$$ Why should the above fixed effects be ...
I am having troubles in understanding the formula in cobalt package used for standardized mean difference calculation in BINARY variables data("lalonde", package="cobalt") library(WeightIt) library(cobalt) W.out <- weightit(treat ~ age + educ + race + married + nodegree + re74 + re75, data = lalonde, ...
I have the below dataset: ## Import libraries import pandas as pd from lifelines import WeibullFitter #Create dataset data = {'cycle': [1, 2, 3,], 'breakdown': [1, 0, 1,], } #Convert to dataframe df = pd.DataFrame(data) print("df = \n", df) Now, for a Weibull distribution function, the baseline h...
Assume $\mathbf{h} \in C^{N \times 1}$ is a Gaussian vector with zero mean and Covariance matrix $\mathbf{R}$. Also $\mathbf{A} \in C^{N \times N}$ is a deterministic diagonal matrix. In this case, what is $\mathbb{E}[\mathbf{h} \mathbf{h}^H \mathbf{A} \mathbf{A} \mathbf{h} \mathbf{h}^H]$ ?
I have all in all 600 measurements: 20 subjects x 15 different stimuli x 2 ears (presented in each ear separately). I use 4 different methods to detect whether there is a significant response in each measurement. The output of each method is either 0 (not significant) or 1 (significant). I need to test which method giv...
Are anyone familiar with OpenMx's capacity for handling ordinal data in SEM using a link function like ordered logit or probit (Stata gsem does this)? Some folks have highlighted issues with feeding polychoric matrix data to SEM and CFA, so I look for alternatives (otherwise Lavaan enables that easily). I have read tha...
Let $X_1,...X_n$ be an iid sample distributed as $\mathcal{N}(\mu,1)$. We have the following tests $$H_0: \mu=0~~~\text{vs.}~~~H_1:\mu\neq 0$$and we use the statistic $T=\frac{1}{n}\sum_{k=1}^n X_k$ and the test function $$\delta=\Bbb{1}_{|T|\geq Q}$$ for some $Q>0$. I want to find the probability of committing a type...
A common point of confusion in introductory math stats classes is the difference between the joint density (formally a function of the data parameterized by the parameters) and the likelihood (formally a function of the parameters parameterized by the data). Is there a name for that same expression considered formally ...
I have a dataset of ~2000 phylogenetically linked strains. These strains encode 2 binary traits and were isolated from 3 different environments (A,B,C). I want to test if encoding the traits makes strains more likely to exist in a certain environment, and if the two traits interact (environment ~ trait1*trait2), but I ...
I am looking for a formula to help me determine the accuracy of a population. Here is my business problem. I have about 1 million scanned documents of many types that are currently unclassified sitting in one folder. I have used an AI program to group each different type of document into each own folder. So I now have ...
import numpy as np from scipy.stats import lognorm loc = 0 s = 2.4 #I believe this is sigma scale = np.exp(7.6) #I believe this is mu samples_lognorm = lognorm.rvs(loc=loc, s=s, scale=scale, size=1000000) samples.lognorm.var() The variance equals about 206,844,501,130 $Var=[exp(\sigma^2)-1] * exp(2\mu+\sigma^2)=[ex...
I'm struggling to follow the interpretation of the log coefficients. Union density represents the share of unionized households it is scaled between 0-1. The coefficient for union density is in my case -2.189 for the log(90/10) as a dependent variable. I would interpret the coefficient as follow: A 10 percentage point...
I have a small data frame of lower and upper confidence levels along with means. What I would like to do is compare the means of all rows directly against the first. Here is the DF: upper mean lower phase st1 16592.40 16511.10 16429.80 p1 st2 18782.72 18740.79 18698.85 p2 st3 17819.98 17779.84 1773...
For my model, I need to apply z-normalization to the input data. For train and test, I can denormalize the output since I have the mean and standard deviation for both y-true train and test sets. However, when using the same model for unseen data, I need to apply the same z-normalization step to the input data (each fe...
I am trying to understand the maths of diffusion models following this video explanation on youtube and this blog post. Here is what how I understood it so far: The overall goal is, that we want to maximize the log likelihood $log(p_\theta(x_0))$. We know that maximizing the log likelihood equals minimizing the negati...
I like to figure out how I can retrieve an incidence rate based on a hazard function. So background could be that my hazard function models the prob of the event based on the age of a person (t = time since birth). Of course, the current age distribution in my population is relevant. So my understanding is as follows: ...
Assume that we want to compare the agreement of two methods of measuring blood pressure (e.g. a machine and a sphygmomanometer). In their paper, Preiss & Fisher (2008) discuss the standard deviation of the difference between the two measurement methods, a quantity they call "precision". At the end of the paper, they st...
I am analyzing a dataset, where I have 3 categories (independent variable), and one continuous value (dependent variable). I am studying if the continuous value is significantly different between the three groups. I have 65 values in each category. The 3 groups are homoscedastic, but the dependent variable is not norma...
I have a model in which I set relationships among different variables. One of them is a second-order factor. However, I get the following problem when I try to run the analysis: Warning messages: 1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: Could not compute standard er...
I am analyzing a dataset, where I have 3 categories (independent variable), and one continuous value (dependent variable). I am studying if the continuous value is significantly different between the three groups. I have 65 values in each category. The 3 groups are homoscedastic, but the dependent variable is not norma...
My understanding is that when forecasting if you want to quantify the level of uncertainty of your model, one would typically use predictive intervals. However in Microsoft Excel, when using the 'Forecast Sheet' tool, it appears to be expressing uncertainty using confidence intervals instead. Are confidence intervals m...
Lets say I want to do a different version of PCA, in which I minimize the variances explained. So lets say I find the first such variance minimizing axis $PC^{'}_1$. Then I impose the orthogonality constraint and find the second variance minimizing axis $PC^{'}_2$ and so on, to get $PC^{'}_1, PC^{'}_2,...,PC^{'}_n$. An...
I am stuck with the following problem and hope somebody can help spotting the error. I am not sure if it's a simple math or programming glimbse or whether the issue is more complex (e.g. concerning identification). Let $X$ be Weibull distributed, that is $$ f_x(x;a,b) = \frac{a}{b} \left(\frac{x}{b}\right)^{a-1} \exp \...
So essentially the problem I have is this: I've created an economics simulation which, among other things, tracks the profit rates and capital intensity of all the firms over the course of the simulation . The trouble is, which you can see from the scatterplot of these two variables, is how dense and difficult to read ...
I have a moderated mediation model with 3 IVs, 1 mediator, and 3 DV. I can't find the right model in the templates provided by Andrew Hayes for his SPSS PROCESS macro. What is the correct model and what you suggest to do with several DV? Thank you!
Hello I am trying to test the effect of a treatment type on multiple variables. Basically I have two different types of sites Site A had Harvest A and Site B had a B type Harvest. I went to multiple Sites where Harvest type A was conducted and multiple Sites where Harvest B was conducted. I collected data on the slope ...
I want to run an online survey about people's preferences for environmental policies in different economic sectors using a Likert-type scale (strongly disagree, disagree, etc.). I have 4 sectors and 4 policies. I read somewhere that "each respondent should answer one question from each of the sectors" and that "which q...
Could you, please, help me with the following problem? Suppose we have a one-way ANOVA with a single 2-level factor. The dependent variable is a logarithmized value: $y_i = log(Y_i)$. $y_{iz} = \mu + a_i + \epsilon_{iz}$ $z$ is the number of observations in each $i$ group, different for different $i$. We want to estima...
I have been having this problem with SAS all year and I can fix it, but it ends up being time-consuming. Example: When I use the code attached (a simple ANOVA code) I get errors that say I have invalid data for the treatment code. This seems to be because I have denoted the different treatments using A, B, C, D, and E....
I have this example code that comes from here. Optimal number of features recommended by rfecv is 3. But if want to build the model with only 1 or 2 features, how should I select those features? """ =================================================== Recursive feature elimination with cross-validation =================...
I am hopping to use Gaussian Processes (GPs) to model scientific values that can only be positive (think weight, length...). However, GPs map the latent variable as Gaussian distributions spanning across positive and negative numbers. Are there any ways to create a map from the real numbers to the positive real numbers...
I need help writing a SARIMA model I have obtained mathematically. My model is ARIMA(2,1,0)(0,1,0) period 12. I understand what the different parts actually mean but get very lost trying to write out the mathematical model. I have tried to follow other examples but as the models differ it makes it hard to apply it to w...
Currently, I am reviewing this document: https://www.cs.waikato.ac.nz/~mhall/thesis.pdf. In section 4.2.3 it describes an MDL measure of attribute quality to correlate two nominal features. Nevertheless, I haven't managed to understand the computation of MDL. Are there any implementations in Python? Are there any alter...
I am trying to understand the implementation of the following loss function in training Discriminator part. Loss function maximize log(D(x)) + log(1 - D(G(z))) Code ############################ # (1) Update D network: maximize log(D(x)) + log(1 - D(G(z))) ########################### # train with real ...