id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_78115080
stackoverflow
DATA_SCIENCE
Mismatching Python and MATLAB
Mismatching Python and MATLAB I have starting to fit lognormal distribution to my data, but I was a bit sceptical about the results I got. So, I double checked it with MATLAB and found completely different results. The fitting parameters are no way close to each other in Python and MATLAB. So, I came up to do another ...
https://stackoverflow.com/questions/78115080/mismatching-python-and-matlab
python, matlab, scipy, statistics
1,709,734,411
se_77382705
stackoverflow
DATA_SCIENCE
Why does pd.cut produce NaN values
Why does pd.cut produce NaN values Why does pd.cut produce NaN values ? Input s = pd.Series(np.arange(6)) df = pd.DataFrame({'Bin': pd.cut(s, [105, 110, 115, 120, 125, 130]), 'Frequency': [2,5,6,8,8,1]}) df Output Expected output
https://stackoverflow.com/questions/77382705/why-does-pd-cut-produce-nan-values
python, pandas, dataframe, statistics
1,698,571,695
se_78101586
stackoverflow
DATA_SCIENCE
What needs to be done to include a categorical and numerical covariate (eg gender and age)?
What needs to be done to include a categorical and numerical covariate (eg gender and age)? I have the following code, and Gender is a dummy variable as M0, F1: Example Data: ID Feature Age Gender Category 1 96 30 0 category 1 2 57 42 0 category 1 3 82 37 0 category 1 4 87 43 1 category 1 5 ...
https://stackoverflow.com/questions/78101586/what-needs-to-be-done-to-include-a-categorical-and-numerical-covariate-eg-gende
r, statistics, emmeans, ancova
1,709,558,968
se_71924127
stackoverflow
DATA_SCIENCE
Simulating expectation of continuous random variable
Simulating expectation of continuous random variable Currently I want to generate some samples to get expectation & variance of it. Given the probability density function: f(x) = {2x, 0 <= x <= 1; 0 otherwise} I already found that E(X) = 2/3, Var(X) = 1/18, my detail solution is from here https://math.stackexchange.co...
https://stackoverflow.com/questions/71924127/simulating-expectation-of-continuous-random-variable
python, numpy, statistics, simulation, distribution
1,650,367,334
se_78090095
stackoverflow
DATA_SCIENCE
Relatively easy way to overlay a seaborn historigram with normal distribution plot
Relatively easy way to overlay a seaborn historigram with normal distribution plot Have a dataframe for which I've created a histogram in Seaborn: import seaborn as sns sns.histplot(df, bins=100) I'm also able to create a pdf from its distribution: import scipy.stats as stats import numpy as np import matplotlib.pyp...
https://stackoverflow.com/questions/78090095/relatively-easy-way-to-overlay-a-seaborn-historigram-with-normal-distribution-pl
python, pandas, statistics, seaborn, visualization
1,709,322,086
se_78090040
stackoverflow
DATA_SCIENCE
what&#39;s the result of dividing the max value by min value and then minus 1
what&#39;s the result of dividing the max value by min value and then minus 1 we have the following dataset this is just a sample 30 59.000000 63 75.873721 64 74.619113 the max value is 75.873721 and the min value is 59. the question was How much heavier the age group with the highest average weight than the age...
https://stackoverflow.com/questions/78090040/whats-the-result-of-dividing-the-max-value-by-min-value-and-then-minus-1
python, pandas, statistics, data-analysis
1,709,321,393
se_78080491
stackoverflow
DATA_SCIENCE
Forecast the total energy consumption of country
Forecast the total energy consumption of country We have conducted a survey of 4,000 households across the entire country, with samples taken from few city in several states. For instance, in a few cities within a state, we have a sample size of 30. Now, with only the city populations as the known factors, I want to e...
https://stackoverflow.com/questions/78080491/forecast-the-total-energy-consumption-of-country
statistics
1,709,201,402
se_78085070
stackoverflow
DATA_SCIENCE
Sampling Variance of OLS Estimators of Regression Coefficients
Sampling Variance of OLS Estimators of Regression Coefficients I am confused about whether the value of the sampling variance of the OLS estimator of a regression coefficient (e.g. slope) differs from sample to sample. Assume we have the following simple linear regression model: $Y = \beta_0 + \beta_1X + \epsilon$ whe...
https://stackoverflow.com/questions/78085070/sampling-variance-of-ols-estimators-of-regression-coefficients
statistics, regression, linear-regression
1,709,254,881
se_49219579
stackoverflow
DATA_SCIENCE
Fitting a lognormal or poisson distribution
Fitting a lognormal or poisson distribution I have a vector of 1096 numbers, the daily average concentration of NOx measured in 3 years in a measurement station. You can observe the type of distribution in the image: I used these commands to do the histogram: NOxV<-scan("NOx_Vt15-17.txt") hist.NOxVt<-hist(NOxV, plot ...
https://stackoverflow.com/questions/49219579/fitting-a-lognormal-or-poisson-distribution
r, statistics, normal-distribution, poisson, model-fitting
1,520,768,378
se_78077269
stackoverflow
DATA_SCIENCE
Gnuplot: Meaning of the second column of smooth kdensity
Gnuplot: Meaning of the second column of smooth kdensity I am new to gnuplot. I am also new to the Kernel Density Resampling using a Gaussian supported by gnuplot using “smooth kdensity”. I played with the gnuplot demo script provided below. I am trying to understand what the meaning of the second column is of $kdensi...
https://stackoverflow.com/questions/78077269/gnuplot-meaning-of-the-second-column-of-smooth-kdensity
statistics, gnuplot, kernel-density
1,709,150,522
se_78078842
stackoverflow
DATA_SCIENCE
Correct way to generate random numbers from a log-normal distribution in R
Correct way to generate random numbers from a log-normal distribution in R I have a data set of household incomes. I want to fit a log-normal distribution to the data then generate random numbers from that distribution. The approach below using the MASS package seems to give incorrect results. When I create a large sa...
https://stackoverflow.com/questions/78078842/correct-way-to-generate-random-numbers-from-a-log-normal-distribution-in-r
r, random, statistics, distribution, mass
1,709,180,666
se_1575676
stackoverflow
DATA_SCIENCE
How to find out SQL Server table&#39;s read/write statistics?
How to find out SQL Server table&#39;s read/write statistics? Is there a way to find a statistics on table read and write count on SQL Server 2005/2008? I am specifically looking for DMVs/DMFs without using triggers or audits. The goal here is to find out appropriate fill factor for indexes - got an idea from this a...
https://stackoverflow.com/questions/1575676/how-to-find-out-sql-server-tables-read-write-statistics
sql-server, t-sql, statistics, fillfactor
1,255,649,485
se_78073906
stackoverflow
DATA_SCIENCE
compute Sobol first order index
compute Sobol first order index I am trying to compute Sobol index by myself using python but I am facing some problems. The formula is very simple however I don't understand some part : Here, E[Y|Qi] denotes the expected value of the output Y when parameter Qi is fixed. The first order Sobol sensitivity index tells ...
https://stackoverflow.com/questions/78073906/compute-sobol-first-order-index
python, statistics, stat
1,709,118,321
se_77928066
stackoverflow
DATA_SCIENCE
Optimization Strategy for Data Retrieval from APIs with Row Limits
Optimization Strategy for Data Retrieval from APIs with Row Limits I'm currently working on a data scraping project where I need to retrieve large amounts of data from several statistical APIs. These APIs, particularly older and government ones, often do not support bulk downloads for entire datasets. Instead, they re...
https://stackoverflow.com/questions/77928066/optimization-strategy-for-data-retrieval-from-apis-with-row-limits
python, algorithm, statistics, combinations, combinatorics
1,706,887,167
se_76167770
stackoverflow
DATA_SCIENCE
plot estimates with 95%CI from lmer model
plot estimates with 95%CI from lmer model I need help in plotting the estimates and 95% CI from Lmer model, i am using plot_model from sjplot function. library(lme4) # linear mixed-effects models library(lmerTest) # test for linear mixed-effects models library(gtsummary) library(sjPlot) library(ggplot2) names...
https://stackoverflow.com/questions/76167770/plot-estimates-with-95ci-from-lmer-model
r, ggplot2, statistics, sjplot
1,683,145,875
se_77799335
stackoverflow
DATA_SCIENCE
R calculate confidence interval for mean in aggregate, by function
R calculate confidence interval for mean in aggregate, by function I am intended to create a script that can generate a statistical information, grouped based on category (which in the example below; SDP & M346). I need the n, mean, standard deviation (sd), standard error (se) and confidence interval. I have the code ...
https://stackoverflow.com/questions/77799335/r-calculate-confidence-interval-for-mean-in-aggregate-by-function
r, statistics, aggregate, confidence-interval, group
1,704,969,011
se_54255022
stackoverflow
DATA_SCIENCE
Automated statistics gathering from C# applications
Automated statistics gathering from C# applications I have made a C# application , now I want to create custom survey (actually sending data automatically to me, about - crashes , usage duration etc.) to enhance my application . How can I do it ?
https://stackoverflow.com/questions/54255022/automated-statistics-gathering-from-c-applications
c#, statistics, web-statistics
1,547,818,100
se_78063195
stackoverflow
DATA_SCIENCE
Why do SARIMA coefficients differ in R, Python, and STATA?
Why do SARIMA coefficients differ in R, Python, and STATA? I have been trying to understand how STATA, R, and Python handle SARIMA forecasting differently, and why the same models have produced different predictions. I started trying to match coefficients, and have been unable to get matching results, despite trying m...
https://stackoverflow.com/questions/78063195/why-do-sarima-coefficients-differ-in-r-python-and-stata
python, r, statistics, stata, sarimax
1,708,972,764
se_70406964
stackoverflow
DATA_SCIENCE
Is scipy.odr computing total least squares or a special case of it?
Is scipy.odr computing total least squares or a special case of it? An answer to this question claims that scipy.odr should compute an orthogonal regression and that it will be equal to the total least squares solution. You can use scipy.odr it will compute orthogonal regression which should be equal to tls. However...
https://stackoverflow.com/questions/70406964/is-scipy-odr-computing-total-least-squares-or-a-special-case-of-it
python, scipy, statistics
1,639,859,969
se_78062957
stackoverflow
DATA_SCIENCE
What is the correct way to perform one sample paired wilcoxon test in R?
What is the correct way to perform one sample paired wilcoxon test in R? Let's say I have a dataframe called df, with two variables - weight_0 and weight_1. weight_0 describes the weight of participants before intervention, and weight_1 describes the weight of the same participants after intervention. Now, I want to k...
https://stackoverflow.com/questions/78062957/what-is-the-correct-way-to-perform-one-sample-paired-wilcoxon-test-in-r
r, statistics
1,708,970,114
se_10850883
stackoverflow
DATA_SCIENCE
Integrating a Bayes probability distribution
Integrating a Bayes probability distribution Suppose we have a well-defined probability distribution that is conditional upon a certan parameter: p(x|a)*p(a), like in a Bayes approach. Now, in order to find x, I might want to integrate over all values of a. Is there a general approach to such mathematical problem usi...
https://stackoverflow.com/questions/10850883/integrating-a-bayes-probability-distribution
java, math, statistics, numerical-integration
1,338,555,929
se_78030780
stackoverflow
DATA_SCIENCE
Calculating a running performance score for time-series setpoint following
Calculating a running performance score for time-series setpoint following Say I have a pandas dataframe containing time series data of a Setpoint (SP) and the actual output, as well as two calculated columns containing the setpoint delta (change from the previous timestep) and the error (Setpoint - Output). Setp...
https://stackoverflow.com/questions/78030780/calculating-a-running-performance-score-for-time-series-setpoint-following
python, pandas, performance, time, statistics
1,708,470,977
se_78055406
stackoverflow
DATA_SCIENCE
Is there any differences to the subtraction order in squared error function?
Is there any differences to the subtraction order in squared error function? I have a question about finding a saddle point of squared error function. So let's say there's a matrix of a target output, Y, and matrix of a real output, X. So we got squared error function: E = (Y-X)^t (Y-X) But I also can rewrite this to:...
https://stackoverflow.com/questions/78055406/is-there-any-differences-to-the-subtraction-order-in-squared-error-function
math, deep-learning, neural-network, statistics, linear-algebra
1,708,852,276
se_56517919
stackoverflow
DATA_SCIENCE
Evaluating integral using Riemann sums
Evaluating integral using Riemann sums How to evaluate J=P(0<=Z<=1), where Z~N(0,1) using Riemann sums? so J is the integral from 0 to 1 of the function (1/sqrt(2*pi))*exp^((-x^2)/2) Here is my approach to implement this in R m<-5000 a<-0 b<-1 w<-(b-a)/m x<-seq(a+(w/2),b-(w/2),w) h<-(1/sqrt(2*pi))*exp^((-x^2)/...
https://stackoverflow.com/questions/56517919/evaluating-integral-using-riemann-sums
r, math, statistics, simulation, numerical-integration
1,560,109,915
se_8596160
stackoverflow
DATA_SCIENCE
Why am I getting &quot;algorithm did not converge&quot; and &quot;fitted prob numerically 0 or 1&quot; warnings with glm?
Why am I getting &quot;algorithm did not converge&quot; and &quot;fitted prob numerically 0 or 1&quot; warnings with glm? So this is a very simple question, just can't seem to figure it out. I'm running a logit using the glm function, but keep getting warning messages relating to the independent variable. They're sto...
https://stackoverflow.com/questions/8596160/why-am-i-getting-algorithm-did-not-converge-and-fitted-prob-numerically-0-or
r, statistics, r-zelig
1,324,500,580
se_78047544
stackoverflow
DATA_SCIENCE
Module_Error_Not_Found_in_Khernel
Module_Error_Not_Found_in_Khernel I was in my Python Khernel, the virtual Khernel to be precise, and then I ran the below code from ydata_profiling import ProfileReport However, I kept on getting the error message ModuleNotFoundError Traceback (most recent call last) Cell In\[10\], line 1 \----\>...
https://stackoverflow.com/questions/78047544/module-error-not-found-in-khernel
python, statistics
1,708,692,861
se_55107795
stackoverflow
DATA_SCIENCE
Why doesn&#39;t Grafana show me the correct count?
Why doesn&#39;t Grafana show me the correct count? I'm trying to do something in Grafana/Graphite which should be really easy, but has me baffled. I'd like to get the total by which a count has increased during the period I select in the top right corner of the Grafana UI. Users of our site can import content from va...
https://stackoverflow.com/questions/55107795/why-doesnt-grafana-show-me-the-correct-count
statistics, grafana, graphite, statsd
1,552,327,242
se_77609409
stackoverflow
DATA_SCIENCE
HMM R package Error in if (d &lt; delta) { : missing value where TRUE/FALSE needed
HMM R package Error in if (d &lt; delta) { : missing value where TRUE/FALSE needed I am trying to use HMM package in R. I want 4 hidden states, and my observed values range from 2 to 15. I can initialize the hidden model without any issues: if (!require(HMM, quietly = TRUE)) { install.packages("HMM") library(HMM) ...
https://stackoverflow.com/questions/77609409/hmm-r-package-error-in-if-d-delta-missing-value-where-true-false-needed
r, machine-learning, statistics, hidden-markov-models, markov
1,701,812,712
se_78036566
stackoverflow
DATA_SCIENCE
How do I iterate a command over many columns of a data frame in R?
How do I iterate a command over many columns of a data frame in R? I have a command: t.test(df$gene1[1:20],df$gene1[21:40],alternative=c("two.sided")) Which returns two-sided t-test between two groups in the column "gene1" in my data frame: Group 1: Values in rows 1-20 Group 2: values in rows 21-40. I would like to i...
https://stackoverflow.com/questions/78036566/how-do-i-iterate-a-command-over-many-columns-of-a-data-frame-in-r
r, statistics
1,708,543,290
se_78035372
stackoverflow
DATA_SCIENCE
How do I perform multiple statistical tests in R (ie. two sided t test) on large data imported from .csv?
How do I perform multiple statistical tests in R (ie. two sided t test) on large data imported from .csv? Trying to perform a ttest on data imported using csv. The data looks like this: With values for "normal" cases and "cancer" cases for 99 genes. How might I set up code to statistically compare "normal" and "cance...
https://stackoverflow.com/questions/78035372/how-do-i-perform-multiple-statistical-tests-in-r-ie-two-sided-t-test-on-large
r, statistics
1,708,531,154
se_78031007
stackoverflow
DATA_SCIENCE
Mediation and binary logistic regression - is this even possible with R?
Mediation and binary logistic regression - is this even possible with R? I am a beginner and have my term paper due next week. As I said, I'm carrying out a binary logistic regression with Mediator. I wanted to calculate the effect using mediate(), but I get an error: Error in mediate(Model2, Model3, treat = "Sat_dem...
https://stackoverflow.com/questions/78031007/mediation-and-binary-logistic-regression-is-this-even-possible-with-r
r, statistics, regression, logistic-regression, mediator
1,708,475,810
se_78029495
stackoverflow
DATA_SCIENCE
PostgreSQL / TimescaleDB percentile in partial mode
PostgreSQL / TimescaleDB percentile in partial mode Let's say I have a results table: result_id attr_id user_id value timestamp 1 1 1 100 2024-02-10 14:30:15.248087+00 2 2 1 111 2024-02-10 10:30:15.248087+00 3 1 1 122 2024-02-09 14:30:15.248087+00 4 2 1 162 2024-02-08 10:30:15.248087+00 5 1 2 119 2024-0...
https://stackoverflow.com/questions/78029495/postgresql-timescaledb-percentile-in-partial-mode
postgresql, statistics, data-analysis, timescaledb
1,708,452,312
se_78029183
stackoverflow
DATA_SCIENCE
Difference between automated stat_summary statistics and standard error by hand
Difference between automated stat_summary statistics and standard error by hand I'm plotting the mean and confidence intervals of a grouped variable using {ggplot2} and noticed that if I calculate the confidence intervals by hand or use stat_summary() I get slightly different results. Does anyone have any idea what mi...
https://stackoverflow.com/questions/78029183/difference-between-automated-stat-summary-statistics-and-standard-error-by-hand
r, ggplot2, statistics
1,708,448,965
se_21494141
stackoverflow
DATA_SCIENCE
How do I do a F-test in python
How do I do a F-test in python How do I do an F-test to check if the variance is equivalent in two vectors in Python? For example if I have a = [1,2,1,2,1,2,1,2,1,2] b = [1,3,-1,2,1,5,-1,6,-1,2] is there something similar to scipy.stats.ttest_ind(a, b) I found sp.stats.f(a, b) But it appears to be somethi...
https://stackoverflow.com/questions/21494141/how-do-i-do-a-f-test-in-python
python, statistics
1,391,229,591
se_78021472
stackoverflow
DATA_SCIENCE
Scipy Differential Evolution - Extraction of percentage of invalid population energies (via callback?)
Scipy Differential Evolution - Extraction of percentage of invalid population energies (via callback?) I am currently working on an optimization problem and would like to extract the information of the fraction of invalid population energies from the package during each iteration step of the optimization. Currently I ...
https://stackoverflow.com/questions/78021472/scipy-differential-evolution-extraction-of-percentage-of-invalid-population-en
python, optimization, scipy, statistics, differential-evolution
1,708,353,658
se_72813507
stackoverflow
DATA_SCIENCE
median(x) is does not correctly return the middle value of x
median(x) is does not correctly return the middle value of x I have a really frustrating problem with R. What I want is fairly easy: I have a vector of numeric values (without NA) and want to calculate the median value. To perform this easy task I wrote the following line: #returning 4.0585 medianOfVector <- median(da...
https://stackoverflow.com/questions/72813507/medianx-is-does-not-correctly-return-the-middle-value-of-x
r, dataframe, statistics, median
1,656,581,848
se_1735870
stackoverflow
DATA_SCIENCE
Simple statistics - Java packages for calculating mean, standard deviation, etc
Simple statistics - Java packages for calculating mean, standard deviation, etc Could you please suggest any simple Java statistics packages? I don't necessarily need any of the advanced stuff. I was quite surprised that there does not appear to be a function to calculate the Mean in the java.lang.Math package... Wh...
https://stackoverflow.com/questions/1735870/simple-statistics-java-packages-for-calculating-mean-standard-deviation-etc
java, math, statistics, package
1,258,238,622
se_893657
stackoverflow
DATA_SCIENCE
How do I calculate r-squared using Python and Numpy?
How do I calculate r-squared using Python and Numpy? I'm using Python and Numpy to calculate a best fit polynomial of arbitrary degree. I pass a list of x values, y values, and the degree of the polynomial I want to fit (linear, quadratic, etc.). This much works, but I also want to calculate r (coefficient of correl...
https://stackoverflow.com/questions/893657/how-do-i-calculate-r-squared-using-python-and-numpy
python, math, statistics, numpy, curve-fitting
1,242,921,354
se_78009223
stackoverflow
DATA_SCIENCE
Inter rater agreement computation
Inter rater agreement computation In my study we let 10 human raters rate 2 books on 3 aspects (accuracy, clarity, simplicity). I am trying to calculate the inter-rater agreement but facing issue which I am unable to resolve. I am new to R programming. here is a reproducible example and i request your help! data <- da...
https://stackoverflow.com/questions/78009223/inter-rater-agreement-computation
r, statistics
1,708,106,660
se_77943099
stackoverflow
DATA_SCIENCE
Building a 6/49 Lotto Ticket Simulation
Building a 6/49 Lotto Ticket Simulation I am working on a project for college which models a 6/49 Lotto luck game. A ticket is created by choosing 6 different numbers from 1 to 49. I have to simulate 10^6 tickets and compare it with a lucky ticket. I want to find out the cardinal of the intersection of the 6 numbers o...
https://stackoverflow.com/questions/77943099/building-a-6-49-lotto-ticket-simulation
r, statistics, simulation
1,707,156,377
se_77992762
stackoverflow
DATA_SCIENCE
Statistical Analysis of antibiograms
Statistical Analysis of antibiograms I'm currently working on a dataset obtained from different antibiograms tests of different people. My aim is to propose a model to predict and study sensibility/resistance of atibiotics. I'll attach an example of the dataframe for more visual information but to resume I have 900 p...
https://stackoverflow.com/questions/77992762/statistical-analysis-of-antibiograms
python, pandas, dataframe, statistics, logistic-regression
1,707,897,364
se_77986988
stackoverflow
DATA_SCIENCE
How to define EC50 and R squares?
How to define EC50 and R squares? I have a data set as df: df <- data.frame( Cases = rep(c("A", "B"), each = 8), X = c(555.00, 138.75, 34.69, 8.67, 2.17, 0.54, 0.14, 0.03, 555.00, 138.75, 34.69, 8.67, 2.17, 0.54, 0.14, 0.03), Y = c(2.00000000, 1.98330401, 1.45089675, 0.84291381, 0.26096319, -0.36891128, -0...
https://stackoverflow.com/questions/77986988/how-to-define-ec50-and-r-squares
r, dataframe, statistics, drc
1,707,818,049
se_77985337
stackoverflow
DATA_SCIENCE
How can I calculate the difference between two named columns in a huge CSV file, then save the results to a second CSV file?
How can I calculate the difference between two named columns in a huge CSV file, then save the results to a second CSV file? I have a CSV file containing almost 200 million rows (gigabytes of data). It has only 5 columns. I want to iterate over the data and do simple calculations, first between columns, but then betwe...
https://stackoverflow.com/questions/77985337/how-can-i-calculate-the-difference-between-two-named-columns-in-a-huge-csv-file
python, pandas, dataframe, statistics, bigdata
1,707,792,420
se_77981495
stackoverflow
DATA_SCIENCE
Is this an incorrect Mann-Whitney U statistic using Apache Commons?
Is this an incorrect Mann-Whitney U statistic using Apache Commons? Using the staology.com website, I did a Mann-Whitney test in both Java and in Python. Yet, the Java version appears to be incorrect or I did something wrong. The Python logic matches the website (https://www.statology.org/mann-whitney-u-test/). Here i...
https://stackoverflow.com/questions/77981495/is-this-an-incorrect-mann-whitney-u-statistic-using-apache-commons
python, java, statistics
1,707,741,482
se_77985148
stackoverflow
DATA_SCIENCE
How to do a Bayesian Repeated Measures ANOVA analysis with missing cells in R?
How to do a Bayesian Repeated Measures ANOVA analysis with missing cells in R? Suppose I am trying to measure people's Happiness depending on Time of Day (Morning/Afternoon/Evening) and Ice Cream Flavor (Chocolate/Strawberry/Vanilla) through a 1-7 scale. Participants are divided into three groups (A/B/C) following the...
https://stackoverflow.com/questions/77985148/how-to-do-a-bayesian-repeated-measures-anova-analysis-with-missing-cells-in-r
r, statistics, bayesian, experimental-design
1,707,787,630
se_77974651
stackoverflow
DATA_SCIENCE
I am trying to make a simple program to go through survey data for a project at school, but it is not working
I am trying to make a simple program to go through survey data for a project at school, but it is not working The program has pygame imported, but it is not going to be used yet. Here is my code, along with an explanation of what I want it to do: import pygame as pg import csv import math import os # question class cl...
https://stackoverflow.com/questions/77974651/i-am-trying-to-make-a-simple-program-to-go-through-survey-data-for-a-project-at
python, statistics
1,707,597,542
se_44793722
stackoverflow
DATA_SCIENCE
Type-II error in Hypothesis Testing
Type-II error in Hypothesis Testing I am new to Statistics and was reading about Decision errors in Hypothesis Testing. My question is that why is Type-II error an error at all? From what I understand, it arises when we fail to reject a false null hypothesis. When we fail to reject null hypothesis, it simply means th...
https://stackoverflow.com/questions/44793722/type-ii-error-in-hypothesis-testing
statistics, p-value, hypothesis-test
1,498,624,472
se_77979277
stackoverflow
DATA_SCIENCE
What is an efficient way to generate 10000 samples for 16 sets of parameters in R?
What is an efficient way to generate 10000 samples for 16 sets of parameters in R? I'm asked to solve the following problem: But I have trouble generating the 10000 samples using 16 sets of parameters. Here's what I have done: library(MASS) library(data.table) library(Matrix) library(stats) set.seed(2000) options(sci...
https://stackoverflow.com/questions/77979277/what-is-an-efficient-way-to-generate-10000-samples-for-16-sets-of-parameters-in
r, statistics, simulation
1,707,710,807
se_77936703
stackoverflow
DATA_SCIENCE
How would I convert this 4x4 transiton matrix to a 2x2 transition matrix while maintaing that all rows sum to 1
How would I convert this 4x4 transiton matrix to a 2x2 transition matrix while maintaing that all rows sum to 1 Say I have a transition matrix with 4 states labeled 1 to 4 as follows: matrix = [[.25,.25,.5,0], [ 0,.25,.5,.25], [.25,.25,.25,.25], [.25,.25,0, .5 ]] Say I want to convert th...
https://stackoverflow.com/questions/77936703/how-would-i-convert-this-4x4-transiton-matrix-to-a-2x2-transition-matrix-while-m
matrix, statistics, probability, markov-chains, markov
1,707,065,452
se_77950336
stackoverflow
DATA_SCIENCE
1D kernel estimation to compare PDF ratios: how to set tails?
1D kernel estimation to compare PDF ratios: how to set tails? Trying to create 1D kernels from data observations (weekly time points). I have been using the density() function from the stats R package. I am doing this so I can take the ratio of a treatment's pdf and the control pdf along the x-axis, and then perform p...
https://stackoverflow.com/questions/77950336/1d-kernel-estimation-to-compare-pdf-ratios-how-to-set-tails
r, statistics, kernel-density, probability-density, density-plot
1,707,246,978
se_77969175
stackoverflow
DATA_SCIENCE
Is there a way to reuse a glm fit, if all I have is the model fit call and summary?
Is there a way to reuse a glm fit, if all I have is the model fit call and summary? I'm working from a project built by a previous programmer. The call to glm() the programmer has in their documentation is glm(formula = AVAL ~ AUC, family = binomial(), data = logreg.dat) I have the output from that code, but none of ...
https://stackoverflow.com/questions/77969175/is-there-a-way-to-reuse-a-glm-fit-if-all-i-have-is-the-model-fit-call-and-summa
r, statistics, glm, modeling, auc
1,707,492,383
se_39581893
stackoverflow
DATA_SCIENCE
Find percentile stats of a given column
Find percentile stats of a given column I have a pandas data frame my_df, where I can find the mean(), median(), mode() of a given column: my_df['field_A'].mean() my_df['field_A'].median() my_df['field_A'].mode() I am wondering is it possible to find more detailed statistics such as the 90th percentile?
https://stackoverflow.com/questions/39581893/find-percentile-stats-of-a-given-column
python, pandas, statistics, quantile, percentile
1,474,318,257
se_77963413
stackoverflow
DATA_SCIENCE
Simulating heteroscedacticity
Simulating heteroscedacticity I'm trying to simulate a simple regression model with varying degree of heteroscedacticity. I want to make a simple simulation that shows how increasing heteroscedacticity affects various parts of the model (coefficients vs standard errors etc.). Here is the code so far: N <- 1e4 x <- rno...
https://stackoverflow.com/questions/77963413/simulating-heteroscedacticity
r, statistics
1,707,410,796
se_48844295
stackoverflow
DATA_SCIENCE
Computing autocorrelation of vectors with numpy
Computing autocorrelation of vectors with numpy I'm struggling to come up with a non-obfuscating, efficient way of using numpy to compute a self correlation function in a set of 3D vectors. I have a set of vectors in a 3d space, saved in an array a = array([[ 0.24463039, 0.58350592, 0.77438803], [ 0.304759...
https://stackoverflow.com/questions/48844295/computing-autocorrelation-of-vectors-with-numpy
python, numpy, statistics, stochastic-process
1,518,890,519
se_77944040
stackoverflow
DATA_SCIENCE
Limma regression with interaction
Limma regression with interaction I want to run some epigenome wide association studies based on city and pollutant type, could you please suggest if I can get DNA methylation sites (CpG) association based on pollutant type for each city. like below I am trying to find Pb toxic elements association site in four differ...
https://stackoverflow.com/questions/77944040/limma-regression-with-interaction
r, statistics, regression, limma
1,707,167,690
se_77943641
stackoverflow
DATA_SCIENCE
Accounting for upper limit in data input for ols estimator
Accounting for upper limit in data input for ols estimator I have a seemingly simple issue which i do not know how to solve. We run a student cinema and I wanted to estimate how many visitors we will get based on how many likes on instagram we got. The problem is that we can only fit 220 people in the room and because...
https://stackoverflow.com/questions/77943641/accounting-for-upper-limit-in-data-input-for-ols-estimator
r, statistics
1,707,163,078
se_77927413
stackoverflow
DATA_SCIENCE
regression model for toxic elements and epigenetic age
regression model for toxic elements and epigenetic age We are trying to find the association between soil toxic elements and epigenetic age acceleration in four different cities: BKI, DAUS, SRINA, and PALLA. We have measured the soil toxic elements using ICP-MS, and epigenetic age acceleration was calculated after reg...
https://stackoverflow.com/questions/77927413/regression-model-for-toxic-elements-and-epigenetic-age
r, statistics, regression
1,706,881,154
se_7175578
stackoverflow
DATA_SCIENCE
.NET numerical libraries
.NET numerical libraries we used in the past the Extreme Numerics library from Extreme Optimization (http://www.extremeoptimization.com) for our calculation kernel. We need now the BETA INV function which is not included in such library. Can anybody suggest any commercial level alternative to the mentioned one? Fr...
https://stackoverflow.com/questions/7175578/net-numerical-libraries
c#, .net, statistics
1,314,189,714
se_42096271
stackoverflow
DATA_SCIENCE
Post-Hoc tests for chi-sq in R
Post-Hoc tests for chi-sq in R I have a table that looks like this. > dput(theft_loc) structure(c(13704L, 14059L, 14263L, 14450L, 14057L, 15503L, 14230L, 16758L, 15289L, 15499L, 16066L, 15905L, 18531L, 19217L, 12410L, 13398L, 13308L, 13455L, 13083L, 14111L, 13068L, 19569L, 18771L, 19626L, 20290L, 19816L, 20923L, ...
https://stackoverflow.com/questions/42096271/post-hoc-tests-for-chi-sq-in-r
r, statistics
1,486,488,682
se_77935703
stackoverflow
DATA_SCIENCE
R: Contingency table shows 0 counts for categorical data
R: Contingency table shows 0 counts for categorical data I want to perform a chi-square test on categorical data to see if there are any differences. there are 3 groups and each group can have an item that can be 1 of 19 different types. data example: Group1 Group2 Group3 TypeA TypeP TypeB head(df) R...
https://stackoverflow.com/questions/77935703/r-contingency-table-shows-0-counts-for-categorical-data
r, statistics
1,707,048,424
se_77929934
stackoverflow
DATA_SCIENCE
fit bimodal skewed gaussian
fit bimodal skewed gaussian I have some data that I am trying to fit with a bimodal skewed gaussian. I started with a standadard bimodal gaussian and the data is just too skew. I also want to be able to extract the underlying gaussian. For the bimodal, I have (it is a bit more than needed due to the loop and the plott...
https://stackoverflow.com/questions/77929934/fit-bimodal-skewed-gaussian
python, statistics, curve-fitting, normal-distribution
1,706,909,356
se_77910105
stackoverflow
DATA_SCIENCE
How to add summary statistics next to a legend in ggplot2?
How to add summary statistics next to a legend in ggplot2? I have the following simulated data library(fitdistrplus) values <- sample(20:50, 100, replace = TRUE) df <- data.frame(values) and I want to create a histogram as follow create_histogram <- function(data_set, column_name, bins_number) { colname <- ...
https://stackoverflow.com/questions/77910105/how-to-add-summary-statistics-next-to-a-legend-in-ggplot2
r, ggplot2, statistics, histogram
1,706,659,492
se_77921985
stackoverflow
DATA_SCIENCE
How can I ensure convergence of my BAM model with mgcv in R?
How can I ensure convergence of my BAM model with mgcv in R? I am trying to fit a binomial GAM using the mgcv library in R. Because I have a high number of data points (~20,000), I am using the bam function. The structure of the model is as follows: Model <- bam(PresAbs ~ s(X1,bs="ts", k=30) + s(X2,bs...
https://stackoverflow.com/questions/77921985/how-can-i-ensure-convergence-of-my-bam-model-with-mgcv-in-r
r, statistics, gam, mgcv
1,706,806,259
se_77914325
stackoverflow
DATA_SCIENCE
How to add legends in ggplot for a curve that derive from another df?
How to add legends in ggplot for a curve that derive from another df? I need to show a series of data points and their mean over-impressed with standard deviation error bars, but I can't manage to impose the legend regarding the mean line, dots and error bars (so i need 2 legends, the one for the points and another o...
https://stackoverflow.com/questions/77914325/how-to-add-legends-in-ggplot-for-a-curve-that-derive-from-another-df
r, ggplot2, statistics
1,706,713,223
se_77920461
stackoverflow
DATA_SCIENCE
Solve for effect size using T Test inputs in C#
Solve for effect size using T Test inputs in C# I am trying to replicate a function in c# that I used in a Python project. The library I used in Python was "statsmodels" and the function is TTestPower.solve_power( and it looks as follows: TTestPower.solve_power(effect_size=None, nobs=None, alpha=None, power=None, alte...
https://stackoverflow.com/questions/77920461/solve-for-effect-size-using-t-test-inputs-in-c
python, c#, statistics
1,706,793,109
se_77913581
stackoverflow
DATA_SCIENCE
Querying database with eloquent to get a sum of values for statistics charts
Querying database with eloquent to get a sum of values for statistics charts I have a database table that registers the hits for each class (the class_id and I'm trying to query the DB table using Laravel Eloquent to get data, separately as below, to use with charts. Database table structure: +-------------+----------...
https://stackoverflow.com/questions/77913581/querying-database-with-eloquent-to-get-a-sum-of-values-for-statistics-charts
laravel, eloquent, statistics, sum
1,706,706,562
se_77917641
stackoverflow
DATA_SCIENCE
How can I calculate percentile for every single data inside an xarray dataset
How can I calculate percentile for every single data inside an xarray dataset I have a dataset of one variable with the dimension of time, lat, Lon. The dataset looks like the following and it has several grids where there is NaN values: <xarray.Dataset> Dimensions: (time = 6300, latitude: 300, longitude: 360) Coo...
https://stackoverflow.com/questions/77917641/how-can-i-calculate-percentile-for-every-single-data-inside-an-xarray-dataset
python, scipy, statistics, python-xarray, percentile
1,706,759,868
se_77911405
stackoverflow
DATA_SCIENCE
Best way to calculate percentile for every single value from actual and very large sized daily data (time 36500 X lon 3600 X lat 1500)
Best way to calculate percentile for every single value from actual and very large sized daily data (time 36500 X lon 3600 X lat 1500) I have NETCDF files consisting of actual measurements of different variables at the daily scale and in a 3D format (time, lat, lon). The data size is huge, it is for 150 years at 0.1 d...
https://stackoverflow.com/questions/77911405/best-way-to-calculate-percentile-for-every-single-value-from-actual-and-very-lar
python, pandas, scipy, statistics, python-xarray
1,706,684,929
se_48257144
stackoverflow
DATA_SCIENCE
How do I implement multiple linear regression in Python?
How do I implement multiple linear regression in Python? I am trying to write a multiple linear regression model from scratch to predict the key factors contributing to number of views of a song on Facebook. About each song we collect this information, i.e. variables I'm using: df.dtypes clicked ...
https://stackoverflow.com/questions/48257144/how-do-i-implement-multiple-linear-regression-in-python
python, pandas, machine-learning, statistics, regression
1,515,992,283
se_77909764
stackoverflow
DATA_SCIENCE
How to plot 1D array using python to get 25th, 50th and 75th percentiles
How to plot 1D array using python to get 25th, 50th and 75th percentiles Hello I have an array x = [9.904725629894529e-06, 1.2634955055546016e-05, 1.5201896530925296e-05, 2.9845547032891773e-05, 3.49247275153175e-05, 3.4970289561897516e-05, 4.780302697326988e-05, 4.802399416803382e-05, 4.810681639355607e-05, 4.8437985...
https://stackoverflow.com/questions/77909764/how-to-plot-1d-array-using-python-to-get-25th-50th-and-75th-percentiles
python, matplotlib, statistics, visualization
1,706,653,616
se_77906705
stackoverflow
DATA_SCIENCE
question about how to compare effect size/magnitude of odds ratios and average marginal effects
question about how to compare effect size/magnitude of odds ratios and average marginal effects If in a logistic regression model with a very large sample (N=2347) I have a variable with a odds ratio of 1.51 and a average marginal effect of 0.18, but in the same model with a smaller sample (N=1412) the same variable h...
https://stackoverflow.com/questions/77906705/question-about-how-to-compare-effect-size-magnitude-of-odds-ratios-and-average-m
statistics, logistic-regression, marginal-effects
1,706,621,300
se_77903631
stackoverflow
DATA_SCIENCE
Wondering what statistical test(s) to run on my particular geospatial data?
Wondering what statistical test(s) to run on my particular geospatial data? I have a coding project I'm working on for school where you get to pick your topic and data etc. The data I picked seemed simple enough at first (and I liked it because the plotting itself was a nice challenge) - I wanted to see if there was a...
https://stackoverflow.com/questions/77903631/wondering-what-statistical-tests-to-run-on-my-particular-geospatial-data
python, statistics, data-analysis, probability
1,706,582,108
se_77901924
stackoverflow
DATA_SCIENCE
Python x Math: Find the expected number of moves of a rock to move from one corner to another
Python x Math: Find the expected number of moves of a rock to move from one corner to another Python code problem in related to a statistical math problem Question A rock is placed on the bottom-left cell of a 8x8 chessboard. On each second, the rock will randomly move to a cell that it can move to, with equal probabi...
https://stackoverflow.com/questions/77901924/python-x-math-find-the-expected-number-of-moves-of-a-rock-to-move-from-one-corn
python, math, statistics, chess
1,706,553,431
se_77892803
stackoverflow
DATA_SCIENCE
Conducting paired t-test without the raw data
Conducting paired t-test without the raw data In R, I would like to conduct a paired sample t-test for two samples. I don't have the raw data. I only have three information: 1) means for both groups, 2) their variation in 95% confidence interval 3) Their N's. here is the data : mean1 <- 0.5012997 mean2 <- 0.511...
https://stackoverflow.com/questions/77892803/conducting-paired-t-test-without-the-raw-data
r, statistics, t.test
1,706,389,164
se_73130390
stackoverflow
DATA_SCIENCE
Calculating 95% confidence intervals for a weighted median over grouped data in dplyr
Calculating 95% confidence intervals for a weighted median over grouped data in dplyr I have a dataset with several groups, where I want to calculate a median value for each group using dplyr. The data are weighted, and the weights need to be taken into account in calculating the median. I found the weighted.median fu...
https://stackoverflow.com/questions/73130390/calculating-95-confidence-intervals-for-a-weighted-median-over-grouped-data-in
r, dplyr, statistics, weighted, spatstat
1,658,874,420
se_2387916
stackoverflow
DATA_SCIENCE
Looking for a Histogram Binning algorithm for decimal data
Looking for a Histogram Binning algorithm for decimal data I need to generate bins for the purposes of calculating a histogram. Language is C#. Basically I need to take in an array of decimal numbers and generate a histogram plot out of those. Haven't been able to find a decent library to do this outright so now ...
https://stackoverflow.com/questions/2387916/looking-for-a-histogram-binning-algorithm-for-decimal-data
c#, statistics, histogram
1,267,803,633
se_77885106
stackoverflow
DATA_SCIENCE
`infer`: simulation-based null distribution of the standard deviation is not centered around the null hypothesis
`infer`: simulation-based null distribution of the standard deviation is not centered around the null hypothesis When using infer the test hypotheses about the standard deviation I realized that the simulation-based null distribution is never centered around the null hypothesis: library(tidyverse) library(infer) data...
https://stackoverflow.com/questions/77885106/infer-simulation-based-null-distribution-of-the-standard-deviation-is-not-cen
r, statistics, type-inference
1,706,259,638
se_59742949
stackoverflow
DATA_SCIENCE
How does convolution work in stats::filter
How does convolution work in stats::filter I read few answers that deal with stats:filter they've made it only partially clear how convolution works (the part to do with coefficients arrangement), but there are other bits to it. example: # convolution with 3 coefficients in filter filter(1:5,c(f1,f2,f3),method="convol...
https://stackoverflow.com/questions/59742949/how-does-convolution-work-in-statsfilter
r, filter, statistics, convolution
1,579,042,650
se_77882753
stackoverflow
DATA_SCIENCE
Struggling to remove values from one vector using another larger vector iteratively in R (sample.int invalid first argument error)
Struggling to remove values from one vector using another larger vector iteratively in R (sample.int invalid first argument error) I'm working on a simulation of the Monty Hall problem in a stats class using R. The gist of the problem is that there are three doors, and behind one is a prize. The other two have goats. ...
https://stackoverflow.com/questions/77882753/struggling-to-remove-values-from-one-vector-using-another-larger-vector-iterativ
r, statistics
1,706,214,284
se_24123924
stackoverflow
DATA_SCIENCE
How to Update Statistics on a single column in a table?
How to Update Statistics on a single column in a table? I'm currently doing an investigation to determine the update statistic duration for tables of different sizes (100K, 1M, 10M, 100M, etc rows) with a table that has one column. Currently I have tables created with the correct row sizes, however they do not have ...
https://stackoverflow.com/questions/24123924/how-to-update-statistics-on-a-single-column-in-a-table
sql, statistics, sql-update
1,402,329,031
se_23420454
stackoverflow
DATA_SCIENCE
Newey-West standard errors for OLS in Python?
Newey-West standard errors for OLS in Python? I want to have a coefficient and Newey-West standard error associated with it. I am looking for Python library (ideally, but any working solutions is fine) that can do what the following R code is doing: library(sandwich) library(lmtest) a <- matrix(c(1,3,5,7,4,5,6,4,7,...
https://stackoverflow.com/questions/23420454/newey-west-standard-errors-for-ols-in-python
python, statistics, time-series, statsmodels
1,399,002,863
se_77863273
stackoverflow
DATA_SCIENCE
Horizontally multiple legend position ggplot2
Horizontally multiple legend position ggplot2 I want to represent three factors (at 5, 2, and 3 levels). The DES factor is represented in the x-axis, while the temp is in fill (different color) and water is pattern. I get a figure, but I don´t know how to independently position the two legends (the one for fill and th...
https://stackoverflow.com/questions/77863273/horizontally-multiple-legend-position-ggplot2
r, ggplot2, plot, statistics, fill
1,705,965,186
se_77202688
stackoverflow
DATA_SCIENCE
Replicating statsmodels.OLS mean squared error with scipy.stats.linregress
Replicating statsmodels.OLS mean squared error with scipy.stats.linregress Is it possible to replicate the mean squared error of residuals from statsmodels.OLS using the stats.linregress? Please see my dataset with two regressions below. I can manually replicate the result of mse_resid method in case of OLS and would ...
https://stackoverflow.com/questions/77202688/replicating-statsmodels-ols-mean-squared-error-with-scipy-stats-linregress
python, scipy, statistics, statsmodels
1,695,997,218
se_77626710
stackoverflow
DATA_SCIENCE
Data is normally distributed, but ks test return a statistic of 1.0
Data is normally distributed, but ks test return a statistic of 1.0 I have an age variable. When I plotted it using the kde & qq-plot, the distribution seemed normal; however, when I performed the ks-test, the test statistics = 1.0, p = 0.0. Can someone please help me explain this observation? I use the ks-test on oth...
https://stackoverflow.com/questions/77626710/data-is-normally-distributed-but-ks-test-return-a-statistic-of-1-0
python, statistics, normal-distribution, kolmogorov-smirnov
1,702,040,254
se_77830996
stackoverflow
DATA_SCIENCE
Oracle query speed after CTAS
Oracle query speed after CTAS I had a large table where I needed to delete millions of rows. It would take an awfully long time, so I created a new one via CTAS without the records I wanted to delete. Over this table I created the same indexes and foreign keys as on the original, then deleted the original table. I had...
https://stackoverflow.com/questions/77830996/oracle-query-speed-after-ctas
oracle-database, statistics, sql-execution-plan
1,705,480,814
se_77850729
stackoverflow
DATA_SCIENCE
Is there a simplified SQL query to return the number and percentage of missing values of a table ? (BigQuery)
Is there a simplified SQL query to return the number and percentage of missing values of a table ? (BigQuery) The BigQuery earthquake public dataset has 47 columns most of each have missing values. I need an output showing a summary with column_name, total_entries, non_missing_entries & percentage_missing as the colum...
https://stackoverflow.com/questions/77850729/is-there-a-simplified-sql-query-to-return-the-number-and-percentage-of-missing-v
sql, google-bigquery, statistics, missing-data, calculation
1,705,748,037
se_77848862
stackoverflow
DATA_SCIENCE
Kolmogorov-Smirnov test fails with Pareto distribution
Kolmogorov-Smirnov test fails with Pareto distribution My investigation originated from the very common saying, "80% of the wealth is in the hands of 20% of the population." I wanted to verify if this is true. After some online research and calculations, I found that this statement implies that wealth follows a Pareto...
https://stackoverflow.com/questions/77848862/kolmogorov-smirnov-test-fails-with-pareto-distribution
python, statistics, hypothesis-test, kolmogorov-smirnov
1,705,699,160
se_77848434
stackoverflow
DATA_SCIENCE
Error in svyciprop using logit or likelihood method
Error in svyciprop using logit or likelihood method I'm working on an analysis of survey-weighted data from a stratified random sample using the survey library. I have my survey design object: wsvy <- svydesign(ids=df$psu, strata=df$strata, weights=df$pweight, fpc=df$N, data=df) and am estimating a proportion using s...
https://stackoverflow.com/questions/77848434/error-in-svyciprop-using-logit-or-likelihood-method
r, statistics, survey, confidence-interval, proportions
1,705,692,969
se_91270
stackoverflow
DATA_SCIENCE
Statistically removing erroneous values
Statistically removing erroneous values We have an application where users enter prices all day. These prices are recorded in a table with a timestamp and then used for producing charts of how the price has moved. Every now and then, the user enters a price wrongly (e.g. puts in a zero too many or too few) which somew...
https://stackoverflow.com/questions/91270/statistically-removing-erroneous-values
statistics
1,221,731,092
se_77838006
stackoverflow
DATA_SCIENCE
How can I run 5 Simultaneous OLS Regressions and output the results to the same table?
How can I run 5 Simultaneous OLS Regressions and output the results to the same table? I am trying to create a table showing the coefficients and p-values of my 5 separate regressions (with the significance levels) . See image as example: This is what i am trying to achieve: I ran a series of codes, but I always get 5...
https://stackoverflow.com/questions/77838006/how-can-i-run-5-simultaneous-ols-regressions-and-output-the-results-to-the-same
python, statistics, regression, p-value
1,705,567,553
se_77837078
stackoverflow
DATA_SCIENCE
Need help combining the same element of a list of tuples in python
Need help combining the same element of a list of tuples in python I have a single list from a database that is returning the information of a baseball stat across two days. So say I have these 3 items in a single list of tuples: ("John Doe", 2, 3) ("Sponge Bob", 4, 5) ("John Doe", 1, 5) How can I ONLY combine the tw...
https://stackoverflow.com/questions/77837078/need-help-combining-the-same-element-of-a-list-of-tuples-in-python
python, database, list, statistics, tuples
1,705,555,561
se_76259134
stackoverflow
DATA_SCIENCE
How to construct a Relative Frequency Table in Minitab
How to construct a Relative Frequency Table in Minitab I am struggling to construct a relative frequency table for the following data in MiniTab. I have followed all the directions given to me but cannot construct the right table. Can anyone please provide me the steps. The data: Rino Species | Population Estimate ---...
https://stackoverflow.com/questions/76259134/how-to-construct-a-relative-frequency-table-in-minitab
statistics, minitab
1,684,206,335
se_5147378
stackoverflow
DATA_SCIENCE
Rolling variance algorithm
Rolling variance algorithm I'm trying to find an efficient, numerically stable algorithm to calculate a rolling variance (for instance, a variance over a 20-period rolling window). I'm aware of the Welford algorithm that efficiently computes the running variance for a stream of numbers (it requires only one pass), but...
https://stackoverflow.com/questions/5147378/rolling-variance-algorithm
algorithm, statistics, variance
1,298,925,983
se_77107115
stackoverflow
DATA_SCIENCE
Choices for optimization method with generalized method of moments (GMM) in Python
Choices for optimization method with generalized method of moments (GMM) in Python How do I find out the options for optim_method='' with the generalized method of moments in statsmodels? I've been told by a colleague that simplex method is good for my problem. How do I find out its name, and the names of other availa...
https://stackoverflow.com/questions/77107115/choices-for-optimization-method-with-generalized-method-of-moments-gmm-in-pyth
python, statistics, statsmodels, linear-optimization
1,694,711,583
se_51852415
stackoverflow
DATA_SCIENCE
weird svm behavior in R (e1071)
weird svm behavior in R (e1071) I ran the following code for a binary classification task w/ an SVM in both R (first sample) and Python (second example). Given randomly generated data (X) and response (Y), this code performs leave group out cross validation 1000 times. Each entry of Y is therefore the mean of the pr...
https://stackoverflow.com/questions/51852415/weird-svm-behavior-in-r-e1071
r, machine-learning, statistics, classification, svm
1,534,302,369
se_77824812
stackoverflow
DATA_SCIENCE
Recalculating odds ratios using new reference categories
Recalculating odds ratios using new reference categories I'm conducting a quantitative synthesis of several studies reporting ORs and 95% CIs for a health outcome. Some studies report summary 2x2 table data, while others only report adjusted or unadjusted effect estimates without details about the numbers of cases or...
https://stackoverflow.com/questions/77824812/recalculating-odds-ratios-using-new-reference-categories
statistics, meta-analysis
1,705,398,708
se_77817005
stackoverflow
DATA_SCIENCE
How can I work around this error in handling continuous variables in tbl_continuous for gtsummary
How can I work around this error in handling continuous variables in tbl_continuous for gtsummary When I try to make a tbl_continuous I am unable to properly summarize continuous by continuous variables. Example below, you can see it inappropriately converts to a factor: library(tidyverse) library(gtsummary) #> #Stand...
https://stackoverflow.com/questions/77817005/how-can-i-work-around-this-error-in-handling-continuous-variables-in-tbl-continu
r, statistics, gtsummary
1,705,273,460
se_77802369
stackoverflow
DATA_SCIENCE
half-normal plot for a nonlinear model using the nls() function
half-normal plot for a nonlinear model using the nls() function I fitted a non-linear model to a dataset. However, I need to perform the half-normal plot of this model (using the hnp() function from the hnp package). My model was fitted considering the nls() function from the stats package, see: nonlinear_func <- fun...
https://stackoverflow.com/questions/77802369/half-normal-plot-for-a-nonlinear-model-using-the-nls-function
r, plot, statistics, regression, non-linear-regression
1,704,998,627
se_77817042
stackoverflow
DATA_SCIENCE
Machine Learning ML.net Prediction Intervals
Machine Learning ML.net Prediction Intervals I have a machine learning ml.net binary classification model, trained it, and evaluated it, giving me a CalibratedBinaryClassificationMetrics with a lot of metrics, but none helpful to me. I want to analyze my predictions used for evaluating the model in a way I can predict...
https://stackoverflow.com/questions/77817042/machine-learning-ml-net-prediction-intervals
c#, machine-learning, statistics, metrics, ml.net
1,705,274,131
se_77803371
stackoverflow
DATA_SCIENCE
Normalizing a monotonically increasing function and calculate std
Normalizing a monotonically increasing function and calculate std I have an increasing function like so: I plan on breaking it up into intervals (between the red lines). I want to rotate the segment horizontal and calculate the standard deviation. I know this might seem silly, but I essentially want to calculate the ...
https://stackoverflow.com/questions/77803371/normalizing-a-monotonically-increasing-function-and-calculate-std
python, statistics, analytics
1,705,011,878