0
votes
0answers
26 views

How to conveniently add a large set of regressors in R? [migrated]

I have to add approximately 30 dummy variables to a regression. If my variables would be named dummy1 - dummy30, I would denote ...
0
votes
0answers
37 views

Obtaining the SarimaX equation from the arima coefficients

I have a SarimaX model with three regressor variables: ...
0
votes
0answers
13 views

interpret regression slope of residuals against an independent variable

I did a linear regression of crop yield against year and took the residuals of this regression for my further analysis ...
0
votes
2answers
51 views

Error using mice() package in R for handling missing data [on hold]

I am doing regression with a data with Y as target variable and 16 feature variables. I had two date feature variables which where as factor. I converted them to date format as shown below: ...
2
votes
1answer
31 views

How to check my data set is following non-linear to linear regression?

I have two data sets with y and X1,X2,X3,....,X6 all Xi's are independent variables and y is dependent variable. Instructor said that one data set will follow linear regression and other will follow ...
2
votes
1answer
67 views

Generate random data for logistic regression with a categorical independent variable

I am trying to generate a data frame of fake data for exploratory purposes. Specifically, I am trying to produce data with a binary dependent variable (say, failure/success), and a categorical ...
0
votes
1answer
37 views

NA produced in linear regression model

I have read similar posts to this but my problem is not resolved by the answers given. I want to do a v simple linear regression to see if bite incidence is related to district, zone (vacc or control) ...
0
votes
0answers
31 views

how to get theoretical center of distribution and theoretical variance of the distribution

Here for 1000 simulations and 40 samples for each, here is random exponential distributor using replicate function ...
1
vote
1answer
66 views

Multiple regression in R with different data types of predictors

My goal is to investigate a dependent variable which is metric (time in hours). The independent variables include 3 metric, 2 binary (factors), and one factor variable, which consists of 11 districts ...
0
votes
1answer
19 views

Multiple regression in R with different data types of predictors

My goal is to investigate a dependent variable which is metric (time in hours). The independent variables include 3 metric, 2 binary (factors), and one factor variable, which consists of 11 districts ...
1
vote
0answers
38 views

Stock Closing price forecasting using ARIMA Model in R ( Entry level R programmer and Statistics learner)

I am an entry level R programmer and trying to learn statistics. i have downloaded the daily stock Adjusted Close price of one stock from sep 2011 to till date. As per my study plan, i have plotted ...
1
vote
0answers
19 views

Performing a linear regression on small dataset and trouble with modeling small predictor values

I have a dataset. y: the dependent variable (representing a ratio between the number of objects bought with the given money & the total number of objects bought) x: the independent variable ...
1
vote
0answers
7 views

Plotting fraction of NAs of a data frame [migrated]

Does anyone know how to plot the graphs of figure 23.1 of the example chapter of Steyerberg's book? The R-function is called "na.plot2" and Displays for example the fraction of missing values in data ...
0
votes
0answers
13 views

About Hypothesis Test In Spatial Regression

I'm doing estimation of spatial lag/error model using R package "spreg"/"spdep". But I can't find any method to do hypothesis test after regression. For example, I want to test whether two ...
0
votes
0answers
34 views

R: Prediction using glm() [migrated]

I am using glm() function in R with link= log to fit my model. I read on various websites that fitted() returns the value which we can compare with the original data as compared to the predict(). I ...
0
votes
0answers
39 views

R- Improving linear regression fit

I am trying to construct a predictive model in R. I am using the glm() in R to fit the model. I am getting a very high residual error after fitting the model. My target values are in the range of ...
0
votes
0answers
26 views

R- Improving linear regression fit [closed]

I am trying to construct a predictive model in R. I am using the glm() in R to fit the model. I am getting a very high residual error after fitting the model. My target values are in the range of ...
1
vote
1answer
45 views

Algorithm to find subsets with high correlation

I have a reasonably large dataset (d) with predictor variables x1...xn and a target variable y. I can use recursive partitioning (such as CART or rpart in R) to find subsets of d with a high (or low) ...
0
votes
0answers
23 views

How can I get the pseudo-R squared by using censreg (tobit regression)?

I was using VGAM for tobit regression but when I entered new dataset which had more than 50000 records, it got errors like this: ...
1
vote
1answer
35 views

Saving each step of Backward selection in R

I'm trying to recreate Leo Breiman's work http://www.stat.washington.edu/courses/stat527/s13/readings/BreimanSpector_1992.pdf and I'm experiencing some major difficulties in R. I've made it that far ...
0
votes
0answers
20 views

Comparing regression models, same and different response variables [duplicate]

My basic question is how to compare regresion models with (1) the same and (2) different response variables. My data include the following variables: x: dosage, 10 levels y_meas: lab measaured ...
1
vote
1answer
86 views

Predictive Modelling in R

I am new to R and I am trying to do some predictive modelling on data set which has 16 feature variables and the target value is numeric in R. I am not sure if the steps I am following will help me to ...
1
vote
1answer
41 views

Interpreting output from anova() when using lm() as input [duplicate]

I am learning about building linear regression models by looking over someone elses R code. Here is the example data I am using: ...
0
votes
0answers
8 views

glmer predictions: how to extract scores that contributed

I've fit a logistic regression mixed effects model with glmer in R and I'm doing predictions with it. Given a new data that needs a probability prediction, I am interested in extracting the fixed and ...
0
votes
1answer
44 views

Compare linear regression models (same and different response variable)

How can I (1) compare two linear models between years and (2) Can I compare 2 models with different response variables? My data have 4 variables: y_meas, x, year, y_calc. "y_meas" is a lab measured ...
3
votes
2answers
82 views

