Questions tagged [r]

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Understanding the Binomial Component of the Zero-Inflation Model and Why zeroinfl in R Returns NA for features in the Summary

I am trying to apply a Zero-Inflated Negative Binomial model to a dataset in R using the zeroinfl() function from the pscl ...
user avatar
  • 217
1 vote
0 answers
4 views

Structural or sensitivity analysis of multivariate time series with multiple subjects

Sorry if this isn't explained in the best way. I have very basic knowledge of time series analysis so my question may sound very simplistic or might be missing the big picture of this type of analysis....
user avatar
0 votes
0 answers
2 views

How to get betamultiplier to work for MaxEnt Variable Selection?

I've been using the package MaxEnt Variable Selection in r, and need to set a betamultipler for the variable selection process. I've scoured online to see if I'm missing a package or if there is an ...
user avatar
3 votes
2 answers
40 views

Interpreting interaction effects for categorical reference group in regression

I am running a regression model in R including the following variables: Intent = continuous DV Attitude = continuous IV Story = categorical IV in 4 levels: Consumer, Heritage, Vision and Product ...
user avatar
0 votes
0 answers
9 views

How to obtain residuals of ADF test in R? [closed]

I was running an ADF test for normality in R and want to check whether residuals are corelated or not. How to extract the residuals of the ADF test in R?
user avatar
0 votes
0 answers
10 views

How to determine how much variation was due to the differences between a group?

I am working on the data set that consists of Patients (after stroke), Time (then can walk after a going through the program), and Program they follow. ...
user avatar
1 vote
1 answer
19 views

Anova shows a main effect but not the t-test

I run an ANOVA which indicates that a variable is significant, but running a t-test on the same variable shows no significance. Is this a consistent result ? Here are more details of what I did: My ...
user avatar
  • 11
0 votes
0 answers
5 views

Calculate sample size for multiple treatments vs control, given the proportion mix of treatments

I want to know what my sample sizes should be for each of my treatments and control, given a proportion mix between the groups. For example, let’s say I have 3 treatments (A, B, C) and 1 control (D). ...
user avatar
0 votes
0 answers
11 views

Difference between the siginificance in the summary table and the ANOVA table in R [duplicate]

In R when I am evaluating a linear model I have created, I often use the summary table and the ANOVA table. The first image below is the output from my summary table, the image below that is the ...
user avatar
0 votes
0 answers
9 views

What kind of analysis can I extract from bayes glm output?

I have 40 files (40 variables) that start like this from a bayes glm model output as csv files. I am a total beginner at model evaluation. ...
user avatar
0 votes
1 answer
14 views

SE Interpretation

Can you help me to interpret the following standard deviation? It is a linear regression problem, I need to predict Rent which depends on the size of an Apartment. Rent=23.411+13.806. The question is ...
user avatar
  • 1
0 votes
0 answers
7 views

Help me understand data output from R bayes glm model

I have been given a bunch of csv files which are ouputs of a bayesian glm model run. I have minimal understanding on machine learning, so apologies beforehand. I'd like to understand what the ...
user avatar
0 votes
0 answers
16 views

Centering and scaling in Partial Least Squares

I am trying to understand, how data is centered and scaled in Partial Least Squares (PLS). I understand how it is done in Principal Component analysis (PCA). For example, in PCA test-data is centered ...
user avatar
  • 31
0 votes
0 answers
6 views

How to handle missing data when calculating network homophily/assortativity?

I am trying to calculate network homophily/assortativity for a graph. However, some of my nodes have missing values. It turns out igraph's assortativity functions have no "na.rm" function ...
user avatar
  • 309
0 votes
0 answers
14 views

Arima model always predicts the same value in python implementation, R's Auto Arima however gives me a well function model. How to replicate?

