254 questions
Best practices
0
votes
2
replies
85
views
PERMANOVA sample size limitations
I am trying to test for vocal differences between 5 individuals with sample sizes 102, 86, 115, 45, 12. My initial plan was to use PERMANOVA, but I am concerned about the sample size limitations and ...
Advice
0
votes
1
replies
55
views
Check assumptions of mixed effects cox model
I am running a mixed effects cox model using coxme in R, and I cannot find any information on how to check model assumptions for this type of model. I have seen the older chats, which have recommended ...
1
vote
1
answer
92
views
Testing equality of multivariate coefficients with linearHypothesis()
I would like to conduct a F-test (Wilks' Lambda test, ideally) to test the equality of the slope coefficients for a single independent variable on two dependent variables. Using the mtcars dataset, ...
0
votes
1
answer
105
views
Stepdown analysis of multivariate models in R
Roy - Bargmann stepdown tests are commonly recommended for multivariate linear models (MANOVA, MMRA) fit with lm() as:
lm(cbind(y1, y2, y3, ...) ~ x1 + x2 + x3 + ...)
But I can't find any ...
1
vote
1
answer
62
views
is it posible to fit a multivariate linear model using lmtree?
I want to fit a lmtree where the response is multivariable. You know that you can fit a Multivariate Multiple Regression using lm function as follows:
lm(cbind(Y1, Y2) ~ X1+X2+X3, data = my_df)
so I ...
1
vote
1
answer
72
views
Need help using "reframe" to run multivariate regression across multiple data sets (changing model from one year to multiple years)
I have a simple multivariate regression model testing the impact of two variables on another over one year (1971). I have a large data set that includes these data over a number of years and am being ...
1
vote
1
answer
193
views
Optimizing variable applied to discrete data in order to minimize error function
I'm trying to optimize a function based on discrete data sets I got in the lab.
Spectrum_1 and Spectrum_2 are experimental data sets with length N. Those two arrays contain values taken for each ...
0
votes
0
answers
44
views
Creating a vector of in which Mardia's b1p can be saved
i want to create a vector that have 'q0' rows and 1 column with N repetitions.
My minimum working example is:
library(Matrix)
library(psych)
library(MASS)
set.seed(10)
N0 <- 2
n0 <- 5
p0 <- ...
0
votes
1
answer
669
views
Multivariate Linear Mixed Model
I want to make a multivariate linear mixed model with the variables slope_reactivity, peak_reactivity, and slope_recovery as dependent variables and normalized_CTseverity, gender, age_years and ...
2
votes
1
answer
52
views
Want to create a vector in which multivariate skewness of the four multivariate normal populations can be stored
Minimum Working example:
library(Matrix)
library(psych)
library(MASS)
set.seed(10)
N0 <- 1
n0 <- 5
p0 <- 2
q0 <- 4
n <- n0*q0
m2 <- matrix(c(0, 0), p0, 1)
s2 <- matrix(c(1, 0, 0,...
0
votes
1
answer
88
views
How to save Mardia's coefficient of skewness in a vector when the data is divided into 4 parts
Minimum Working Example:
##############################################################################
set.seed(10)
##############################################################################
...
0
votes
1
answer
203
views
Coefplot.gllvm shows different plots per categorical factor level rather than each factor
I'm not well versed in R but am using the GLLVM package to assess the influence of season and water mass on plankton distribution - when I try to make the coefficient plots using coeffplot.gllvm() I ...
0
votes
1
answer
80
views
Stepwise Multivariate Linear Regression in RStudio Stalling
My data has 6 independent variables and 5 dependent variables, and I am running stepwise multivariate linear regressions on them. My code removes any independent variables with p-values > 0.05 in ...
1
vote
1
answer
256
views
Multivariate regression tree with "mvpart" (in R) and plots for each leaf of the tree visualization
I want to perform an MVRT to understand how some abiotic factors affect the cover percentage of different benthic species. So, I used the 'mvpart' package in R version 3.2.5, as it is not possible to ...
1
vote
1
answer
78
views
mvabund fourth corner model using categorical environmental levels
Within mvabund::traitglm() is it appropriate to use a categorical R matrix rather than continuous environmental variables? I am interested in the effect of the interaction between MHW period (before, ...
0
votes
1
answer
247
views
manyglm (package mvabund) giving error when using family = Gamma(link = log)
I am trying to test if my three experimental factors (see example_data1.csv) affect a multivariate dataset (5 variables measured on the same experimental unit, see example_data2.csv), using the ...
-1
votes
1
answer
122
views
What is the ellipse’s centroid written as a numerical vector?
I used proc corr to find pearson and plot scatter with ellipses of 70% and 90%. to finde ellipses's centroid is it the mean value of variables that were use in this process?
i tried proc corr in sas ...
1
vote
1
answer
1k
views
Does PERMANOVA analysis (specifically adonis2 in the vegan package) allow for nested terms?
I am trying to run a PERMANOVA analysis on the bray-cutis dissimilarities between my samples, but I need to nest sample days within time of day. I read that the "strata" function in adonis2 ...
0
votes
1
answer
953
views
PERMANOVA - unbalanced design
I am new to statistical analysis and R. I have data of relative abundance (in percentage) of 5 taxa in 8 ponds. The number of samples in the 8 ponds ranges from 7 to 12 (making the design unbalanced). ...
0
votes
1
answer
99
views
Trouble adding a baseline to the mult.chart function in MSQC package (R) - any suggestions?
I need help with the mult.chart function from package MSQC in R. I searched and tried to add a baseline to the chart, but I was not able to do it.
Here is what I am trying to do:
library(MSQC)
...
0
votes
0
answers
324
views
Multivariate linear hypothesis testing using statsmodels in Python
I am trying to run a multivariate regression model using statsmodels, but there appears to be no implementation of that yet, so in the meantime, what I did was to run a manova model on the data like ...
1
vote
1
answer
527
views
iminuit high-dimension multivariate fit problem
I would like to perform multivariate fit using iminuit. Everything works fine when I use two dimensions but I get an 'ValueError: too many values to unpack (expected 2)' if I use more than two ...
1
vote
0
answers
551
views
Plotting a distance matrix according to another distance matrix
So I have 50 samples, for which I have data on the chemical composition, and the spatial coordinates.
With those, I created a Bray-Curtis dissimilarity matrix of the chemical similarity between ...
1
vote
0
answers
168
views
Python Packages for Multivariate (>1 DEPENDENT variables) Regression without Neural Networks?
I cannot find a python package that handles Multivariate Regression, and the internet is full of people who have confused the search by interchanging "Multivariate" (many DEPENDENT variables)...
0
votes
2
answers
2k
views
Multiple Linear Regression Models with Bonferroni corrected p-values
Please see my sample data below:
dad <- data.frame(type = c("new", "new", "old", "new", "old", "new", "old", "old", &...
0
votes
1
answer
795
views
RDA triplot in R- plot only numeric explanatory variables as arrows; factors as centroids
I ran a distance-based RDA using capscale() in the vegan library in R and I am trying to plot my results as a custom triplot. I only want numeric or continuous explanatory variables to be plotted as ...
1
vote
1
answer
455
views
How can I change the colour of my points on my db-RDA triplot in R?
QUESTION: I am building a triplot for the results of my distance-based RDA in R, library(vegan). I can get a triplot to build, but can't figure out how to make the colours of my sites different based ...
5
votes
2
answers
432
views
How to create a boxplot for multiple dependent variables from the WeightLoss dataset?
I'm trying to make a boxplot from the WeightLoss dataset from the car package. The variables of interest are separated by month, so I made boxplots by month separately, with all the groups (Control, ...
0
votes
0
answers
27
views
How can I model multiple numerical variables using a mixture of numerical and non-numerical predictors?
I have a dataset that looks like this:
product_name
brand
price_change_percentage
release_year
Toy X
X
20
2001
Toy Y
Y
-12
2020
I would like to use Tensorflow to predict price_change_percentage based ...
1
vote
0
answers
140
views
Can `mvabund::traitglm()` handle random effects?
I am using the R package mvabund to examine how environmental conditions and species traits are correlated with ecological community structure. The traitglm() function is a nice tool for this. However,...
0
votes
0
answers
71
views
t-SNE visualization getting (Error in UseMethod("mutate") : no applicable method for 'mutate' applied to an object of class "factor")
I'm new to R and I'm trying to do a PAM clustering analysis and visualize the results via t-SNE. However, I keep getting this error Error in UseMethod("mutate") : no applicable method for '...
0
votes
0
answers
154
views
Improving multivariate regression model in R
I recently conducted a survey within an IT company concering user satisfaction with a specific data management solution. There was one question about the overall satisfaction (dependend variable for ...
0
votes
2
answers
1k
views
Why I having problem on assigning data for NMDS in R?
I want learn Non-matric multidimensional scale, I have these data downloaded from https://cougrstats.wordpress.com/2019/12/11/non-metric-multidimensional-scaling-nmds-in-r/
data are
library(vegan)
...
1
vote
1
answer
144
views
Multiple Outcome Binomial Regression R
It is possible to use cbind to specify multiple outcomes for plain lm regressions as such:
set.seed(11)
df <- iris %>%
mutate(var1 = sample(c(0L,1L), 150, replace = TRUE),
var2 = ...
0
votes
0
answers
128
views
Testing that an individual species in a matrix has a significant impact on the entire assemblage
I feel like this is kind of an elementary question but w/all my reading in and around the subject I have yet to arrive at a conclusive answer.
I'm testing an ecological (site*species) data set as part ...
1
vote
0
answers
559
views
How to calculate the KL divergence for two multivariate pandas dataframes
I am training a Gaussian-Process model iteratively. In each iteration, a new sample is added to the training dataset (Pandas DataFrame), and the model is re-trained and evaluated. Each row of the ...
0
votes
0
answers
158
views
Estimating Treatment Effect and robust standard errors after propensity score matching with two continuous outcomes
I am trying to estimate Treatment Effects and robust standard errors after propensity score matching with two continuous outcomes following this guide: https://cran.r-project.org/web/packages/MatchIt/...
1
vote
1
answer
278
views
3D best fitting shape with graphic and equation (Python) (Maybe DSP)
I need help showing the shape or plane that best fits these coordinates in 3D. I have already found the plane of best fit using least squares method on python. Now I want to see if there is a more ...
1
vote
1
answer
85
views
Removing outliers in various columns without creating NAs in the whole row
I am trying to remove the outliers from various variables at the same time in my dataset but with the function used it seems that when it finds one outlier it turns the whole row into NA.
That´s a ...
2
votes
1
answer
158
views
How to generate two sets of distinct points on a sphere in julia language?
I need to apply the PCA at different points of a spherical cap, but I don’t know how to build these sets of different points, I need at least 2 sets.
Here is a picture with the idea of what I need.
...
3
votes
1
answer
643
views
Error/warning on running glm in R - Coefficients: (1 not defined because of singularities)
When I run this glm on model_df (dput below):
model <- glm(outcome_variable_data ~ ., data = model_df, family = 'binomial')
lrm <- summary(model)
When I print lrm, I get the error:
Coefficients: ...
1
vote
0
answers
220
views
How to validate and train a multivariate multiple regression modeling multiple responses?
I would like to validate the accuracy of my Multivariate Multiple Regression model (MMR) and train.
For this MMR I have used four dependent variables (y1, y2, y3, y4) and two independent variables (x1 ...
0
votes
1
answer
146
views
How to create a matrix with for loop using qgcomp() in R
I always use a for loop to create a matrix of linear and logistic regression output, but I am having difficulty doing so with qgcomp(). If anyone has experience or advice, I would greatly appreciate ...
0
votes
1
answer
3k
views
simulated annealing in python with multiple variables
I found this old stackoverflow article that essentially is exactly what I want.
Algorithm to optimize multiple variables more efficiently than trial-and-error
unforunately my more advanced maths are a ...
2
votes
1
answer
489
views
Cannot manually reproduce CCA loadings
For my current project I am using sklearn.cross_decomposition.CCA. In several references (such as 1, 2 and 3) it is stated that canonical loadings can be computed as correlations between variables and ...
0
votes
0
answers
85
views
Ran a MANOVA where Pillai's/Wilks isn't significant, but one of the DVs is very significant in my output table of between-subjects effects
I'm a stats newb and was told by my professor to run a MANOVA for something I was checking out. Basically, I wanted to see if there was an interaction between ethnicity and a certain quadrant grouping ...
0
votes
1
answer
1k
views
How do I create a publication Table for multivariate multiple regression models (multiple dependent variables)?
I ran some multivariate multiple regression models by combining the multiple dependent variables with cbind() in lm():
dv1 <- rnorm(15)
dv2 <- rnorm(15)
dv3 <- rnorm(15)
iv1 <- rnorm(15)
...
0
votes
0
answers
178
views
Multi-class Multivariate Probability in Tensorflow
I'm trying to build a multivariate normal distribution from my multiclass problem.
Lets suppose we have c*N*x data where c is number of classes (>2), N is samples number for class c and x is number ...
1
vote
1
answer
2k
views
R: testing whether a coefficient is equal across the different equations in a multivariate regression (using linearhypothesis())?
I have a question about how to compare coefficients in a multivariate regression in R.
I conducted a survey in which I measured three different attitudes (scale variables). My goal is to estimate ...
0
votes
0
answers
189
views
How to find outliers in multivariate data with weak covariance
I have used PCA and Mahalanobis distance to find outliers. But in both cases, only the highest or lowest values are detected as outliers. I am looking for a way that any data point that does not ...