Interpretation of multiple logistic regression with interactions in R

I am trying to look at whether 2 variables (one dichotomous categorical and one continuous) predict the occurrence of a dichotomous categorical dependent variable. ...
0
votes
1answer
26 views

Pooling imputed, still not analysed datasets in MICE

I need to do a Multiple Imputation on a dataset with several missing values, and I need to do it with mice, because later I'll have to compare the results with those of imputations ran with other ...
-1
votes
0answers
16 views

Comparing goodness of fit between lm() and glm()

I may be revealing my relative statistical naivety in asking this, but here goes. Say I have 3 sets of data, to which I fit a characteristic line, be that via ...
1
vote
2answers
99 views

Best approach in R for interpolating and curve fitting a tiny dataset?

I have a set of 'activity' values for some enzyme assays I have been doing, that come out of some analysis I've been doing. The problem is, the data is fairly crap, and there aren't many points, but ...
0
votes
0answers
19 views

Fitting (multlple) linear models by group in R [migrated]

I'm trying to (somewhat) elegantly fit 3 models (linear, exponential and quadratic) to a dataset with classes/factors and save p-values and R2 for each model and class/factor. Simple dataset with 3 ...
0
votes
0answers
21 views

how to extract AIC(Akaike's Information Criterion) in LAR(Least Angle Regression) in R Studio?

I'm already done in conducting the whole LAR Algorithm using lars() function in R Studio. But my problem is how to extract or use AIC in R Studio for choosing enough the number of variable that will ...
2
votes
2answers
188 views

Solving linear regression with weights and constraints

I would like to solve a linear regression (in R) with weights $w$ and a constraint. In other words, I would like to find $x$ that minimizes the sum of squares $$\sum_i w_i(b_i-Ax_i)^2$$ On top of ...
0
votes
2answers
42 views

Difference in predicted value using two different methods

Take these two vectors: ...
2
votes
1answer
42 views

standard errors of the fitted values of a time series regression

I really want to understand how the math is working here. I am trying to get the standard error of the fitted values for a time series regression model.In the non-time series regression,I know I can ...
3
votes
2answers
133 views

How to estimate model with both linear and exponential parameters?

I have a theoretical growth function that can be perturbed by events, and I'd like to estimate the growth parameters as well as the perturbation, and the rate of falloff after that perturbation. I'm ...
1
vote
1answer
45 views

Fitting exponential curve to histogram using R

I am trying to fit a curve to a histogram that looks roughly like exponential decay. Since this is roughly similar to exponential decay, I figured a good model was ...
1
vote
1answer
64 views

Is there a binomial regression model that captures data with fat tails?

Specifically, are there any binomial regression models that use a kernel with heavier tails and higher kurtosis than the standard kernels (logistic/probit/cloglog)? As a function of the linear ...
2
votes
1answer
132 views

Does fixing coefficients in a regression make sense, and if so how to do it?

I have a generic question about whether it might sometimes make sense to fix specific regression coefficients to predetermined values. And if this makes sense in particular cases, how do you best go ...
1
vote
0answers
20 views

Weighted Least Squares with Standardized Coefficients

I want to understand how weighted least squares regressions work to implement it in a more complex context. I think I'm a good step into that process, but I'm still wondering what the correct way to ...
2
votes
2answers
50 views

Factor or No-factor

I am performing linear regression in R and I have a variable called diversityscore which is a value ranging from 1 to 10 indicating #activities a user performs with 1 meaning one activity to 10 ...
3
votes
1answer
63 views

What kind of model can I try to fit in this plot?

I have a plot like this. I wish to apply a model to this, however, I guess a linear regression model won't work on this. What I did was plot it on logarithm x and logarithm y axis as well but it ...
2
votes
1answer
113 views

Can we skip the lower order terms in interactions? [duplicate]

This question is about three-way interaction and the possibility of applying without second lower terms with keeping the main variables in the equation not like the other questions. In fact the other ...
1
vote
1answer
21 views

Using Mantel to explore relationship between geographic distance and a multivariate character

I'm working with bird songs. A song is composed of many vocal parameters [highest frequency (Hz), lower frequency(Hz), bandwidth(Hz), duration (s), number of notes, and son on....] I'm interested in ...
0
votes
0answers
48 views

Determining Relative Weights

I am looking for some recommendations and more specifics about how to do the following: Objective: To determine the weights of a number of stock valuation metrics. I am looking at doing this across ...
0
votes
1answer
27 views

lm() producing many NAs for coefficients

I am trying to run a regression using about 80 independent variables. The problem is that the last 20+ coefficients return NA. If I condense the range of data to within 60, I get coefficients for ...
0
votes
3answers
51 views

Covariate no longer significant after inclusion of interaction term

I'm trying to interpret some results here, and just want to make sure that my logic is sound. I'm predicting a binary outcome with a categorical predictor (gene level coded as 0, 1, or 2 dependant on ...
2
votes
0answers
40 views

Is two years enough for panel data analysis?

I have around 800 companies for only two years period. However, around 200 of them have only one year observation. Is it still possible to conduct panel data analysis with such data Thank you
0
votes
1answer
33 views

Find the amount of variation due to another covariate

I'm trying to explain a binary outcome (cardiovascular disease) with a categorical predictor (gene level, coded as 0, 1, or 2 depending on the number of risk alleles present). I'm trying to determine ...
1
vote
3answers
62 views

Correlation using Logistic Regression and Pearson

I am so sorry, I am beginner in statistic analysis, I have project using R to analyze the correlation between dependent variables and independents variables. In this case I have two dependent ...