I have a series that looks like . (https://gyazo.com/8a460fed032c8989b93cf26d8820e431) It shows very strong auto correlation ![AC] (https://gyazo.com/4acd9b9bd32c70509bde1b8b874d6e33). I have ...
user avatar
0 votes
0 answers
6 views

The 'R2jags::autojags()' Function Doesn't Converge

I'm running the following code in R: ...
user avatar
0 votes
1 answer
31 views

pointwise envelopes not including Theoretical line Foxall J

I am computing pointwise envelopes for the Foxall's J function to investigate the whether some point patterns of interest are clustered, avoid or are independent from other point patterns or polygons. ...
user avatar
  • 245
0 votes
0 answers
46 views

Alternatives to linear model regression

Let's say I have a univariate linear regression model LMR in which ...
user avatar
0 votes
0 answers
15 views

Partial effect of numerical variable for a fixed level of categorical variable in regression

I have a regression model (in R) as follows: lm(price ~ time + color + brand) where, price be the second hand price of sth (numerical), time be number of years ...
user avatar
0 votes
0 answers
9 views

MANOVA invalid type (list) for variable R studio [closed]

I have dataframe contain 600 columns and 50 row and i want to perrform MANOVA i tried the following code ...
user avatar
  • 101
0 votes
0 answers
20 views

Statistical formula of likelihood in nlme

I understand that nlme package in r uses REML method for estimation. Where can I find the statistical expression of this likelihood (for a single level of grouping) ...
user avatar
0 votes
0 answers
7 views

AlgDesign-implementation never moves below 90% D-efficiency (Factorial Survey)

I'm currently researching Factorial Surveys and am trying to implement D-efficiency-designs in the AlgDesign-package. My first step was to run simulations as to uncover the relation between the number ...
user avatar
0 votes
0 answers
6 views

The use of the index argument in glmmlasso in R with interaction terms

I am using the glmmLasso package in R for variable selection with repeated measurements. I have 14 variables + interactions of each of these 14 variables with age that I want to use the selection for. ...
user avatar
0 votes
0 answers
23 views

How to interpret high P-value and low Mcnemar's Test P-value in Caret R?

I am using the caret R package to evaluate machine learning models. This gives me a lot of information about different metrics. I am confused about my result why ...
user avatar
  • 101
1 vote
1 answer
8 views

What is the scaling applied to Helmert contrasts in emmeans?

I'm trying to understand why the values under 'estimate' from an emmeans contrast function differ from those of the default 'Estimate' values from, say, 'summary.lm()' in R. As an example, let's use ...
user avatar
  • 111
0 votes
0 answers
23 views

How to interpret a Linear Regression in R [closed]

I would like to know how to interpret the result from the regression model as the intercept is coming negative.
user avatar
0 votes
0 answers
5 views

Validate correlations with multiple influence factors

I am having a problem with validating my correlations. To explain the situation: Dataframe 1: the number of observations for each day in 2 years. Dataframe 2: multiple weather and air quality ...
user avatar
  • 101
0 votes
0 answers
7 views

PCA / PCR with longitudinal data

I have a longitudinal data frame with a more than 100 variables and want to perform a pricipal component analysis and eventually a pricipal component regression in R. My data has the form of: ...
user avatar
0 votes
1 answer
17 views

How to deal with left truncation in cox model in R

I have a longitudinal data with 5 follow-ups. My aim is to see the effect of a disease on ability decline at old age. In my study, I have sibling pairs, one with disease (1) and one without disease (0)...
user avatar
0 votes
0 answers
5 views

Getting the arc-lengths of projections along a local principal curve in LPCM [closed]

I have been using the R package LPCM to obtain local principal curves (Einbeck, Tutz, and Evers 2005). I would want to obtain the arc-lengths of the projected points from the beginning of the curve, ...
user avatar
0 votes
0 answers
7 views

Getting distances from points to their principal curve projections in R princurve? [closed]

I have been using the R package, princurve, to calculate principal curves. Now I want to obtain the squared distances from the points I used to fit the principal curve to their projections in the ...
user avatar
0 votes
0 answers
12 views

How to run a multilevel regression model with crossed random effects: items and participants?

I am trying to run a multilevel regression for my study: I have two random effects; participants (97) and items (which are the 20 words used in the study) Each participant had to spell the same words. ...
user avatar
1 vote
0 answers
26 views

Mean-level forecast from rugarch does not match manual calculation

I am looking into the rugarch package and am trying to understand how the one-step-ahead forecast is calculated. Specifically, I am fitting an AR(2)-GARCH(1,1) ...
user avatar
  • 11
0 votes
0 answers
28 views

Power / sample size estimation for chi-square test with continuity correction in R

1._Some authors mention that they estimate sample size for chi-square test with continuity correction. For instance: Sample-size calculation is based on Pearson's Chi-square test with a two-sided ...
user avatar
  • 883
2 votes
0 answers
17 views

is ok to use the same variable in two hierarchies?

I have a dataset with two levels: the city level and person level, at the city level i have the categorical variable "poverty level", in my research estimating the effect of the "...
user avatar
0 votes
1 answer
8 views

I think coxph post estimation with big data - confused about the results

I am having trouble understanding if my data is cooked, and how bad, based on post-estimations for coxph. The regression and the cox.zph test is below. Based on the post-estimation, this looks bad ...
user avatar
  • 155
0 votes
0 answers
8 views

Setting up a stacked dataframe for multilevel model analysis in R

I need to set up my data frame into a stacked or long form in order to do a random crossed effects multilevel analysis. My random factors are participants and items (words in the assessment) My fixed ...
user avatar
0 votes
0 answers
17 views

Interpretation of binomial regression in R

I'm running a regression to see if theres a positive or negative relationship between cvdrst and smkcigst, but I'm not sure how to interpret this regression also why is the data for smkcigst NA, even ...
user avatar
  • 1
2 votes
1 answer
59 views

How to obtain local time slope from GAM model

I have a model where I try to model the linear trend in my response over time The trend may vary by elevation and location As far as I understood the mgcv package ...
user avatar
  • 21
2 votes
0 answers
40 views

Bootstrap-based robustness of a test checking. Is resampling from sample distribution a good procedure?

I aim to check the robustness of 2 groups t-test when samples come from lightly skewed distributions. To approach the problem I though about performing a Montecarlo based robustness analysis using ...
user avatar
0 votes
0 answers
7 views

regression analysis in brand funnel

What regression can I use for brand funnel? The participants who do not choose a brand in the consideration, can not pick the brand in the conversion stage due to filtering. However, this is possible ...
user avatar
0 votes
0 answers
15 views

Zero and One tricks for INLA?

The Zero and One tricks are used to sample from a model not included in the basic functions in BUGS: http://www.medicine.mcgill.ca/epidemiology/Joseph/courses/common/Tricks.html I have a general and ...
user avatar
0 votes
1 answer
28 views

What model for volatility spillover effect in R? [closed]

I am doing research to study the volatility spill[over] effect. I have time-series data of Indonesian stock price (Jakarta composite index or JKSE), an exchange rate (IDR/USD), and oil price (BRENT). ...
user avatar
0 votes
0 answers
8 views

what should I report from confusion matrix and interpretation

I have the following confusion matrix to compare two flood inundation maps. In an ideal world, different modeled flood inundation maps would show the same thing. In the world we live in, they are ...
user avatar
  • 155
0 votes
1 answer
26 views

MCMC simulations in R for a simple poisson model [closed]

I would like to put together my own R function for MCMC simulations rather than using a R package or Winbugs. This is purely to ensure I understand what is going on. I have used the R Nimble package ...
user avatar
  • 1
-2 votes
0 answers
7 views

how to create 100 vectors in R in one go, and combine them all into one dataset [closed]

community, I have a list in my workspace named “sample_experiment”, from which I need to draw some information in the form of vectors, like this: first_column <- sample_experiment[[1]]$latent ...
user avatar
  • 1
0 votes
0 answers
10 views

Bayes Factor for two groups comparison with unequal variances from bayes.t.test in bolstad R package [closed]

After asking for a bayesian version of Welch test in a stackoverflow previous thread: https://stackoverflow.com/questions/72171331/bayes-factor-for-two-groups-comparison-with-unequal-variances-is-...
user avatar
0 votes
0 answers
22 views

Make a pairwise comparison among sub-groups of a variable

I have a dataset that includes a variable called SoundDirection. The variable contains 6 levels, each one scored in a likert scale from 1 to 5. In the experiment, every participant had to listen to 40 ...
user avatar
0 votes
0 answers
19 views

How to forecast sales for entire current month taking into account sales from half of month?

Good afternoon! I want to forecast sales for current month. Since I already know sales for two weeks of current month, I want to incorporate this information into forecast for the whole current month, ...
user avatar
  • 93
0 votes
0 answers
12 views

change significance level of ks.test in R [closed]

I am trying to change the significance level from 0.05 to 0.01. I want to use conf.level = 0.99 but it just had the same coming out like in 0.05 case, so how should I change it?
user avatar

1
2 3 4 5
543