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_35788140
stackoverflow
DATA_SCIENCE
Scipy Stats ttest_1samp Hypothesis Testing For Comparing Previous Performance To Sample
Scipy Stats ttest_1samp Hypothesis Testing For Comparing Previous Performance To Sample My Problem I'm Trying To Solve I have 11 months worth of performance data: Month Branded Non-Branded Shopping Grand Total 0 2/1/2015 1330 334 161 1825 1 3/1/2015 1344 293 ...
https://stackoverflow.com/questions/35788140/scipy-stats-ttest-1samp-hypothesis-testing-for-comparing-previous-performance-to
python, scipy, statistics
1,457,066,656
se_72199088
stackoverflow
DATA_SCIENCE
How can I calculate the number of lines changed since last commit in Git?
How can I calculate the number of lines changed since last commit in Git? Is there an easy way to calculate number of lines changed in tracked files since last commit? This is about monitoring changes that are not commited yet. Context is that I would like to write a tool that will warn me when I modify large portion ...
https://stackoverflow.com/questions/72199088/how-can-i-calculate-the-number-of-lines-changed-since-last-commit-in-git
git, statistics
1,652,263,329
se_31277247
stackoverflow
DATA_SCIENCE
R Decile percentage plotting
R Decile percentage plotting I have a data frame from a home income poll that looks like this: ID Income Expense 001 2389.9 1400.5 003 5499.3 2309.2 .. .. .. *this is an example, the actual one has over 5k observations I would like to be able to: Plot the decile distribu...
https://stackoverflow.com/questions/31277247/r-decile-percentage-plotting
r, ggplot2, statistics, bigdata, data-analysis
1,436,295,928
se_58811930
stackoverflow
DATA_SCIENCE
In OLS, why is squaring preferred over taking absolute while calculating errors in linear regression?
In OLS, why is squaring preferred over taking absolute while calculating errors in linear regression? Why do we use the squared residuals instead of the absolute residuals in OLS estimation. My idea was that we use the square of the error values, so that residuals below the fitted line (which are then negative), woul...
https://stackoverflow.com/questions/58811930/in-ols-why-is-squaring-preferred-over-taking-absolute-while-calculating-errors
machine-learning, statistics, artificial-intelligence, linear-regression, statsmodels
1,573,532,001
se_79942743
stackoverflow
DATA_SCIENCE
coordinate proximity for likert scale analysis (php)
coordinate proximity for likert scale analysis (php) This is a project in PHP but I am happy with any suggestions, regardless of language. The coding is less the issue than a missing piece in logic I am struggling with. Users answer a series of 7-point Likert scale questions (from strongly against to strongly support ...
https://stackoverflow.com/questions/79942743/coordinate-proximity-for-likert-scale-analysis-php
php, algorithm, statistics, likert
1,779,077,283
se_50936187
stackoverflow
DATA_SCIENCE
Algorithm to calibrate & normalize readings from multiple temperature sensors
Algorithm to calibrate & normalize readings from multiple temperature sensors I'm building a custom HVAC controller. Among other things, it will have temperature sensors in multiple locations. The problem is, at any given instant, the sensors all have slightly different opinions about the current air temperature. ...
https://stackoverflow.com/questions/50936187/algorithm-to-calibrate-normalize-readings-from-multiple-temperature-sensors
c++, statistics, normalization
1,529,438,911
se_59038290
stackoverflow
DATA_SCIENCE
Alcohol-related crime statistics
Alcohol-related crime statistics Where can I get statistics or data on alcohol-related crime by state preferably 2017 or newer? I am looking for either a full dataset that would contain drunk driving rates and violent crime involving alcohol or just state-level statistics.
https://stackoverflow.com/questions/59038290/alcohol-related-crime-statistics
database, statistics
1,574,707,533
se_79948416
stackoverflow
DATA_SCIENCE
How do I generate realistic-looking fake sensor data in Python?
How do I generate realistic-looking fake sensor data in Python? I'm testing a data pipeline and need to simulate sensor readings (CPU %, temperature) without real hardware. My first attempt used random.uniform(). But it looks like noise. cpu = random.uniform(0, 100) It jumps all over the range every reading. It goes ...
https://stackoverflow.com/questions/79948416/how-do-i-generate-realistic-looking-fake-sensor-data-in-python
python, testing, random, statistics, simulation
1,780,053,230
se_76389748
stackoverflow
DATA_SCIENCE
How do I calculate the omega values for my bifactor model?
How do I calculate the omega values for my bifactor model? I am a psychology graduate student and I am trying to get the required statistics for my bifactor model according to APA. I was able to get the model to converge with some modifications to item loadings (there are 22 items total) using the step by Arndt Regorz...
https://stackoverflow.com/questions/76389748/how-do-i-calculate-the-omega-values-for-my-bifactor-model
r, statistics, r-lavaan, psych
1,685,705,346
se_44339070
stackoverflow
DATA_SCIENCE
Calculating Population Standard Deviation in R
Calculating Population Standard Deviation in R Looking for a way to calculate Population Standard Deviation in R -- using greater than 10 samples. Unable to extract the source C code in R to find the method of calculation. # Sample Standard Deviation # Note: All the below match with 10 or less samples n <- 10 # 10 o...
https://stackoverflow.com/questions/44339070/calculating-population-standard-deviation-in-r
r, statistics, variance
1,496,449,493
se_29134771
stackoverflow
DATA_SCIENCE
Plot won&#39;t fit in R window
Plot won&#39;t fit in R window I am using the meta package in R to do a meta-analysis of proportions. I have about a hundred studies in my analysis. When I type forest(result) to create my forest plot, it works, but the graphic is chopped off at the top and bottom. It won't fit in the plot window no matter what I do! ...
https://stackoverflow.com/questions/29134771/plot-wont-fit-in-r-window
r, plot, graphics, statistics
1,426,722,340
se_61561640
stackoverflow
DATA_SCIENCE
How do you get the distribution of an IID?
How do you get the distribution of an IID? If U1 and U2 are iid Unif(0,1) what is the distribution of -.5ln[(1-U1)U2]
https://stackoverflow.com/questions/61561640/how-do-you-get-the-distribution-of-an-iid
statistics
1,588,432,492
se_78496516
stackoverflow
DATA_SCIENCE
Finding training MSE from cv.glmnet R package
Finding training MSE from cv.glmnet R package I've been trying to find the MSE for the training dataset when using the cv.glmnet function from the glmnet package in R. Any help would be appreciated. Thanks The best I've come up with is below but I'm not sure if it's correct set.seed(34064064) library(ISLR2) Library(gl...
https://stackoverflow.com/questions/78496516/finding-training-mse-from-cv-glmnet-r-package
r, statistics, cross-validation, glmnet, mse
1,715,958,717
se_79943038
stackoverflow
DATA_SCIENCE
Visualizing and statistically describing effect of many variables that explain meta-analytic effect size
Visualizing and statistically describing effect of many variables that explain meta-analytic effect size I am working on a meta-analysis of ~200 studies where I divided the dataset into 4 subgroups. I tested the effect of 10 variables (3 categorical and 7 continuous) that explain my meta-analytic effect size (r). Thes...
https://stackoverflow.com/questions/79943038/visualizing-and-statistically-describing-effect-of-many-variables-that-explain-m
variables, statistics, pca, meta-analysis
1,779,116,194
se_79942698
stackoverflow
DATA_SCIENCE
Scipy’s Earth Mover’s Distance: pdf’s x &amp; y axis arguments
Scipy’s Earth Mover’s Distance: pdf’s x &amp; y axis arguments I wan’t to use the wasserstein_distance_nd function to calculate the EMD between two particle size distributions (PSD, 1D case) generated by laser diffraction. The raw data consists of one column for the particle size and one column for the probability den...
https://stackoverflow.com/questions/79942698/scipy-s-earth-mover-s-distance-pdf-s-x-y-axis-arguments
scipy, statistics, distribution
1,779,062,528
se_49282083
stackoverflow
DATA_SCIENCE
xtsum command for R?
xtsum command for R? We're working on panel data, and there is a command in Stata, xtsum, that gives you within and between variance for the variables in the data set. Is there a similar command for R, that produces clean output?
https://stackoverflow.com/questions/49282083/xtsum-command-for-r
r, statistics, stata, panel-data
1,521,042,236
se_54466196
stackoverflow
DATA_SCIENCE
Descriptive statistics in Python /with Pandas with std in parentheses
Descriptive statistics in Python /with Pandas with std in parentheses This question concerns the best-practice to do descriptive statistics in Python with a formatted output that correspond to tables found in academic publications: means with their respective standard deviations in parenthesis below. Final goal is to ...
https://stackoverflow.com/questions/54466196/descriptive-statistics-in-python-with-pandas-with-std-in-parentheses
python, pandas, statistics, statsmodels, standard-deviation
1,548,955,897
se_79930032
stackoverflow
DATA_SCIENCE
Change gtsummary symbols for significance stars
Change gtsummary symbols for significance stars Consider the following example: library(gtsummary) lm(marker ~ stage + grade, data = trial) |> tbl_regression() |> add_global_p() |> add_significance_stars( hide_p = FALSE, pattern = "{p.value}{stars}" ) which results in: How can I change the convention...
https://stackoverflow.com/questions/79930032/change-gtsummary-symbols-for-significance-stars
r, statistics, gtsummary
1,776,857,236
se_79925567
stackoverflow
DATA_SCIENCE
why does p in the last occasion become unstable only with complex Phi?
why does p in the last occasion become unstable only with complex Phi? I am fitting Cormack–Jolly–Seber (CJS) models using the RMark package in R. My workflow is: 1-    I first selected the structure for detection probability (p) using models with constant survival (Phi ~ 1), comparing models with p constant vs time- ...
https://stackoverflow.com/questions/79925567/why-does-p-in-the-last-occasion-become-unstable-only-with-complex-phi
r, statistics, modeling, glm, rmark
1,776,190,641
se_55863930
stackoverflow
DATA_SCIENCE
Automation of Outlier Detection
Automation of Outlier Detection I am working on a problem, i.e. automation of outlier detection. For that, I need an algorithm to detect the outliers. I read about z score and inter-quantile range. But z score works only for normally distributed data. And am not sure about the inter-quantile range if it works for ever...
https://stackoverflow.com/questions/55863930/automation-of-outlier-detection
python, algorithm, statistics, outliers
1,556,268,284
se_79920675
stackoverflow
DATA_SCIENCE
Water sewage demand
Water sewage demand Any suggestions on what approach to use when trying to normalize a set of 75 CSV files that contain an average of 300.000 rows with "water flow"? The problem is the frequency of the meter (some of them measure each minute, other each 5 other 15 min) etc, and also the unit it uses (some of them Cubi...
https://stackoverflow.com/questions/79920675/water-sewage-demand
python, pandas, dataframe, statistics
1,775,429,390
se_79917605
stackoverflow
DATA_SCIENCE
How to plot an envelope curve
How to plot an envelope curve I have some points, and I want to plot an envelope curve for these points. points <- data.frame( x = c(11, 27, 17, 12, 9, 25, 19, 20, 18, 26, 13, 25, 17, 16, 10, 26, 15, 20, 8, 9, 18, 23,12, 11, 10, 22, 17, 14, 14, 9, 25, 25, 10, 15, 21, 16, 22, 24, 14, 15, 8, 16, 10, 9, 18, 11, 15, 27,...
https://stackoverflow.com/questions/79917605/how-to-plot-an-envelope-curve
r, ggplot2, statistics, quantile-regression
1,774,943,276
se_79915796
stackoverflow
DATA_SCIENCE
How to get the p values from LSD.test?
How to get the p values from LSD.test? I have a randomized block design experiment with treatment, site, block, and days as relevant variables and a count variable as the dependent variable. I run an anova and get significant results for treatment. It is desired to have p-values for each treatment vs control for each ...
https://stackoverflow.com/questions/79915796/how-to-get-the-p-values-from-lsd-test
r, statistics, p-value
1,774,622,679
se_60531164
stackoverflow
DATA_SCIENCE
Calculating a trimmed mean at scale
Calculating a trimmed mean at scale I currently have a dataset that has many datapoints (on the order of billions) in Elasticsearch. And I do statistics on those documents in ways that Elasticsearch provides (mean, median, percentiles, etc.) However I now have need of a Trimmed Mean calculation. In short this is wh...
https://stackoverflow.com/questions/60531164/calculating-a-trimmed-mean-at-scale
elasticsearch, statistics, mean
1,583,341,238
se_79913497
stackoverflow
DATA_SCIENCE
Algorithm for selecting random representative subset based on absolute frequencies
Algorithm for selecting random representative subset based on absolute frequencies Given a long list of (unique) names, as well as an absolute frequency for each name, what is an efficient algorithm to select a random subset that is (more or less) representative of the entire list? I have tried looking this up on the ...
https://stackoverflow.com/questions/79913497/algorithm-for-selecting-random-representative-subset-based-on-absolute-frequenci
algorithm, random, statistics
1,774,355,202
se_79913674
stackoverflow
DATA_SCIENCE
Standardising predictors before using poly() in a GLMM
Standardising predictors before using poly() in a GLMM I am building a GLMM to answer an ecological question. Most of my predictors were log-transformed and then z-score standardised ((x - mean) / SD) before being included in the model. I would like to include two predictors as second-degree polynomial terms using pol...
https://stackoverflow.com/questions/79913674/standardising-predictors-before-using-poly-in-a-glmm
r, statistics, glmmtmb, glmm
1,774,369,834
se_42633083
stackoverflow
DATA_SCIENCE
How to perform a Levene&#39;s test using scipy
How to perform a Levene&#39;s test using scipy I've been trying to use scipy.stats.levene with no success. I have a numpy matrix with shape (2128, 45100). Each row is a sample and belongs to one of 3 clusters. I want to test if there is homoscedasticity between clusters. I've tried filtering my matrix by cluster an...
https://stackoverflow.com/questions/42633083/how-to-perform-a-levenes-test-using-scipy
python, scipy, statistics
1,488,825,378
se_13404468
stackoverflow
DATA_SCIENCE
T-test in Pandas
T-test in Pandas If I want to calculate the mean of two categories in Pandas, I can do it like this: data = {'Category': ['cat2','cat1','cat2','cat1','cat2','cat1','cat2','cat1','cat1','cat1','cat2'], 'values': [1,2,3,1,2,3,1,2,3,5,1]} my_data = DataFrame(data) my_data.groupby('Category').mean() Category: ...
https://stackoverflow.com/questions/13404468/t-test-in-pandas
python, pandas, scipy, statistics, hypothesis-test
1,353,006,717
se_79907372
stackoverflow
DATA_SCIENCE
Applying Kolmogorov-Smirnov (KS) test to evaluate multivariate synthetic tabular data (TVAE/TabDDPM vs. Empirical baseline)
Applying Kolmogorov-Smirnov (KS) test to evaluate multivariate synthetic tabular data (TVAE/TabDDPM vs. Empirical baseline) I am benchmarking several tabular Generative AI models (including TVAE, TabDDPM, and WGAN-GP) to synthesize sensor data. I need to rigorously evaluate the statistical similarity between my genera...
https://stackoverflow.com/questions/79907372/applying-kolmogorov-smirnov-ks-test-to-evaluate-multivariate-synthetic-tabular
python, scipy, statistics, google-generativeai
1,773,474,914
se_76650079
stackoverflow
DATA_SCIENCE
Difference between predict() and predict_proba() functions in scikit learn
Difference between predict() and predict_proba() functions in scikit learn After training a tree: clf = DecisionTreeClassifier() clf.fit(Xtrain, ytrain) I have decided to test its performance on the training data itself (just to compare, later, with the test data, in terms of Sensitivity Specificity and ROC-AUC). But...
https://stackoverflow.com/questions/76650079/difference-between-predict-and-predict-proba-functions-in-scikit-learn
python, scikit-learn, statistics, data-science
1,688,949,463
se_75276555
stackoverflow
DATA_SCIENCE
Split a pandasframe into X groups each with an average value of Y
Split a pandasframe into X groups each with an average value of Y Really wish I would've paid more attention to statistics in college, maybe I'd remember something for this. Regardless, I have a dataset with approx ~4800 rows, and I want to group this dataset into 8 groups, however I'd like this final dataset to have ...
https://stackoverflow.com/questions/75276555/split-a-pandasframe-into-x-groups-each-with-an-average-value-of-y
python, pandas, statistics
1,675,010,377
se_78481553
stackoverflow
DATA_SCIENCE
How can I use the Google Sheets API to append some data to a new row in a Google Sheet?
How can I use the Google Sheets API to append some data to a new row in a Google Sheet? How can append arbitrary data to a row in a Google Sheet? I have a Stats project where we need to collect at least 30 data points each from 4 groups on an online form that I made. Pipedream would be my ideal choice for this, except...
https://stackoverflow.com/questions/78481553/how-can-i-use-the-google-sheets-api-to-append-some-data-to-a-new-row-in-a-google
google-sheets, automation, google-api, statistics, chi-squared
1,715,745,833
se_79892893
stackoverflow
DATA_SCIENCE
2–6 day bandpass 61 day lanczos filter in r code?
2–6 day bandpass 61 day lanczos filter in r code? I want to run a 2–6 day bandpass 61 day lanczos filter on some environmental timeseries data in r I cant find a package for lanczos filtering, does anyone have any code that can help? Thanks!
https://stackoverflow.com/questions/79892893/2-6-day-bandpass-61-day-lanczos-filter-in-r-code
r, statistics, bandpass-filter, lanczos
1,771,588,892
se_79895557
stackoverflow
DATA_SCIENCE
Running repeated measures two-way ANOVA in R
Running repeated measures two-way ANOVA in R I'm trying to run a two-way repeated measures ANOVA in R, but I keep getting an error message that all of my data is NA even though it's not. Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases I've taken a subset of the data below as...
https://stackoverflow.com/questions/79895557/running-repeated-measures-two-way-anova-in-r
r, statistics, anova, rstatix
1,771,949,683
se_79896292
stackoverflow
DATA_SCIENCE
Averaging results for sound intensity
Averaging results for sound intensity I have 8 files all 13 minutes long for measuring sound intensity. I need to calculate the average every 5 seconds for each file, any idea how to do this in a fast or efficient manner? I have no idea what to do. Any advise is helpful - thank you.
https://stackoverflow.com/questions/79896292/averaging-results-for-sound-intensity
plot, statistics
1,772,029,690
se_95007
stackoverflow
DATA_SCIENCE
Explain the quantile() function in R
Explain the quantile() function in R I've been mystified by the R quantile function all day. I have an intuitive notion of how quantiles work, and an M.S. in stats, but boy oh boy, the documentation for it is confusing to me. From the docs: Q[i](p) = (1 - gamma) x[j] + gamma x[j+1], I'm with it so far. ...
https://stackoverflow.com/questions/95007/explain-the-quantile-function-in-r
math, r, statistics
1,221,760,759
se_7168342
stackoverflow
DATA_SCIENCE
Need resources for Statistical Natural Language Processing
Need resources for Statistical Natural Language Processing I'm writing a program in Java to parse natural language using probability and statistics. Are there any resources that explain Statistical Natural Language Processing techniques?
https://stackoverflow.com/questions/7168342/need-resources-for-statistical-natural-language-processing
java, statistics, nlp
1,314,138,786
se_15363076
stackoverflow
DATA_SCIENCE
Error in gzfile(file, &quot;wb&quot;): cannot open the connection or compressed file
Error in gzfile(file, &quot;wb&quot;): cannot open the connection or compressed file I'm trying to run two things: first, I'm creating a PDF with 4x5, ending with dev.off(), and then trying to create a new graph. However, after starting the second plot, I get: Error in gzfile(file, "wb") : cannot open the connection ...
https://stackoverflow.com/questions/15363076/error-in-gzfilefile-wb-cannot-open-the-connection-or-compressed-file
r, statistics, gzip
1,363,096,273
se_55113978
stackoverflow
DATA_SCIENCE
What is the difference between Freidman mse and mse?
What is the difference between Freidman mse and mse? I'm looking into a GradientBoostingClassifier in sklearn. Then, I found there are 3 kind of criterion. Friedman mse, mse, mae. the descriptions provided by sklearn are: The function to measure the quality of a split. Supported criteria are “friedman_mse” for the...
https://stackoverflow.com/questions/55113978/what-is-the-difference-between-freidman-mse-and-mse
scikit-learn, statistics
1,552,363,440
se_10404224
stackoverflow
DATA_SCIENCE
How to delete a row from a data.frame without losing the attributes
How to delete a row from a data.frame without losing the attributes for starters: I searched for hours on this problem by now - so if the answer should be trivial, please forgive me... What I want to do is delete a row (no. 101) from a data.frame. It contains test data and should not appear in my analyses. My problem...
https://stackoverflow.com/questions/10404224/how-to-delete-a-row-from-a-data-frame-without-losing-the-attributes
r, statistics
1,335,905,732
se_79558153
stackoverflow
DATA_SCIENCE
Python function for propagation of uncertainty (with covariance terms)
Python function for propagation of uncertainty (with covariance terms) I was wondering if there is a way to write a function with python that, automatically, propagate the uncertainties from n variables x_1,...,x_n to a function of these variables f=f(x_1,...,x_n,a_1,.., a_m), where a_1,..., a_m are parameters of f. L...
https://stackoverflow.com/questions/79558153/python-function-for-propagation-of-uncertainty-with-covariance-terms
python, statistics, uncertainty
1,743,939,891
se_79876270
stackoverflow
DATA_SCIENCE
Chaining calls to the only available hash function to &quot;increase&quot; the entropy
Chaining calls to the only available hash function to &quot;increase&quot; the entropy Let's say my platform / framework only allows me to use a single hash function ($toHashedIndexKey, for the reference, presumably truncated first 64-bits of standard 128-bit MD5 hash implementation). It creates 64-bit hashes. I inten...
https://stackoverflow.com/questions/79876270/chaining-calls-to-the-only-available-hash-function-to-increase-the-entropy
hash, statistics, cryptography, md5
1,769,424,443
se_77544559
stackoverflow
DATA_SCIENCE
Fast binom.test in R for multiple levels of confidence?
Fast binom.test in R for multiple levels of confidence? I have a dataset df which includes two variables: successes (x) and trials (n). I wish to obtain for every row in that dataset the stats::binom.test() results (est, lower and upper ci) for different levels of confidence. It should be able to handle n = NA or 0. I...
https://stackoverflow.com/questions/77544559/fast-binom-test-in-r-for-multiple-levels-of-confidence
r, statistics, vectorization, lapply
1,700,844,031
se_25140998
stackoverflow
DATA_SCIENCE
Pandas : compute mean or std (standard deviation) over entire dataframe
Pandas : compute mean or std (standard deviation) over entire dataframe Here is my problem, I have a dataframe like this : Depr_1 Depr_2 Depr_3 S3 0 5 9 S2 4 11 8 S1 6 11 12 S5 0 4 11 S4 4 8 8 and I just want to calculate the mean over the full dataframe, as the following doesn't work :...
https://stackoverflow.com/questions/25140998/pandas-compute-mean-or-std-standard-deviation-over-entire-dataframe
python, pandas, dataframe, numpy, statistics
1,407,248,063
se_79871467
stackoverflow
DATA_SCIENCE
Machine Learning: Fisher-Irwing test with multilabels
Machine Learning: Fisher-Irwing test with multilabels I’m implementing the Fisher–Irwin (Fisher’s exact) test for enrichment analysis, and I’ve run into an issue with composite labels that may bias my contingency tables. Some proteins in my dataset are annotated with combined functional labels (e.g., “assemblyinfectio...
https://stackoverflow.com/questions/79871467/machine-learning-fisher-irwing-test-with-multilabels
machine-learning, statistics, protein-database
1,768,852,600
se_55495097
stackoverflow
DATA_SCIENCE
Sorting List randomly by weights
Sorting List randomly by weights The idea is that i have a list of items with each item having a weight attached. Now i want to randomize the order of the list, but i also want to take the weight into account to "bias" the randomization process. There are multiple approaches for that, but i'm particulary interested i...
https://stackoverflow.com/questions/55495097/sorting-list-randomly-by-weights
c#, sorting, random, statistics, probability
1,554,294,143
se_60556798
stackoverflow
DATA_SCIENCE
What is the owner of all_tab_statistics in Oracle?
What is the owner of all_tab_statistics in Oracle? What is the owner/schema of all_tab_statistics in Oracle 11g. Also how the query will execute if we didnt mention any schemas before table name?
https://stackoverflow.com/questions/60556798/what-is-the-owner-of-all-tab-statistics-in-oracle
sql, oracle-database, oracle11g, statistics
1,583,462,201
se_79849965
stackoverflow
DATA_SCIENCE
How do I fix to my R GLMMadaptive hurdle beta model so as not to give me NaNs?
How do I fix to my R GLMMadaptive hurdle beta model so as not to give me NaNs? I just recently created an account. I am trying to create a glmm beta hurdle model based on parasite success of parasitoid wasps on r, I used the mixed_model function from the GLMMadaptive package. Here is what I have so far: parsucc_hrdl <...
https://stackoverflow.com/questions/79849965/how-do-i-fix-to-my-r-glmmadaptive-hurdle-beta-model-so-as-not-to-give-me-nans
r, statistics, glmm
1,766,024,478
se_79839128
stackoverflow
DATA_SCIENCE
How to handle heteroskedasticity when detecting anomalies using Z-scores on growth rates?
How to handle heteroskedasticity when detecting anomalies using Z-scores on growth rates? I’m trying to detect anomalies in a dataset using Z-scores based on the logged index change of a value between two time periods: VAL_t0 and VAL_t1. The issue: The variance of Z-scores decreases as VAL_t0 increases (see graph). Fo...
https://stackoverflow.com/questions/79839128/how-to-handle-heteroskedasticity-when-detecting-anomalies-using-z-scores-on-grow
r, statistics, data-analysis, outliers, anomaly-detection
1,764,953,068
se_79836598
stackoverflow
DATA_SCIENCE
multinom standard errors change when scaling variable
multinom standard errors change when scaling variable I have the following R code that performs a multinomial logistic regression. When scaling birthweight from grams (original data) to kg (more similar scale as other variables and easier interpretation) my standard errors change and with that the p-values and signifi...
https://stackoverflow.com/questions/79836598/multinom-standard-errors-change-when-scaling-variable
r, statistics, regression, p-value, nnet
1,764,745,157
se_79836615
stackoverflow
DATA_SCIENCE
JASP - covariate in LMM analysis
JASP - covariate in LMM analysis In Jasp, how to run a LMM with time and group factors, while controlling for a covariate? I tried, with time and group as fixed effects and a model that tests the time x group interaction. Then I added a variable as potential covariate with the fixed effects but this does not affect th...
https://stackoverflow.com/questions/79836615/jasp-covariate-in-lmm-analysis
statistics
1,764,746,449
se_24046396
stackoverflow
DATA_SCIENCE
Hyper-parameters of Gaussian Processes for Regression
Hyper-parameters of Gaussian Processes for Regression I know a Gaussian Process Regression model is mainly specified by its covariance matrix and the free hyper-parameters act as the 'weights'of the model. But could anyone explain what do the 2 hyper-parameters (length-scale & amplitude) in the covariance matrix repre...
https://stackoverflow.com/questions/24046396/hyper-parameters-of-gaussian-processes-for-regression
matlab, machine-learning, statistics, hyperparameters
1,401,911,675
se_79823768
stackoverflow
DATA_SCIENCE
Ranking formula for a frequency list
Ranking formula for a frequency list I'm trying to compile a list of the 5000 most common Simplified Chinese characters as found in modern fiction (books written from around 1920 onward). It should probably be mentioned that 5000 is a lot, because a modern Chinese novel, even a very long one, hardly ever contains more...
https://stackoverflow.com/questions/79823768/ranking-formula-for-a-frequency-list
statistics, frequency
1,763,494,862
se_79189107
stackoverflow
DATA_SCIENCE
How to calculate correlation between two distribution in Bayesian statistics?
How to calculate correlation between two distribution in Bayesian statistics? I am trying to calculate the correlation between two distributions (let's call them height and weight). I know how to calculate a simple Pearson correlation using a frequentist approach: calculate the covariance, calculate the covariance mat...
https://stackoverflow.com/questions/79189107/how-to-calculate-correlation-between-two-distribution-in-bayesian-statistics
python, statistics, bayesian, pymc
1,731,593,423
se_75734976
stackoverflow
DATA_SCIENCE
How to export my Kruskal wallace pairwise test to a table from R?
How to export my Kruskal wallace pairwise test to a table from R? I am trying to export my statistical results as a table from R. But because it is in a list format I can't change it to a dataframe to be exported. Here is a sample of my dataframe df = structure(list(Method_Group = c("Animal Borne + No Receiver", "Ani...
https://stackoverflow.com/questions/75734976/how-to-export-my-kruskal-wallace-pairwise-test-to-a-table-from-r
r, statistics, export-to-csv
1,678,806,608
se_79336182
stackoverflow
DATA_SCIENCE
Sample Size for A/B Test
Sample Size for A/B Test I want to test if a feature increases conversion. I want to detect a 5% increase, and my baseline is 80%. However, my code says that I need a sample size of 903 per group. Is there another method of sample calculation, perhaps for non-parametric tests, that can handle a smaller sample size? im...
https://stackoverflow.com/questions/79336182/sample-size-for-a-b-test
python, statistics, hypothesis-test
1,736,256,639
se_26431806
stackoverflow
DATA_SCIENCE
Non-Numeric Ttest?
Non-Numeric Ttest? What is a statistical test you can use to determine a relationship between two groups that are non-numeric (i.e. looking for the equivalent of a ttest for non-numeric data). Specifically, I am looking to compare data of plant growth. I want to compare the type of plant (non-numeric) to CO2 uptake ...
https://stackoverflow.com/questions/26431806/non-numeric-ttest
statistics
1,413,572,900
se_75164672
stackoverflow
DATA_SCIENCE
How to calculate effect size usisng statsmodels.stats.power
How to calculate effect size usisng statsmodels.stats.power I ran this code in python power_analysis = smp.TTestIndPower() power_analysis.solve_power( nobs1=143293, power=0.8, alpha=0.05, ratio=1.0*143398/143293, alternative='two-sided' ) The output is = 0.01046481401112...
https://stackoverflow.com/questions/75164672/how-to-calculate-effect-size-usisng-statsmodels-stats-power
statistics
1,674,071,974
se_79799946
stackoverflow
DATA_SCIENCE
I don&#39;t want some variable names to appear in the row column in expss
I don&#39;t want some variable names to appear in the row column in expss In the code below, I want to remove the "Miles/(US) gallon" text in the line. Because I'm already writing it as a column heading. I also don't want the "4/6/8" text to appear in the Total line. I only want the "Total" text to appear. library(exp...
https://stackoverflow.com/questions/79799946/i-dont-want-some-variable-names-to-appear-in-the-row-column-in-expss
r, statistics, expss
1,761,470,376
se_79778626
stackoverflow
DATA_SCIENCE
Via python IQR based outlier exclusion not consistently right, but not sure why? Code design error?
Via python IQR based outlier exclusion not consistently right, but not sure why? Code design error? Via python IQR based outlier exclusion not consistently right, but not sure why? Code design error? The script reads the Tachometer from a fan via a i2c based sensor, this sensor at times reports a bad speed result, an...
https://stackoverflow.com/questions/79778626/via-python-iqr-based-outlier-exclusion-not-consistently-right-but-not-sure-why
python, statistics
1,759,193,191
se_5316494
stackoverflow
DATA_SCIENCE
Is there a provider agnostic way of getting up to date cache statistics?
Is there a provider agnostic way of getting up to date cache statistics? Spring provides a useful feature of Cache Abstraction But what I could not find is a provider agnostic way to get live cache statistics. Essentially I just want to show a list of all the cache names and their corresponding keys with the count of ...
https://stackoverflow.com/questions/5316494/is-there-a-provider-agnostic-way-of-getting-up-to-date-cache-statistics
spring, caching, statistics, abstraction
1,300,214,895
se_58945209
stackoverflow
DATA_SCIENCE
Drawing a 5 cards with bias from Bernoulli distribution in python
Drawing a 5 cards with bias from Bernoulli distribution in python i need to implement 100 repetitions of drawing 5 Bernoulli random variable (5 cards)with bias 0.2 in python and plot the distribution. so far my implementation is for i in range(5): b= bernoulli.rvs(p=0.2,size=100) how ever Bernoulli.rvs ge...
https://stackoverflow.com/questions/58945209/drawing-a-5-cards-with-bias-from-bernoulli-distribution-in-python
python, statistics
1,574,212,472
se_19384532
stackoverflow
DATA_SCIENCE
Get statistics for each group (such as count, mean, etc) using pandas GroupBy?
Get statistics for each group (such as count, mean, etc) using pandas GroupBy? I have a dataframe df and I use several columns from it to groupby: df[['col1','col2','col3','col4']].groupby(['col1','col2']).mean() In the above way, I almost get the table (dataframe) that I need. What is missing is an additional column...
https://stackoverflow.com/questions/19384532/get-statistics-for-each-group-such-as-count-mean-etc-using-pandas-groupby
python, pandas, dataframe, group-by, statistics
1,381,849,212
se_14143813
stackoverflow
DATA_SCIENCE
Find out usage statistics of MySQL indices?
Find out usage statistics of MySQL indices? Is it possible to find out how often an index of a MySQL table was used? I have several indices for a table and I'd like to find out, if there are indice which are not used by MySQL.
https://stackoverflow.com/questions/14143813/find-out-usage-statistics-of-mysql-indices
mysql, indexing, statistics, usage-statistics
1,357,233,354
se_61247218
stackoverflow
DATA_SCIENCE
Generate all samples of given size with replacement in R
Generate all samples of given size with replacement in R I want to generate all samples of size n = 2, with replacement, from the following data and then print the sampling distribution of sample means. I want to know that is there any standard R library for this? This is what I have tried. library(graphics) data <-...
https://stackoverflow.com/questions/61247218/generate-all-samples-of-given-size-with-replacement-in-r
r, statistics, probability, distribution, sample
1,587,030,242
se_76031102
stackoverflow
DATA_SCIENCE
MonteCarlo Power Analysis: 3 -Level MSEM in MPLUS
MonteCarlo Power Analysis: 3 -Level MSEM in MPLUS I am running a MonteCarlo simulation for a 3-level 1-1-2 MSEM in MPLUS and I keep getting the following error code: *** ERROR in MONTECARLO command The total number of observations in the CSIZES option does not match the number of observations specified in NOBSERVATION...
https://stackoverflow.com/questions/76031102/montecarlo-power-analysis-3-level-msem-in-mplus
statistics, montecarlo
1,681,693,810
se_10852182
stackoverflow
DATA_SCIENCE
Shapiro Wilks in java
Shapiro Wilks in java I want to make a function that uses the Shapiro-Wilk test, but I'm not sure how I should go about using the Normal distribution to calculate the constant that is multiplied with the order statistic in the numerator. http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test Is there anyone who ca...
https://stackoverflow.com/questions/10852182/shapiro-wilks-in-java
java, algorithm, math, statistics, algebra
1,338,561,029
se_2547402
stackoverflow
DATA_SCIENCE
How to find the statistical mode?
How to find the statistical mode? In R, mean() and median() are standard functions which do what you'd expect. mode() tells you the internal storage mode of the object, not the value that occurs the most in its argument. But is there is a standard library function that implements the statistical mode for a vector (or...
https://stackoverflow.com/questions/2547402/how-to-find-the-statistical-mode
r, statistics, r-faq
1,269,971,707
se_66374503
stackoverflow
DATA_SCIENCE
Show languages with GitHub README.md stats
Show languages with GitHub README.md stats I'm trying to show used languages with GitHub README.md stats: ![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=myusername&theme=tokyonight) but private and public repositories are mostly C#, which is not shown:
https://stackoverflow.com/questions/66374503/show-languages-with-github-readme-md-stats
github, statistics, repository
1,614,278,208
se_23890478
stackoverflow
DATA_SCIENCE
Convert grayscale image to point cloud (similar to dither)
Convert grayscale image to point cloud (similar to dither) I'm currently trying to implement a method to generate TSP art, and for that I need a list of points (x,y), the local density of which is proportional to the gray scale pixel value of a given image. My first thought was: well that works pretty much like Inver...
https://stackoverflow.com/questions/23890478/convert-grayscale-image-to-point-cloud-similar-to-dither
matlab, image-processing, statistics, probability-density
1,401,196,498
se_63303592
stackoverflow
DATA_SCIENCE
Renewal Function for Weibull Distribution
Renewal Function for Weibull Distribution The renewal function for Weibull distribution m(t) with t = 10 is given as below. I want to find the value of m(t). I wrote the following r code to compute m(t) last_term = NULL gamma_k = NULL n = 50 for(k in 1:n){ gamma_k[k] = gamma(2*k + 1)/factorial(k) } for(j in 1: (n-1...
https://stackoverflow.com/questions/63303592/renewal-function-for-weibull-distribution
r, statistics, distribution, weibull, gamma-function
1,596,809,648
se_79746323
stackoverflow
DATA_SCIENCE
Polars Rolling_mean negative values
Polars Rolling_mean negative values Daily variation analysis in Polars: Rolling std for negative values only The situation Hi there, I have a Polars DataFrame with columns like ['Date','category','number'], already grouped. This DataFrame contains almost all dates for 7 months (close to 25 million rows). I want to per...
https://stackoverflow.com/questions/79746323/polars-rolling-mean-negative-values
python, statistics, python-polars
1,756,170,234
se_40354541
stackoverflow
DATA_SCIENCE
Why &#39;face_img-mean_face&#39; in eigenfaces Face Recognition?
Why &#39;face_img-mean_face&#39; in eigenfaces Face Recognition? What is the purpose of 'face difference' that obtained by subtracting the face image with the mean image?
https://stackoverflow.com/questions/40354541/why-face-img-mean-face-in-eigenfaces-face-recognition
statistics, computer-vision, pca, face-recognition, eigenvector
1,477,977,874
se_79742643
stackoverflow
DATA_SCIENCE
I can&#39;t get the coverage graph for the Wald interval. It only shows the outlines of 99% CI but not the coverage that wald has
I can&#39;t get the coverage graph for the Wald interval. It only shows the outlines of 99% CI but not the coverage that wald has wald = function(x, n, conf.level = 0.99){ p = x/n sd <- sqrt(p*((1-p)/n)) z = 2.576 ci <- p + z*sd return(ci) } numSamples <- 10000 numTrials <- 10 probs <- seq(0.2, 0.4, 0.8) ...
https://stackoverflow.com/questions/79742643/i-cant-get-the-coverage-graph-for-the-wald-interval-it-only-shows-the-outlines
r, statistics, confidence-interval, computation
1,755,799,404
se_59869759
stackoverflow
DATA_SCIENCE
log-likelihood function generated by scipy.stats.rv_continuous.fit
log-likelihood function generated by scipy.stats.rv_continuous.fit The method scipy.stats.rv_continuous.fit finds the parameters that maximise a log likelihood function which is determined by the input data and the specification of the distribution rv_continuous. For instance, this could be normal or gamma. The docum...
https://stackoverflow.com/questions/59869759/log-likelihood-function-generated-by-scipy-stats-rv-continuous-fit
python, scipy, statistics
1,579,736,466
se_79705869
stackoverflow
DATA_SCIENCE
PostgreSQL solution to work easier on a specific row with multiple columns
PostgreSQL solution to work easier on a specific row with multiple columns I have a table where I want to do some statistics on each rows different columns. For example: id NW2020 NW2021 NW2022 NW2023 NW2024 CA2020 ... 1 -299 4000 21 -325 2544 55 2 54 244 -5 -54 325 874 How can I have a table with the fr...
https://stackoverflow.com/questions/79705869/postgresql-solution-to-work-easier-on-a-specific-row-with-multiple-columns
sql, postgresql, statistics
1,752,825,917
se_79693109
stackoverflow
DATA_SCIENCE
In &quot;statsmodels&quot; Python library, why does z-test not require Population standard deviation?
In &quot;statsmodels&quot; Python library, why does z-test not require Population standard deviation? So to execute a z-test in python, I have seen people doing: from statsmodels.stats.weightstats import ztest as ztest # IQ levels of 20 patients post medication data = [88, 92, 94, 94, 96, 97, 97, 97, 99, 99, ...
https://stackoverflow.com/questions/79693109/in-statsmodels-python-library-why-does-z-test-not-require-population-standard
python, statistics, data-science, statsmodels
1,751,903,158
se_9431914
stackoverflow
DATA_SCIENCE
Gaussian random distribution in Postgresql
Gaussian random distribution in Postgresql I have a table of let's say 250 URLs : create table url ( id serial, url varchar(64) ) These URLs correspond each to a website. Each of the websites have a different popularity. Let's say that the id=125 (the one centered on the gaussian) is the most popular, the ones ...
https://stackoverflow.com/questions/9431914/gaussian-random-distribution-in-postgresql
postgresql, random, statistics, gaussian
1,330,091,757
se_79730167
stackoverflow
DATA_SCIENCE
Ellipse.contains_points() in Matplotlib is not working as expected
Ellipse.contains_points() in Matplotlib is not working as expected I am using a slightly modified version of the confidence_ellipse() function given in this example on the Matplotlib documentation. The only difference is I am returning the ellipse variable itself rather than "return ax.add_patch(ellipse)". I generated...
https://stackoverflow.com/questions/79730167/ellipse-contains-points-in-matplotlib-is-not-working-as-expected
python, matplotlib, statistics, confidence-interval, ellipse
1,754,680,976
se_59832900
stackoverflow
DATA_SCIENCE
Formula for Google Charts histogram
Formula for Google Charts histogram What formula does Google Charts construct histograms with? (Sturge's rule? Doane's rule? Scott's rule? etc.) Is there any documentation on how it constructs it default bin size, min, and max? The Histogram page for Google Charts: Google Charts automatically chooses the number of bi...
https://stackoverflow.com/questions/59832900/formula-for-google-charts-histogram
charts, statistics, google-visualization, histogram, binning
1,579,569,102
se_67107528
stackoverflow
DATA_SCIENCE
dgamma function R speed
dgamma function R speed I am trying to use the dgamma function in R to obtain values of the gamma density function across a matrix of values. Because my values are usually quite small, I am also required to do this process in log space to avoid underflow within the function. Eg: values = matrix(data = seq(1:9),nrow = ...
https://stackoverflow.com/questions/67107528/dgamma-function-r-speed
r, optimization, statistics, gamma-distribution
1,618,485,745
se_73522670
stackoverflow
DATA_SCIENCE
Manually get the responses from GLM with gamma distribution and a GLM with inverse guassian distribution
Manually get the responses from GLM with gamma distribution and a GLM with inverse guassian distribution I've been trying to manually get the response values given by the predict.glm function from the stats package in R. However, I'm unable to do so. I only know how to manually get the value with a binomial distributi...
https://stackoverflow.com/questions/73522670/manually-get-the-responses-from-glm-with-gamma-distribution-and-a-glm-with-inver
r, statistics, glm, gaussian, gamma-distribution
1,661,725,210
se_16226311
stackoverflow
DATA_SCIENCE
Benford&#39;s Law in Excel
Benford&#39;s Law in Excel I have a large data set, and I was hoping to test it against Benford's Law. So far, I have been extracting the first digit, and creating a chart based on that =LEFT(A1,1)*1 I multiply the formula by 1 because LEFT turns the digit into a string. I was hoping to automate this procedure. I...
https://stackoverflow.com/questions/16226311/benfords-law-in-excel
excel, distribution, statistics, benfords-law, vba
1,366,932,175
se_74995800
stackoverflow
DATA_SCIENCE
Scaling a GEV distribution for precipitation data by specifying a covariate-dependent exponential function for location and scale parameters
Scaling a GEV distribution for precipitation data by specifying a covariate-dependent exponential function for location and scale parameters Background: I am conducting a Climate Attribution study for which am applying the methods proposed in the protocol published by Philip et al. (2020). The data I am working with i...
https://stackoverflow.com/questions/74995800/scaling-a-gev-distribution-for-precipitation-data-by-specifying-a-covariate-depe
python, statistics
1,672,762,100
se_79701003
stackoverflow
DATA_SCIENCE
Generating blue noise with values sampled from a log normal distribution
Generating blue noise with values sampled from a log normal distribution Aim I am trying to generate random signals with the following two properties: The values should be approximately log-normally distributed (any long-tailed distribution bounded form below with non-zero mode would do). The power spectral density ...
https://stackoverflow.com/questions/79701003/generating-blue-noise-with-values-sampled-from-a-log-normal-distribution
python, numpy, scipy, statistics, signal-processing
1,752,501,724
se_79701578
stackoverflow
DATA_SCIENCE
Getting an actual boundary equation of LDA with two classes and two variables
Getting an actual boundary equation of LDA with two classes and two variables I have a two-dimensional data plot that shows the sexual morphological difference of some insect species like this: data plot. My purpose is to obtain an estimated boundary of the linear discrimination analysis (LDA), which will be re-used e...
https://stackoverflow.com/questions/79701578/getting-an-actual-boundary-equation-of-lda-with-two-classes-and-two-variables
r, statistics, equation, lda
1,752,556,099
se_67261721
stackoverflow
DATA_SCIENCE
Inspect statistics of queries to a table
Inspect statistics of queries to a table I would like to find out which queries are made to a table most often. Where these statistics are stored in SQL Server?
https://stackoverflow.com/questions/67261721/inspect-statistics-of-queries-to-a-table
sql-server, statistics, database-administration
1,619,418,081
se_79696762
stackoverflow
DATA_SCIENCE
Seaborn histogram to plot survey answer frequency by gender
Seaborn histogram to plot survey answer frequency by gender I have some survey question answers (letters A, B, C) I'd like to plot in a Seaborn histogram, with the frequency of each response letter grouped by gender. import pandas as pd answers = ['A', 'B', 'A', 'B', 'A', 'A', 'B', 'B', 'B', 'A', 'C', 'B', 'A', 'C'] g...
https://stackoverflow.com/questions/79696762/seaborn-histogram-to-plot-survey-answer-frequency-by-gender
python, statistics, seaborn, histogram
1,752,137,256
se_78457952
stackoverflow
DATA_SCIENCE
Equivalent of Stata&#39;s Prob &gt; chi2 in Python
Equivalent of Stata&#39;s Prob &gt; chi2 in Python I did a logistic regression analysis in Stata using the command logit and got a Prob>chi2 value, which I didn't get in Python logistic regression summary using [Logit][https://www.statsmodels.org/stable/generated/statsmodels.discrete.discrete_model.Logit.html] comman...
https://stackoverflow.com/questions/78457952/equivalent-of-statas-prob-chi2-in-python
python, statistics, stata, logistic-regression
1,715,314,467
se_6166546
stackoverflow
DATA_SCIENCE
Sorting algorithms for data of known statistical distribution?
Sorting algorithms for data of known statistical distribution? It just occurred to me, if you know something about the distribution (in the statistical sense) of the data to sort, the performance of a sorting algorithm might benefit if you take that information into account. So my question is, are there any sorting al...
https://stackoverflow.com/questions/6166546/sorting-algorithms-for-data-of-known-statistical-distribution
algorithm, performance, sorting, statistics, complexity-theory
1,306,655,187
se_75545944
stackoverflow
DATA_SCIENCE
Efficient algorithm for online Variance update over batched data / color channels
Efficient algorithm for online Variance update over batched data / color channels I have a large amount of multi-demensional data (images) and want to calculate the variance of an axis (color channel) across all of them. Memory wise I cannot create a large array to calculate the variance in one step. I therefore need ...
https://stackoverflow.com/questions/75545944/efficient-algorithm-for-online-variance-update-over-batched-data-color-channel
python, math, statistics, variance, online-algorithm
1,677,161,426
se_79660768
stackoverflow
DATA_SCIENCE
Why sigma clipping need iterations?
Why sigma clipping need iterations? If I only want the high-SNR data, I do sigma-clipping to an array. As this link says Suppose you have a set of data. Compute its median m and its standard deviation sigma. Keep only the data that falls in the range (m-a*sigma,m+a*sigma) for some value of a, and discard everything el...
https://stackoverflow.com/questions/79660768/why-sigma-clipping-need-iterations
python, numpy, statistics
1,749,570,438
se_16200039
stackoverflow
DATA_SCIENCE
parametric method Autoregression moving average(ARMA) to AR process
parametric method Autoregression moving average(ARMA) to AR process i want to know how to convert ARMA (Autoregression moving average) process to AR(Autoregression) process by PARAMETRIC METHOD. i.e. i have a transfer function H(z) = (a + b*z)/(c +d*z) e.g. H(z) = (0.26 + 0.073*z^-1)/(1 - z^-1) i.e. Autoregression(AR...
https://stackoverflow.com/questions/16200039/parametric-method-autoregression-moving-averagearma-to-ar-process
matlab, statistics, time-series, statsmodels, arima
1,366,829,864
se_79660716
stackoverflow
DATA_SCIENCE
How to get SQL WEEK() to start on 1st of Jan every year, produce a full 7 days and be able to groupby it
How to get SQL WEEK() to start on 1st of Jan every year, produce a full 7 days and be able to groupby it I'm trying to write a query to produce weekly sales totals over the years to produce a comparison on a graph. Trouble is, I've now discovered that week 0 or 1 (for example) doesn't necessarily start on the 1st of J...
https://stackoverflow.com/questions/79660716/how-to-get-sql-week-to-start-on-1st-of-jan-every-year-produce-a-full-7-days-a
sql, mysql, statistics
1,749,568,582
se_66386091
stackoverflow
DATA_SCIENCE
Kendall&#39;s plot, copula dependence measure, Matlab, R
Kendall&#39;s plot, copula dependence measure, Matlab, R I want to write a code to plot Kendall's plot. This piece is written in R n=nrow(X) i=rep(1:n,each=n) j=rep(1:n,n) S=((X[i,1]>X[j,1])&(X[i,2]>X[j,2])) Z=tapply(S,i,sum)/(n-1) I wrote this code in Matlab: y=[y1,y2] k=1; for i=1:10; for j=1:10; idx_2=...
https://stackoverflow.com/questions/66386091/kendalls-plot-copula-dependence-measure-matlab-r
r, statistics
1,614,343,655
se_79656127
stackoverflow
DATA_SCIENCE
Issues with R gawdis function. Getting Error in names(w3) &lt;- dimnames(x)[[2]] : &#39;names&#39; attribute [8] must be the same length as the vector [5]
Issues with R gawdis function. Getting Error in names(w3) &lt;- dimnames(x)[[2]] : &#39;names&#39; attribute [8] must be the same length as the vector [5] I'm doing an assignment for an Ecology course for my master's degree. The instructions are as follows: Using the dataset "tussock" from the FD package seen in the ...
https://stackoverflow.com/questions/79656127/issues-with-r-gawdis-function-getting-error-in-namesw3-dimnamesx2
r, statistics, bioinformatics
1,749,222,868
se_78810287
stackoverflow
DATA_SCIENCE
Extract scores from EFA by observation to uses as predictor variable
Extract scores from EFA by observation to uses as predictor variable I am working on an EFA (Exploratory Factor Analysis) using the psych package. I would like to extract the scores from the result of this EFA at the observation level, so I can use them as an independent variable in a subsequent GLM (Generalized Linea...
https://stackoverflow.com/questions/78810287/extract-scores-from-efa-by-observation-to-uses-as-predictor-variable
r, statistics, psych
1,722,324,324
se_79179193
stackoverflow
DATA_SCIENCE
Calculating the correlation coefficient of time series data of unqual length
Calculating the correlation coefficient of time series data of unqual length Suppose you have a dataframe like this data = {'site': ['A', 'A', 'B', 'B', 'C', 'C'], 'item': ['x', 'x', 'x', 'x', 'x', 'x'], 'date': ['2023-03-01', '2023-03-10', '2023-03-20', '2023-03-27', '2023-03-5', '2023-03-12'], ...
https://stackoverflow.com/questions/79179193/calculating-the-correlation-coefficient-of-time-series-data-of-unqual-length
python, pandas, statistics
1,731,360,609
se_61847129
stackoverflow
DATA_SCIENCE
Interpreting zero-inflated regression summary
Interpreting zero-inflated regression summary The output of the zeroinfl regression from pscl provides a list of coefficients under "count model coefficients" as well as a list of coefficients under "zero-inflation model coefficients." Given the interest is to follow the z inflated model, what is the utility of the c...
https://stackoverflow.com/questions/61847129/interpreting-zero-inflated-regression-summary
r, statistics, regression
1,589,691,010
se_79648409
stackoverflow
DATA_SCIENCE
How to bootstrap confidence intervals for predicted probabilities of a glm?
How to bootstrap confidence intervals for predicted probabilities of a glm? I am following the Maturity Schedules fishR Vignette by Dr Derek Ogle (https://derekogle.com/fishR/examples/oldFishRVignettes/Maturity.pdf) to generate stock assessments. Following the code and changing it to match my data frames has been goin...
https://stackoverflow.com/questions/79648409/how-to-bootstrap-confidence-intervals-for-predicted-probabilities-of-a-glm
r, statistics, apply, predict, confidence-interval
1,748,853,237