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_78307014
stackoverflow
DATA_SCIENCE
Is there a way to weigh datapoints when doing LOESS/LOWESS in Python
Is there a way to weigh datapoints when doing LOESS/LOWESS in Python I would like to run a LOWESS function where different data points have different weights, but I don't see how I can pass weights to the lowess function. Here's some example code of using lowess without weights. import numpy as np import statsmodels.a...
https://stackoverflow.com/questions/78307014/is-there-a-way-to-weigh-datapoints-when-doing-loess-lowess-in-python
python, statistics, statsmodels
1,712,781,515
se_52391030
stackoverflow
DATA_SCIENCE
Finding pvalue, r and adjusted r^2 for SVR regression model
Finding pvalue, r and adjusted r^2 for SVR regression model I want to use Support Vector Regression (SVR) for regression as it seems quite powerful when I have several features. As I found a very-easy-to-use implementation in scikit-learn, I'm using that implementation. My questions below are regarding this python pac...
https://stackoverflow.com/questions/52391030/finding-pvalue-r-and-adjusted-r2-for-svr-regression-model
python, scikit-learn, statistics, non-linear-regression
1,537,288,344
se_78314799
stackoverflow
DATA_SCIENCE
Relative risk estimation in spatstat or sparr package and Modeling Bivariate Spatial point process
Relative risk estimation in spatstat or sparr package and Modeling Bivariate Spatial point process I'm new to the field of point process research and I'm working with data on forest species (4 different species). I conducted first and second-order analysis for each species, tested the dependency structure for individu...
https://stackoverflow.com/questions/78314799/relative-risk-estimation-in-spatstat-or-sparr-package-and-modeling-bivariate-spa
statistics, geospatial, spatial, spatstat, usage-statistics
1,712,907,090
se_20892799
stackoverflow
DATA_SCIENCE
Using pandas, calculate Cramér's coefficient matrix
Using pandas, calculate Cramér's coefficient matrix I have a dataframe in Pandas which contains metrics calculated on Wikipedia articles. Two categorical variables nation which nation the article is about, and lang which language Wikipedia this was taken from. For a single metric, I would like to see how clos...
https://stackoverflow.com/questions/20892799/using-pandas-calculate-cram%c3%a9rs-coefficient-matrix
python, pandas, statistics
1,388,700,368
se_78320549
stackoverflow
DATA_SCIENCE
Calculate CDF of Weibull distribution in R
Calculate CDF of Weibull distribution in R I want to calculate the probability that a Weibull random variable X is greater than 1000, where X ~ Weibull(lambda, g). Using the CDF I calculate it as: g = log(log(.7)/log(.5))/log(40/81) lambda = -log(.7)/400^g > exp(-lambda*1000^g) [1] 0.4294352 but using the R package ...
https://stackoverflow.com/questions/78320549/calculate-cdf-of-weibull-distribution-in-r
r, statistics, probability, weibull
1,713,010,648
se_71202562
stackoverflow
DATA_SCIENCE
Calculating Return Value using Generalised Extreme Value Distribution (GEV)
Calculating Return Value using Generalised Extreme Value Distribution (GEV) I have annual temperature data of 30 years and want to calculate Return Value of this data using GEV distribution for 50 and 100 year Return Period. My 30 year data: data=[28.01,29.07,28.67,21.57,21.66,24.62,21.45,28.51,22.65,21.57,20.89,20.96...
https://stackoverflow.com/questions/71202562/calculating-return-value-using-generalised-extreme-value-distribution-gev
python, numpy, scipy, statistics, distribution
1,645,428,317
se_78322039
stackoverflow
DATA_SCIENCE
How to present findings from the mcmc_areas() and conditional_effects using r brms and bayesplot packages?
How to present findings from the mcmc_areas() and conditional_effects using r brms and bayesplot packages? I am fairly new to bayesian statistics but have really fallen in love with what it can do and how it presents findings compared to frequentist statistics especially for categorical or ordinal datasets. However on...
https://stackoverflow.com/questions/78322039/how-to-present-findings-from-the-mcmc-areas-and-conditional-effects-using-r-br
r, statistics, regression, bayesian, brms
1,713,042,752
se_78313058
stackoverflow
DATA_SCIENCE
Make final histogram bin be closed at both ends
Make final histogram bin be closed at both ends I am trying to make a histogram whose final (rightmost) bin includes both its left and right endpoints. I cannot figure out how to do this. In this simple example, we can see that 1, which is on the right endpoint of the sole bucket, is not included in the histogram, as ...
https://stackoverflow.com/questions/78313058/make-final-histogram-bin-be-closed-at-both-ends
statistics, julia, histogram
1,712,870,249
se_78312097
stackoverflow
DATA_SCIENCE
Weighted Standard Deviation on Excel Pivot Table
Weighted Standard Deviation on Excel Pivot Table I have a dataset of investments with the following columns Investment Investment Rating Commitment Region Portfolio Helper A 10 100 Asia P1 1000 B 9 250 Africa P2 2250 C 8 300 S. America P1 2400 D 11 125 Asia P1 1375 E 12 150 S. America P1 1800 F 9 200 ...
https://stackoverflow.com/questions/78312097/weighted-standard-deviation-on-excel-pivot-table
excel, statistics, pivot-table, standard-deviation, weighted
1,712,856,471
se_78309385
stackoverflow
DATA_SCIENCE
How to simulate integer numbers between1 and 5 with exact mean and sd in R or python
How to simulate integer numbers between1 and 5 with exact mean and sd in R or python I want to simulate data with integer value and exact desirable mean and sd. I know how to generate floating numbers with exact mean and sd. And then round it to have integer values but the sd and mean change after rounding! `mu <- 3 ...
https://stackoverflow.com/questions/78309385/how-to-simulate-integer-numbers-between1-and-5-with-exact-mean-and-sd-in-r-or-py
python, r, statistics
1,712,827,931
se_78305272
stackoverflow
DATA_SCIENCE
Fit multitype Spatial Point Cox Process
Fit multitype Spatial Point Cox Process I'm trying to fit Bivariate Cox models for forest species, but it returns an error as shown below, and I don't see another formulation of these models in the Spatstat package. fit1 <- kppm(Copaif.xylop.ppp~marks, "LGCP") Error in kppm.ppp(X = Copaif.xylop.ppp, trend = ~marks, da...
https://stackoverflow.com/questions/78305272/fit-multitype-spatial-point-cox-process
statistics, geospatial, spatial, cross-validation, spatstat
1,712,760,513
se_78307684
stackoverflow
DATA_SCIENCE
Attempting to find relative data patterns
Attempting to find relative data patterns I'm working on a python based project and I need help to find the following: * common pairs/groups of columns to contain a 1 when initial column contains a 1 - for the overall data - for each day of the week * uncommon/unlikely pairs/groups to contain a 1 when the in...
https://stackoverflow.com/questions/78307684/attempting-to-find-relative-data-patterns
python, machine-learning, statistics, xlsx, cross-correlation
1,712,794,916
se_78304275
stackoverflow
DATA_SCIENCE
statsmodels qqplot doesn&#39;t match when using fit=True and scipy.stats.dist.fit
statsmodels qqplot doesn&#39;t match when using fit=True and scipy.stats.dist.fit I was researching how quantile-quantile plots work and came across the following inconsistency: I was trying to compare quantiles from uniformerly distributed sample against normal distribution quantiles. First, I use normal distribution...
https://stackoverflow.com/questions/78304275/statsmodels-qqplot-doesnt-match-when-using-fit-true-and-scipy-stats-dist-fit
python, scipy, statistics, statsmodels, qqplot
1,712,750,614
se_78300684
stackoverflow
DATA_SCIENCE
Looking to filter and/or tidy up TukeyHSD pairwise comparisons for two-way ANOVA
Looking to filter and/or tidy up TukeyHSD pairwise comparisons for two-way ANOVA I'm running a 2-way ANOVA to compare how two variables affect the price of a service. However, when I run post-hoc pairwise comparisons I would like to only see rows that are comparable (i.e. when one of the independent variables matches)...
https://stackoverflow.com/questions/78300684/looking-to-filter-and-or-tidy-up-tukeyhsd-pairwise-comparisons-for-two-way-anova
r, statistics, anova, posthoc, tukey
1,712,690,636
se_78300376
stackoverflow
DATA_SCIENCE
How to fix my permutation part of my R code?
How to fix my permutation part of my R code? I have attached my code with the problem that I am having issues on below: library(dplyr) library(perm) data(iris) # Create subset to only see setosa and virginica species iris_subset <- iris %>% filter(Species %in% c("setosa", "virginica")) # Define test statistic diff...
https://stackoverflow.com/questions/78300376/how-to-fix-my-permutation-part-of-my-r-code
r, statistics, permutation, statistical-test
1,712,686,370
se_78295759
stackoverflow
DATA_SCIENCE
How to find mean and median of frequency table using python
How to find mean and median of frequency table using python I am new to python data analysis and I am working on census data, here is an example of the data, | geo_area |Total | 2-5km|5-10km| |------------|------| ----| -----| | E02000001 | 5378 | 385 | 241| | E02000002 | 3238 | 474 |394 | | E02000003 | 5238 | 6...
https://stackoverflow.com/questions/78295759/how-to-find-mean-and-median-of-frequency-table-using-python
python, pandas, statistics, mean, median
1,712,627,208
se_78295169
stackoverflow
DATA_SCIENCE
Using the results of summary() as values in R
Using the results of summary() as values in R When I use the summary() function in R, the result is table that shows descriptive statistics in a table format, but it uses text with numbers in a way I can't use the object (https://i.sstatic.net/NTPWg.png) desc_stat <- summary(data) to generate a boxplot for example (I...
https://stackoverflow.com/questions/78295169/using-the-results-of-summary-as-values-in-r
r, statistics
1,712,612,532
se_78285877
stackoverflow
DATA_SCIENCE
Having trouble determining if my data is normally distributed or not using QQ-plot in R
Having trouble determining if my data is normally distributed or not using QQ-plot in R I'm having trouble interpreting my QQ-plot from the data attached. Shapiro-Wilk test p-value = 0.14 which I know means the distribution does not meaningfully stray from a normal one. Can anyone confirm if the QQ plot generated from...
https://stackoverflow.com/questions/78285877/having-trouble-determining-if-my-data-is-normally-distributed-or-not-using-qq-pl
statistics, visualization, normal-distribution, qqplot
1,712,437,098
se_48140473
stackoverflow
DATA_SCIENCE
Calculating odds ratio from glm output
Calculating odds ratio from glm output It is my first time doing logistic regressions and I am currently trying to teach myself how to find the odds ratio. I got my coefficients from r as shown below. (Intercept) totalmins 0.2239254 1.2424020 To exponentiate the regression coefficient I did the fo...
https://stackoverflow.com/questions/48140473/calculating-odds-ratio-from-glm-output
r, statistics, logistic-regression, glm
1,515,351,109
se_78282384
stackoverflow
DATA_SCIENCE
Error in R powerSim function for a fixed effect in a LMM
Error in R powerSim function for a fixed effect in a LMM I have a LMM with 2 categorical fixed factors (ffactor1, ffactor2), a random factor (id), and a covariate of no interest (baseline). I am trying to estimate the power using R's powerSim function. I am specifically interested in ffactor2, and if possible I want t...
https://stackoverflow.com/questions/78282384/error-in-r-powersim-function-for-a-fixed-effect-in-a-lmm
r, statistics, statistics-bootstrap
1,712,351,724
se_65157780
stackoverflow
DATA_SCIENCE
sympy symbolic simplify Norm CDF PDF?
sympy symbolic simplify Norm CDF PDF? looking for a way to simply the following. Calculating a few derivatives involving a normal cdf. When trying to simplify, I want them in terms of norm pdf [0,1] and norm cdf [0,1]. How do I get the symbolic answer in terms of norm cdf norm pdf without erf. For example the delta ca...
https://stackoverflow.com/questions/65157780/sympy-symbolic-simplify-norm-cdf-pdf
python-3.x, statistics, sympy, symbolic-math, normal-distribution
1,607,177,192
se_78281802
stackoverflow
DATA_SCIENCE
How to find the source code of the Algorithm for random number generation in NumPy?
How to find the source code of the Algorithm for random number generation in NumPy? like in the title, I'm searching for the exact location of source code for e.g. numpy.random.normal. I would like to know for this and some other distributions whether the random numbers are created with Inverse Transformation or anoth...
https://stackoverflow.com/questions/78281802/how-to-find-the-source-code-of-the-algorithm-for-random-number-generation-in-num
python, numpy, random, statistics, inverse-transform
1,712,342,053
se_48572624
stackoverflow
DATA_SCIENCE
How can I make all-possible-regressions in R also include exponents and logs of the variables?
How can I make all-possible-regressions in R also include exponents and logs of the variables? I'm using the olsrr package for statistical analysis when trying to compare as many model specifications as possible using all-possible-regressions. My code: model <- lm(y ~ ., data = "mydata" k <- ols_all_subset(model) whi...
https://stackoverflow.com/questions/48572624/how-can-i-make-all-possible-regressions-in-r-also-include-exponents-and-logs-of
r, statistics
1,517,523,219
se_78275780
stackoverflow
DATA_SCIENCE
How do I add a new column to an existing table in R?
How do I add a new column to an existing table in R? I have a dataset with 5 possible categorical responses for several different columns: "An extreme amount", "A great deal", "A moderate amount", "A small amount" and "None". For this specific column, there were no responses for "An extreme amount" or "A small amount"...
https://stackoverflow.com/questions/78275780/how-do-i-add-a-new-column-to-an-existing-table-in-r
r, statistics
1,712,253,829
se_78263747
stackoverflow
DATA_SCIENCE
Calculate Probabilites of victory in a coin flip game with n flips
Calculate Probabilites of victory in a coin flip game with n flips In this game, a coin is flipped n times. Player 1 gains a point when two heads are flipped in a row, Player 2 gains a point when a head is flipped and followed by a tails. For example, in the string "HTTTHHHT," the outcome would be a tie because Player...
https://stackoverflow.com/questions/78263747/calculate-probabilites-of-victory-in-a-coin-flip-game-with-n-flips
algorithm, statistics, divide-and-conquer
1,712,087,509
se_77835927
stackoverflow
DATA_SCIENCE
How to replace dataframe values based on index statistics
How to replace dataframe values based on index statistics I have a dataframe like this: l1 = [1,2,3,4,5,6,7,8,9,10] l2 = [11,12,13,14,15,16,17,18,19,20] index = ['FORD','GM'] df = pd.DataFrame(l1,l2).reset_index().T df.index = index I want to replace these integer values based on this: For every index, if the value i...
https://stackoverflow.com/questions/77835927/how-to-replace-dataframe-values-based-on-index-statistics
python, pandas, dataframe, statistics
1,705,530,935
se_74437186
stackoverflow
DATA_SCIENCE
bollinger bands versus statistics: is 1 standard deviation supposed to be split into two halves by it&#39;s mean? or top and bottom bands from mean?
bollinger bands versus statistics: is 1 standard deviation supposed to be split into two halves by it&#39;s mean? or top and bottom bands from mean? I have a question about how bollinger bands are plotted in relation to statistics. In statistics, once a standard deviation is calculated from a mean of a set of numbers,...
https://stackoverflow.com/questions/74437186/bollinger-bands-versus-statistics-is-1-standard-deviation-supposed-to-be-split
statistics, pine-script, mean, trading, standard-deviation
1,668,456,006
se_78269478
stackoverflow
DATA_SCIENCE
Perform spearman test with cor.test on different sized dataframe
Perform spearman test with cor.test on different sized dataframe I am trying to perform a cor.test (spearman) on a set of data. I am following the workflow of this article (https://www.nature.com/articles/s41564-023-01350-w) in order to evaluate and discriminate contaminants in a set of data I have. The previous passa...
https://stackoverflow.com/questions/78269478/perform-spearman-test-with-cor-test-on-different-sized-dataframe
r, statistics, filtering, correlation
1,712,165,646
se_55204608
stackoverflow
DATA_SCIENCE
the median output of boost::accumulators::statistics is confusing
the median output of boost::accumulators::statistics is confusing When I was using boost::accumulators::statistics to calculate the median for an array, I got the below code and result: accumulator_set< double, features< tag::mean, tag::median > > acc; acc(2); acc(1); acc(3); value = mean( acc );...
https://stackoverflow.com/questions/55204608/the-median-output-of-boostaccumulatorsstatistics-is-confusing
c++, boost, statistics, median
1,552,806,033
se_3025162
stackoverflow
DATA_SCIENCE
Statistics: combinations in Python
Statistics: combinations in Python I need to compute combinatorials (nCr) in Python but cannot find the function to do that in math, numpy or stat libraries. Something like a function of the type: comb = calculate_combinations(n, r) I need the number of possible combinations, not the actual combinations, so iterto...
https://stackoverflow.com/questions/3025162/statistics-combinations-in-python
python, statistics, combinations
1,276,279,996
se_39894213
stackoverflow
DATA_SCIENCE
How to compute the median and 68% confidence interval around the median of non-Gaussian distribution in Python?
How to compute the median and 68% confidence interval around the median of non-Gaussian distribution in Python? I have a data set which is a numpy array say a=[a1,a2,.....] and also the weights of the data w=[w1,w2,w3...]. I have computed the histogram using numpy histogram package which gives me the hist array. Now I...
https://stackoverflow.com/questions/39894213/how-to-compute-the-median-and-68-confidence-interval-around-the-median-of-non-g
python, numpy, scipy, statistics
1,475,751,602
se_78235480
stackoverflow
DATA_SCIENCE
Handling Error Propagation Above Biological Thresholds in R with predictNLS
Handling Error Propagation Above Biological Thresholds in R with predictNLS I'm working on a nonlinear regression analysis using R and have encountered an issue with error propagation. Specifically, I'm using predictNLS to estimate the errors of my predictions, but in some cases, the error ranges exceed biologically p...
https://stackoverflow.com/questions/78235480/handling-error-propagation-above-biological-thresholds-in-r-with-predictnls
r, statistics, predict, nls
1,711,590,824
se_52554336
stackoverflow
DATA_SCIENCE
Plot the equivalent of correlation matrix for factors (categorical data)? And mixed types?
Plot the equivalent of correlation matrix for factors (categorical data)? And mixed types? Actually there are 2 questions, one is more advanced than the other. Q1: I am looking for a method that similar to corrplot() but can deal with factors. I originally tried to use chisq.test() then calculate the p-value and Cra...
https://stackoverflow.com/questions/52554336/plot-the-equivalent-of-correlation-matrix-for-factors-categorical-data-and-mi
r, plot, statistics, correlation, chi-squared
1,538,133,958
se_78255847
stackoverflow
DATA_SCIENCE
Counting the occurrence of a character based on whether there is a value in a different cell
Counting the occurrence of a character based on whether there is a value in a different cell I am trying to figure out how many games a team has played on the road already given their entire schedule. Using COUNT for the column (C) that contains "@" (that is the only value in the column if it's an away game, blank if ...
https://stackoverflow.com/questions/78255847/counting-the-occurrence-of-a-character-based-on-whether-there-is-a-value-in-a-di
excel, google-sheets, statistics, google-sheets-formula, spreadsheet
1,711,979,401
se_78255709
stackoverflow
DATA_SCIENCE
Chi-square goodness of fit test Python SciPy
Chi-square goodness of fit test Python SciPy in the SciPy Manual v1.12.0 https://docs.scipy.org/doc/scipy/tutorial/stats.html there is an example for the Chi-square goodness of fit test: import scipy.stats as stats import numpy as np x = stats.t.rvs(10, size=1000) quantiles = [0.0, 0.01, 0.05, 0.1, 1-0.10, 1-0.05, 1-...
https://stackoverflow.com/questions/78255709/chi-square-goodness-of-fit-test-python-scipy
python, statistics, chi-squared, goodness-of-fit
1,711,977,333
se_78251986
stackoverflow
DATA_SCIENCE
How to make pandas show large datasets in output?
How to make pandas show large datasets in output? I am working on a very large excel dataset, with more than 100 thousand rows, it contains data such as hours and dates, but they are not split (20231201 instead of 2023/12/01 or 1130 instead of 11:30),i managed to write a code that splits them in order to copy and past...
https://stackoverflow.com/questions/78251986/how-to-make-pandas-show-large-datasets-in-output
python, pandas, statistics
1,711,901,234
se_78244486
stackoverflow
DATA_SCIENCE
How can I emulate Microsoft Excel&#39;s Solver functionality (GRG Nonlinear) in python?
How can I emulate Microsoft Excel&#39;s Solver functionality (GRG Nonlinear) in python? Screenshot demonstrating the use of Excel's Solver: I have a task to automate a certain excel worksheet. The worksheet happens to implement a logic with an excel plugin called Solver. It uses a single value(-1.95624) in Cell $O$9 ...
https://stackoverflow.com/questions/78244486/how-can-i-emulate-microsoft-excels-solver-functionality-grg-nonlinear-in-pyth
python, machine-learning, statistics, non-linear-regression
1,711,724,898
se_48483892
stackoverflow
DATA_SCIENCE
AttributeError: &#39;_process_plot_var_args&#39; object has no attribute &#39;get_next_color&#39;
AttributeError: &#39;_process_plot_var_args&#39; object has no attribute &#39;get_next_color&#39; I have tried to run the following code. but it gives an argument required error in lifelines/plotting.py file. i can't fix it . import pandas as pd from lifelines.datasets import load_dd import matplotlib.pyplot as plt ...
https://stackoverflow.com/questions/48483892/attributeerror-process-plot-var-args-object-has-no-attribute-get-next-color
python, statistics, survival-analysis, lifelines
1,517,121,981
se_6615489
stackoverflow
DATA_SCIENCE
Fitting distributions, goodness of fit, p-value. Is it possible to do this with Scipy (Python)?
Fitting distributions, goodness of fit, p-value. Is it possible to do this with Scipy (Python)? INTRODUCTION: I'm a bioinformatician. In my analysis which I perform on all human genes (about 20 000) I search for a particular short sequence motif to check how many times this motif occurs in each gene. Genes are 'writ...
https://stackoverflow.com/questions/6615489/fitting-distributions-goodness-of-fit-p-value-is-it-possible-to-do-this-with
python, numpy, scipy, statistics, probability
1,310,064,031
se_10029588
stackoverflow
DATA_SCIENCE
Python implementation of the Wilson Score Interval?
Python implementation of the Wilson Score Interval? After reading How Not to Sort by Average Rating, I was curious if anyone has a Python implementation of a Lower bound of Wilson score confidence interval for a Bernoulli parameter?
https://stackoverflow.com/questions/10029588/python-implementation-of-the-wilson-score-interval
python, algorithm, statistics, ranking
1,333,632,765
se_18171246
stackoverflow
DATA_SCIENCE
Error in contrasts when defining a linear model in R
Error in contrasts when defining a linear model in R When I try to define my linear model in R as follows: lm1 <- lm(predictorvariable ~ x1+x2+x3, data=dataframe.df) I get the following error message: Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with...
https://stackoverflow.com/questions/18171246/error-in-contrasts-when-defining-a-linear-model-in-r
database, r, statistics
1,376,219,087
se_78226139
stackoverflow
DATA_SCIENCE
How to quantify the consistency of a sequence of predictions, incl. prediction confidence, using standard function from sklearn or a similar library
How to quantify the consistency of a sequence of predictions, incl. prediction confidence, using standard function from sklearn or a similar library Let's say I let a classification model classify a single object multiple times but under varying circumstances. Ideally it should predict the same class again and again. ...
https://stackoverflow.com/questions/78226139/how-to-quantify-the-consistency-of-a-sequence-of-predictions-incl-prediction-c
python, machine-learning, scikit-learn, statistics, classification
1,711,464,113
se_78183213
stackoverflow
DATA_SCIENCE
Change R Metaprop Forest Plot to print &quot;Fixed Effects&quot; instead of &quot;Common Effects&quot;?
Change R Metaprop Forest Plot to print &quot;Fixed Effects&quot; instead of &quot;Common Effects&quot;? I'm doing a meta-analysis in R using metaprop from the meta package. Pretty straightforward using the following lines of code, where data is my input dataframe with columns for 'Events', 'Subjects' and 'Author'. pes...
https://stackoverflow.com/questions/78183213/change-r-metaprop-forest-plot-to-print-fixed-effects-instead-of-common-effect
r, statistics, r-forestplot
1,710,799,029
se_78221760
stackoverflow
DATA_SCIENCE
R Metaprop P-value overlapping with forest plot axes
R Metaprop P-value overlapping with forest plot axes Trying to plot a forest plot using R Metaprop with the following code: pes.summary <- metaprop(`Events`, `Nodules`, `Author` , data = data , sm = "PFT", fixed = FALSE, random = TRUE, subgroup = Subgroup) forest(pes.summary) The code is working no problem, but the ...
https://stackoverflow.com/questions/78221760/r-metaprop-p-value-overlapping-with-forest-plot-axes
r, statistics, meta-analysis
1,711,400,528
se_78169898
stackoverflow
DATA_SCIENCE
Using FFT to sum independent random variables
Using FFT to sum independent random variables Based on the very useful answer to another question, I have written a function to compute the density function of a sum of random variables. The function takes two density functions f1 and f2, then produces the sum PDF of the sum of n1 and n2 random variates having these d...
https://stackoverflow.com/questions/78169898/using-fft-to-sum-independent-random-variables
r, statistics, signal-processing, fft
1,710,541,172
se_44824927
stackoverflow
DATA_SCIENCE
Calculate percentile of value in column
Calculate percentile of value in column I have a dataframe with a column that has numerical values. This column is not well-approximated by a normal distribution. Given another numerical value, not in this column, how can I calculate its percentile in the column? That is, if the value is greater than 80% of the values...
https://stackoverflow.com/questions/44824927/calculate-percentile-of-value-in-column
python, pandas, statistics, distribution
1,498,738,680
se_56493506
stackoverflow
DATA_SCIENCE
Deciding on how to scale data and which scaler to use?
Deciding on how to scale data and which scaler to use? I am trying to train an MLP model with two Dense layers in keras to do prediction for a small data set of around 100 uni-variate time series. This model should get values of 6 days and predict the 7th day value. As an input to the model, I first concatenate these ...
https://stackoverflow.com/questions/56493506/deciding-on-how-to-scale-data-and-which-scaler-to-use
python, statistics, time-series, data-science, scaling
1,559,907,061
se_78070661
stackoverflow
DATA_SCIENCE
Visualize a vector of booleans as an image grid of symbols with different colors in python
Visualize a vector of booleans as an image grid of symbols with different colors in python For teaching purposes in statistics and probability, I want to give a visual representation of various probabilities by an image grid with objects or symbols in different colors in a Jupyter notebook. For instance, by the follow...
https://stackoverflow.com/questions/78070661/visualize-a-vector-of-booleans-as-an-image-grid-of-symbols-with-different-colors
python, jupyter-notebook, statistics, visualization, probability
1,709,069,254
se_78200445
stackoverflow
DATA_SCIENCE
Second-order statistics estimator functions in the spatial point process
Second-order statistics estimator functions in the spatial point process I'm running into a problem with edge corrector position perception. I would like to know when the edge corrector is placed in the numerator and when it is placed in the denominator, for example when estimating the K ou inhomogeneous K function an...
https://stackoverflow.com/questions/78200445/second-order-statistics-estimator-functions-in-the-spatial-point-process
statistics, spatial, kernel-density, spatstat
1,711,029,226
se_78209541
stackoverflow
DATA_SCIENCE
Monte Carlo simulation Lotto Germany
Monte Carlo simulation Lotto Germany Currently, I am working on programming a Monte Carlo simulation to investigate the likelihood of the rarest number (13) in German lottery draws being drawn only 361 times or less in 3570 draws. import random as rnd import numpy as np #Variablen setzen anzahl_sim=10000 lottozahlen...
https://stackoverflow.com/questions/78209541/monte-carlo-simulation-lotto-germany
statistics, montecarlo
1,711,159,684
se_78203521
stackoverflow
DATA_SCIENCE
R `dnbinom` giving different results than Python `scipy.stats.nbinom.pmf` even after accounting for different parameterization
R `dnbinom` giving different results than Python `scipy.stats.nbinom.pmf` even after accounting for different parameterization I am trying to translate my colleague's R code into Python. It involves making a calculation with a negative binomial distribution's probability mass function, but the issue is that R's dnbino...
https://stackoverflow.com/questions/78203521/r-dnbinom-giving-different-results-than-python-scipy-stats-nbinom-pmf-even-a
python, r, statistics
1,711,068,971
se_76883263
stackoverflow
DATA_SCIENCE
R Calculating Parametrical Expected Shortfall Values using the cvar package
R Calculating Parametrical Expected Shortfall Values using the cvar package I would like to calculate the Expected Shortfall (aka Conditional Value at Risk) using a parametric approach in R. One way of doing this is to code a custom function for each distribution which calculate the Expected Shortfall in a "closed for...
https://stackoverflow.com/questions/76883263/r-calculating-parametrical-expected-shortfall-values-using-the-cvar-package
r, statistics
1,691,754,321
se_77527378
stackoverflow
DATA_SCIENCE
R Function For Coupon Collector&#39;s Function with Finite Number of Trials
R Function For Coupon Collector&#39;s Function with Finite Number of Trials I'm trying to write up a function that runs the Coupon Collector's Problem in R. I'm trying to make a function that will spit out the number of unique coupons collected from sample size n with a finite number of trials t. (For example, having ...
https://stackoverflow.com/questions/77527378/r-function-for-coupon-collectors-function-with-finite-number-of-trials
r, function, statistics, statistics-bootstrap
1,700,628,328
se_78197293
stackoverflow
DATA_SCIENCE
Proc GLM takes forever to load then crashes sas studio
Proc GLM takes forever to load then crashes sas studio I am trying to have a proc glm function for multiple variables. When I run the code, it takes a few minutes to process then the sas studio crashes and log me out. Where did I make a mistake: proc glm data=diet; class age sex smokstat bmi vituse cal fat fib...
https://stackoverflow.com/questions/78197293/proc-glm-takes-forever-to-load-then-crashes-sas-studio
statistics, sas
1,710,989,975
se_23036866
stackoverflow
DATA_SCIENCE
Scikit-learn is returning coefficient of determination (R^2) values less than -1
Scikit-learn is returning coefficient of determination (R^2) values less than -1 I'm doing a simple linear model. I have fire = load_data() regr = linear_model.LinearRegression() scores = cross_validation.cross_val_score(regr, fire.data, fire.target, cv=10, scoring='r2') print scores which yields [ 0.00000000e+00...
https://stackoverflow.com/questions/23036866/scikit-learn-is-returning-coefficient-of-determination-r2-values-less-than-1
python, statistics, scikit-learn
1,397,341,443
se_78198424
stackoverflow
DATA_SCIENCE
Why do these two approaches to calculating the MSE gradient in R not give the same result?
Why do these two approaches to calculating the MSE gradient in R not give the same result? I'm experimenting with approaches to speeding up the calculation of the MSE gradient function. I thought a good way to save time would be to precalculate some of the matrix operations, which I've attempted in the function mse_g...
https://stackoverflow.com/questions/78198424/why-do-these-two-approaches-to-calculating-the-mse-gradient-in-r-not-give-the-sa
r, matrix, statistics, gradient, matrix-multiplication
1,711,009,477
se_5830914
stackoverflow
DATA_SCIENCE
Real-time statistics: MySQL(/Drizzle) or MongoDB?
Real-time statistics: MySQL(/Drizzle) or MongoDB? We are working on a project that will feature real-time statistics of some actions (e.g. clicks). On every click, we will log information like date, age and gender (these come from Facebook), location, etc. We are discussing about the best place to store these informa...
https://stackoverflow.com/questions/5830914/real-time-statistics-mysql-drizzle-or-mongodb
mysql, mongodb, statistics, drizzle
1,304,073,047
se_64899361
stackoverflow
DATA_SCIENCE
Kaggle Dataset - Letter and numbers meaning
Kaggle Dataset - Letter and numbers meaning I have come across some data on Kaggle. https://www.itl.nist.gov/div898/strd/nls/data/LINKS/DATA/MGH09.dat I am trying to insert this to excel by copy and pasting it. What do the letters and numbers mean? How would this data look once it was converted?
https://stackoverflow.com/questions/64899361/kaggle-dataset-letter-and-numbers-meaning
math, statistics, data-science, kaggle, mathsat
1,605,725,038
se_77866959
stackoverflow
DATA_SCIENCE
How to calculate variance explained by a variable of interest, in a lm model with covariates?
How to calculate variance explained by a variable of interest, in a lm model with covariates? I am working in R on linear regressions with covariates, looking like : lm(x ~ y + a + b + c) With the summary() function, I can get the p value corresponding to each of the variables of the model. However, I only have the R^...
https://stackoverflow.com/questions/77866959/how-to-calculate-variance-explained-by-a-variable-of-interest-in-a-lm-model-wit
r, statistics, regression, lm
1,706,019,427
se_78193273
stackoverflow
DATA_SCIENCE
How to calculate statistical power of R^2 in Python?
How to calculate statistical power of R^2 in Python? Is there any way to calculate the statistical power of an R^2 value in Python? I know you can do it for a t-test but I can't find anyway to do it for R^2.
https://stackoverflow.com/questions/78193273/how-to-calculate-statistical-power-of-r2-in-python
statistics
1,710,937,406
se_78190186
stackoverflow
DATA_SCIENCE
Random perturbation of a value in MATLAB
Random perturbation of a value in MATLAB Let's say I have a value 100 and I want to perturb this value randomly by 1% based on a normal distribution. How could I do this in MATLAB? I seem to have some confusion with randn etc. I have used randn so far but I do not seem to be inside this 1% threshold all the time.
https://stackoverflow.com/questions/78190186/random-perturbation-of-a-value-in-matlab
matlab, statistics, normal-distribution
1,710,892,194
se_78189636
stackoverflow
DATA_SCIENCE
Copula contour plot
Copula contour plot I am trying to get some nice contour plots of various Copulas with Gaussian marginals, but somehow I do not at all get what I would expect - what am I doing wrong ? My R code: library(copula) library(mvtnorm) #Gaussian Density & distribution G_copula = norm.cop <- normalCopula(0.70) cp <- contour(...
https://stackoverflow.com/questions/78189636/copula-contour-plot
r, statistics, copula
1,710,882,296
se_78180277
stackoverflow
DATA_SCIENCE
Transition probabilities in Continuous Time Markov Chain following Poisson Processes
Transition probabilities in Continuous Time Markov Chain following Poisson Processes Let's imagine we have the following states corresponding to the number of users in a system in a Continuous Time Markov Chain: ---- [10] ------ [11] ------ [12] ........... [17] The arrival of a new users in the system follows a Pois...
https://stackoverflow.com/questions/78180277/transition-probabilities-in-continuous-time-markov-chain-following-poisson-proce
matlab, statistics, markov-chains, markov
1,710,765,623
se_75750310
stackoverflow
DATA_SCIENCE
How to detect false positive?
How to detect false positive? When applying statistical hypothesis testing, type I error (false positive) could happen. Often we would not know whether type I error happens. But are there cases otherwise, i.e., we can have the truth later after applying hypothesis testing? For example, I would like to know if women li...
https://stackoverflow.com/questions/75750310/how-to-detect-false-positive
statistics, hypothesis-test, false-positive
1,678,916,259
se_78180975
stackoverflow
DATA_SCIENCE
Finding outlier points of a curve
Finding outlier points of a curve I have a range of points that I get after implementing contour detection on thousands of images. It is expected to be like a smooth spline. But sometimes algorithm fails due to quality of the image. Main problem is that, curve got dropping or jumping points. I present examples: This i...
https://stackoverflow.com/questions/78180975/finding-outlier-points-of-a-curve
statistics, curve-fitting, curve, outliers
1,710,772,670
se_78176235
stackoverflow
DATA_SCIENCE
Coin throw probability on a chessboard square
Coin throw probability on a chessboard square I need some insights on the following problem. You are given a coin whose diameter is equivalent to half the length of a chessboard unit square. If you throw the coin on the board, what is the probability that it lands completely within a single square? Here is what I need...
https://stackoverflow.com/questions/78176235/coin-throw-probability-on-a-chessboard-square
statistics, probability, probability-theory
1,710,696,458
se_77982509
stackoverflow
DATA_SCIENCE
Computing multivariate normal integral over box region in SciPy
Computing multivariate normal integral over box region in SciPy I am trying to evaluate the multivariate normal distribution to get the probability that 1 < z1 < 2.178 and 2.178 < z2 < inf. The mean of the distribution is zero, all variances are 1, and the covariance is 1/sqrt(2). In R, I get the correct results via: ...
https://stackoverflow.com/questions/77982509/computing-multivariate-normal-integral-over-box-region-in-scipy
r, scipy, statistics, normal-distribution, scipy.stats
1,707,751,350
se_78168111
stackoverflow
DATA_SCIENCE
Decompose time-series signal into different components
Decompose time-series signal into different components I am working with time series data from a sensor that measures particulate matter. I know that there is an ambient/ background concentration (which always exists and can naturally vary due to various conditions) and concentration due to human/other activity (for e...
https://stackoverflow.com/questions/78168111/decompose-time-series-signal-into-different-components
r, statistics, time-series, signal-processing, sensors
1,710,517,453
se_78011651
stackoverflow
DATA_SCIENCE
To find angular frequency and wave vector for time series data using minimum variance method
To find angular frequency and wave vector for time series data using minimum variance method Suppose, I have 10 set of time series data velocity components Vx, Vy and Vz with 5 minutes interval of time, how to find the angular frequency and wave vector using minimum variance method for those data? Thanks! What else me...
https://stackoverflow.com/questions/78011651/to-find-angular-frequency-and-wave-vector-for-time-series-data-using-minimum-var
math, statistics, data-analysis, physics
1,708,163,706
se_41657704
stackoverflow
DATA_SCIENCE
Generating random numbers from arbitrary probability density function
Generating random numbers from arbitrary probability density function I would like to be able to generate random numbers with a probability density function that comes from a drawn curve. These two below have the same area under the curve but should produce lists of random numbers with different characteristics. My...
https://stackoverflow.com/questions/41657704/generating-random-numbers-from-arbitrary-probability-density-function
python, random, statistics
1,484,452,980
se_78155270
stackoverflow
DATA_SCIENCE
Combining matchit objects for descriptive analysis (CRAN/R)
Combining matchit objects for descriptive analysis (CRAN/R) What I want to do: I am working with MatchIt in R. Because it is so slow and due to computational constraints (I have many thousands of observations), I was forced to split up each of my propensity score matchings by year. I know I can easily extract the resu...
https://stackoverflow.com/questions/78155270/combining-matchit-objects-for-descriptive-analysis-cran-r
r, statistics, match, matching, propensity-score-matching
1,710,346,201
se_78120952
stackoverflow
DATA_SCIENCE
How to specify covariates in gtsummary ANCOVA
How to specify covariates in gtsummary ANCOVA In a gtsummary table, I want to show the p-value for the difference in several variables between group A and group B, corrected for age and sex. I found here that I can use the ANCOVA test in gtsummary::add_p. However, I can't figure out how to specify my covariates "age" ...
https://stackoverflow.com/questions/78120952/how-to-specify-covariates-in-gtsummary-ancova
dplyr, statistics, summary, gtsummary, ancova
1,709,810,579
se_78036044
stackoverflow
DATA_SCIENCE
Compute sensitivity, specificity, and more using multiple input variables in R
Compute sensitivity, specificity, and more using multiple input variables in R Preamble: the question I am going to ask can be considered a follow up of this discussion, for which a nice answer was provided. Also, I was given extremely helpful advice here, and the idea of what I am dealing with now goes into a similar...
https://stackoverflow.com/questions/78036044/compute-sensitivity-specificity-and-more-using-multiple-input-variables-in-r
r, automation, statistics, tidyverse, data-analysis
1,708,537,133
se_78154500
stackoverflow
DATA_SCIENCE
Stats Model Power Calculation
Stats Model Power Calculation The documentation is not very clear about the method for computing the number of samples estimated for a significant result, precisely the number of N. For example, does this N relate to one distribution? So, is the output the total number of observations (across both distributions in an ...
https://stackoverflow.com/questions/78154500/stats-model-power-calculation
python, statistics, statsmodels
1,710,339,647
se_75991862
stackoverflow
DATA_SCIENCE
What is the meaning of the parameter bias of the pandas.core.window.ewm.ExponentialMovingWindow.var?
What is the meaning of the parameter bias of the pandas.core.window.ewm.ExponentialMovingWindow.var? What is the meaning of the parameter bias of the pandas.core.window.ewm.ExponentialMovingWindow.var? The official reference describes it as "Use a standard estimation bias correction." I think this explanation is uncle...
https://stackoverflow.com/questions/75991862/what-is-the-meaning-of-the-parameter-bias-of-the-pandas-core-window-ewm-exponent
python, pandas, math, statistics
1,681,273,020
se_78144605
stackoverflow
DATA_SCIENCE
Probability distribution function / Line of best fit
Probability distribution function / Line of best fit I have data about pedestrian counts from multiple sensors along a street. I know the location of each sensor. Assume that the street has total length L. I want a function F(l,t) that gives pedestrian counts given a length l (along the street)and a time t. The graph ...
https://stackoverflow.com/questions/78144605/probability-distribution-function-line-of-best-fit
python, statistics, probability-distribution
1,710,216,393
se_78141722
stackoverflow
DATA_SCIENCE
How to perform enrichment p-value for a motif
How to perform enrichment p-value for a motif I have a data frame that looks like below. Category,Total_Genes,UUAGGG_motif Background,22591,18190 SetA,122,102 SetB,198,182 SetC,90,82 I have counted the number of motifs available in each category. Now I want to calculate three p-value (SetA vs Background - SetB vs bac...
https://stackoverflow.com/questions/78141722/how-to-perform-enrichment-p-value-for-a-motif
r, statistics
1,710,170,404
se_78142195
stackoverflow
DATA_SCIENCE
How to give negative log10 distribution to Python probplot function for qq-plotting p-values?
How to give negative log10 distribution to Python probplot function for qq-plotting p-values? I want to translate the following code from R to Python using scipy.stats.probplot. qqplot(-log10(ppoints(1000)), -log10(p_value)) This is Q-Q plot of p-values compared to uniform distribution with a minus log scale. I am af...
https://stackoverflow.com/questions/78142195/how-to-give-negative-log10-distribution-to-python-probplot-function-for-qq-plott
python, statistics, scipy.stats
1,710,175,062
se_36846620
stackoverflow
DATA_SCIENCE
Comparing distributions with chi-square in python
Comparing distributions with chi-square in python I have two types of data lists, historical data and simulated data, that I want to compare with each other to see if they have the same distribution. My code is as follow: import scipy.stats as stats data_hist = [164, 157, 145, 113, 127, 192, 214, 193, 107, 95, 60, 5...
https://stackoverflow.com/questions/36846620/comparing-distributions-with-chi-square-in-python
python, statistics, chi-squared
1,461,603,339
se_223032
stackoverflow
DATA_SCIENCE
tf-idf and previously unseen terms
tf-idf and previously unseen terms TF-IDF (term frequency - inverse document frequency) is a staple of information retrieval. It's not a proper model though, and it seems to break down when new terms are introduced into the corpus. How do people handle it when queries or new documents have new terms, especially if t...
https://stackoverflow.com/questions/223032/tf-idf-and-previously-unseen-terms
nlp, statistics, tf-idf, oov
1,224,615,215
se_78140678
stackoverflow
DATA_SCIENCE
Issue with clickhouse equality comparison between integers
Issue with clickhouse equality comparison between integers I have a Clickhouse database where I store my data for analytics. In the table I have a column with name Date which is of type Int64. I store dates in this format (202403011) representing 2023-03-11. Im trying to check if date is equal to a specific date like ...
https://stackoverflow.com/questions/78140678/issue-with-clickhouse-equality-comparison-between-integers
database, statistics, clickhouse
1,710,160,791
se_78140612
stackoverflow
DATA_SCIENCE
What is the Best theoretical Distribution for Bimodal Distribution?
What is the Best theoretical Distribution for Bimodal Distribution? I have a dataset displaying a bimodal distribution, confirmed through a dip statistic test with a significantly small P-value, providing evidence against the null hypothesis of unimodality. I’ve calculated the empirical cumulative distribution functio...
https://stackoverflow.com/questions/78140612/what-is-the-best-theoretical-distribution-for-bimodal-distribution
python, statistics, ecdf
1,710,160,108
se_78128453
stackoverflow
DATA_SCIENCE
SDC in R: ProtectTable() does not converge
SDC in R: ProtectTable() does not converge I have a dataset that contains 4 categorical variables, with two of them with a cardinality of 4, one of 2 and one of 3. I want to apply ProtectTable() from the R Package SDC. To include the possibility of multiple values being true within one variable, I one hot encoded the ...
https://stackoverflow.com/questions/78128453/sdc-in-r-protecttable-does-not-converge
r, statistics, convergence
1,709,908,871
se_78057268
stackoverflow
DATA_SCIENCE
How do I reproduce a SGDClassifier with modified_huber loss?
How do I reproduce a SGDClassifier with modified_huber loss? I have a model defined like so: rng = 42 model = Pipeline([ ('scaler', RobustScaler()), ('feature', SelectKBest(k=42)), ('model', SGDClassifier(loss='modified_huber', shuffle=True, random_state=rng)) ]) That when I train+predict in two separate ...
https://stackoverflow.com/questions/78057268/how-do-i-reproduce-a-sgdclassifier-with-modified-huber-loss
machine-learning, scikit-learn, statistics, loss
1,708,887,463
se_28152167
stackoverflow
DATA_SCIENCE
How to calculate the integral of log-normal distribution with MATLAB
How to calculate the integral of log-normal distribution with MATLAB I want to calculate the part-expectation of log-normal distribution via: m = 1; v = 2; mu = log((m^2)/sqrt(v+m^2)); sigma = sqrt(log(v/(m^2)+1)); syms x; d = x*lognpdf(x,mu,sigma); int(d, x, 0, 10); However, MATLAB says: Error using symfun>v...
https://stackoverflow.com/questions/28152167/how-to-calculate-the-integral-of-log-normal-distribution-with-matlab
matlab, statistics, distribution, symbolic-math, symbolic-integration
1,422,282,908
se_18036813
stackoverflow
DATA_SCIENCE
How to integrate matrices (Sum of Matrices with dx spacing) in MATLAB?
How to integrate matrices (Sum of Matrices with dx spacing) in MATLAB? I'm pretty confused on how I would go about summing an infinite amount of matrices in MATLAB. Lets say I have this function (a gaussian): %Set up grid/coordinate system Ngrid=400; w=Ngrid; h=Ngrid; %Create Gaussian Distribution G = zeros ([w, h...
https://stackoverflow.com/questions/18036813/how-to-integrate-matrices-sum-of-matrices-with-dx-spacing-in-matlab
matlab, statistics, gaussian, numerical-integration, integral
1,375,560,345
se_1662943
stackoverflow
DATA_SCIENCE
Standard Normal Distribution z-value function in C#
Standard Normal Distribution z-value function in C# I been looking at the recent blog post by Jeff Atwood on Alternate Sorting Orders. I tried to convert the code in the post to C# but I ran into an issue. There is no function in .NET that I know of that will return the z-value, given the percentage of area under the ...
https://stackoverflow.com/questions/1662943/standard-normal-distribution-z-value-function-in-c
c#, algorithm, math, statistics
1,257,187,584
se_19787172
stackoverflow
DATA_SCIENCE
How to split a data into k-folds NOT randomly in matlab?
How to split a data into k-folds NOT randomly in matlab? I have a dataset, for simplicity let's say it has 1000 samples (each is a vector). I want to split my data for cross validation, for train and test, NOT randomly1, so for example if I want 4-fold cross validation, I should get: fold1: train = 1:250; test= 251:10...
https://stackoverflow.com/questions/19787172/how-to-split-a-data-into-k-folds-not-randomly-in-matlab
matlab, statistics, cross-validation
1,383,648,480
se_78133384
stackoverflow
DATA_SCIENCE
non-conformable arguments when read %*%
non-conformable arguments when read %*% This is my Code, maybe you know the method of Geographically Weighted Negative Binomial and can fix the error > gemes2=function(X,y,W1,phi1,b1){ + beta=matrix(c(0),6,6,byrow=T) + #beta[1,1]=phi1 + #beta[1,2:6]=b1 + satu=rep(1,38) + dua=as.matrix(satu) + bxx=rbind(c(p...
https://stackoverflow.com/questions/78133384/non-conformable-arguments-when-read
r, statistics, spatial, gwr
1,710,007,621
se_70623835
stackoverflow
DATA_SCIENCE
Python - Grabbing Permutation Importance From OLS Model
Python - Grabbing Permutation Importance From OLS Model As the title states, I'm trying to grab permutation importance for the features in my OLS model, but am getting this: TypeError: estimator should be an estimator implementing 'fit' method, <statsmodels.regression.linear_model.RegressionResultsWrapper object at 0x...
https://stackoverflow.com/questions/70623835/python-grabbing-permutation-importance-from-ols-model
python, machine-learning, scikit-learn, statistics, regression
1,641,570,700
se_78129999
stackoverflow
DATA_SCIENCE
Problem with parsing variables in a R function
Problem with parsing variables in a R function I'm working with a dataset in R and I want to create a function that separates values into three categories based on quartiles. Values below the first quartile (Q1) should be labeled "Low expression", values above the third quartile (Q3) should be labeled "High expression...
https://stackoverflow.com/questions/78129999/problem-with-parsing-variables-in-a-r-function
r, statistics, tidyverse, data-handling
1,709,927,783
se_78130654
stackoverflow
DATA_SCIENCE
hmmlearn MultinomialHMM emissionprob_ size
hmmlearn MultinomialHMM emissionprob_ size I'm using the code below to fit an HMM model with two hidden states, a vocabulary of size 5 (so 5 possible symbols), and a list of sequences, each with 10 observations. I don't understand why model.emissionprob_ has size (2, 10), when the number of columns should be equal to ...
https://stackoverflow.com/questions/78130654/hmmlearn-multinomialhmm-emissionprob-size
python, statistics, probability, hidden-markov-models, hmmlearn
1,709,939,433
se_78118334
stackoverflow
DATA_SCIENCE
How Can I Get Bootstrapped BCa Confidence Intervals for Spearman&#39;s Correlation Matrix in R?
How Can I Get Bootstrapped BCa Confidence Intervals for Spearman&#39;s Correlation Matrix in R? Good evening R experts, I am generating a Spearman's correlation matrix in R using all variables under study for my current project. To be consistent with the other analyses I am conducting, I would like to construct BCa bo...
https://stackoverflow.com/questions/78118334/how-can-i-get-bootstrapped-bca-confidence-intervals-for-spearmans-correlation-m
r, statistics, correlation, confidence-interval, bootstrapping
1,709,776,299
se_78030829
stackoverflow
DATA_SCIENCE
Simulating Networks in R given parameter values
Simulating Networks in R given parameter values I am struggling with simulating networks, specifically using the ergm package. It seems that in order to simulate a network, we must first run a regression on some initial matrix, and then use that output in the "simulate" function. Below is an example: fit <- ergm(flobu...
https://stackoverflow.com/questions/78030829/simulating-networks-in-r-given-parameter-values
r, statistics, ergm
1,708,471,838
se_78125267
stackoverflow
DATA_SCIENCE
How to get statistics about uri in azure
How to get statistics about uri in azure I would like to know how to get statistics about URI in Azure. We are currently providing services using CDN + Storage. Here, each file stored in storage has a different endpoint, and in this case, I would like to calculate statistics for each endpoint. I checked the related me...
https://stackoverflow.com/questions/78125267/how-to-get-statistics-about-uri-in-azure
azure, statistics, storage, cdn
1,709,864,898
se_78122657
stackoverflow
DATA_SCIENCE
TTEST and Data Analysis ToolPak give different p-values for t-test
TTEST and Data Analysis ToolPak give different p-values for t-test My previous question was incorrectly closed, so I made a new post as I am unable to reopen it. I'm trying to perform a t-test on the two pairs of means you can see in the images below - blue vs red, two tailed, unpaired with unequal variance. As you ca...
https://stackoverflow.com/questions/78122657/ttest-and-data-analysis-toolpak-give-different-p-values-for-t-test
excel, excel-formula, statistics
1,709,826,325
se_77353447
stackoverflow
DATA_SCIENCE
tms-NET sampling in Python
tms-NET sampling in Python I have been trying find some pre-implementation of tms-NET sampling in python (as I couldn't implement by myself) for my projects wherein I want to perform sampling on numpy array of shape (num_of_data, embedding_dimensions=100). I couldn't find it. Can anyone help me with my problem ? I als...
https://stackoverflow.com/questions/77353447/tms-net-sampling-in-python
python, random, statistics, sampling
1,698,161,450
se_78103625
stackoverflow
DATA_SCIENCE
PowerBI Histogram with Dynamic Bins Based on Variable
PowerBI Histogram with Dynamic Bins Based on Variable Imagine you have the following dataset in PowerBI: Date Temperature (Deg C) City 10/01/01 5 London 10/01/01 15 Lisbon 10/01/01 10 Paris 10/01/02 7 London 10/01/02 12 ...
https://stackoverflow.com/questions/78103625/powerbi-histogram-with-dynamic-bins-based-on-variable
powerbi, statistics, visualization, histogram
1,709,580,444
se_9253307
stackoverflow
DATA_SCIENCE
Fitting Gaussian to specific data
Fitting Gaussian to specific data 52.3210481666667 52.3841781666667 52.4938248333333 52.6234071666667 52.9058301666667 53.2846095000000 53.8162295000000 54.4442056666667 55.2349903333333 56.0556786666667 56.9660778333333 57.8731546666667 58.7802311666667 59.6142101666667 60.42...
https://stackoverflow.com/questions/9253307/fitting-gaussian-to-specific-data
matlab, statistics, gaussian, model-fitting
1,329,085,606
se_18817867
stackoverflow
DATA_SCIENCE
Plotting a histogram with super-imposed Gaussian
Plotting a histogram with super-imposed Gaussian I have a set of data that I need to plot on a histogram. Furthermore, based on the estimated standard deviation and mean of my sample, I need to overlay a Gaussian with these parameters onto the figure. Finally, I would like to plot vertical lines that indicate the mean...
https://stackoverflow.com/questions/18817867/plotting-a-histogram-with-super-imposed-gaussian
matlab, statistics
1,379,282,000