# Tagged Questions

18 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 ...
14 views

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

I have a dataset (posted below). 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 ...
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 ...
12 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 ...
33 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 ...
35 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 ...
40 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) ...
15 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: ...
30 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 ...
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 ...
80 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 ...
34 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: ...
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 ...
40 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 ...
74 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. ...
21 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 ...
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 ...
87 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 ...
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 ...
18 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 ...
186 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 ...
41 views

### Difference in predicted value using two different methods

Take these two vectors: ...
28 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 ...
125 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 ...
42 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 ...
61 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 ...
131 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 ...
19 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 ...
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 ...
45 views

### Logistics regression decision categorical variable makes huge difference in Kaggle-Titanic problem in R

I have this linear model: ...
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 ...
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 ...
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 ...
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 ...
22 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 ...
50 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 ...
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
32 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 ...
51 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 ...
23 views

### Test if a slope falls within a back-transformed (log) prediction interval

I'm trying to test the hypothesis that the relationship (slope) between second molar tooth size and overall molar tooth size is 0.33 (in species of rodents), using generalized least squares regression ...
45 views

### Compare regression slopes of repeated measures linear regression

In my design, I have two groups of subjects and every subject is tested in four different conditions. So, I have a within-subject factor ('span_num', which ranges from 0 to 3) and a between-subject ...
107 views

### Exploratory regression analysis for data with missing values

Recently I have performed an exploratory regression analysis, using lavaan R package and observed the following output with some warning messages in it. I have the ...
14 views

### How to compare fit of discrete process with discrete underlying process?

I am basically looking for an equivalent to something like an $\mathbb{R}^2$ for a model on a dataset that is itself simply a collection of points. That is, if my data set is (trivial example): ...
13 views

### In practice, how is the penalisation matrix for splines, created by smoothCon (package mgcv), specified?

Evaluating a smooth object with smoothCon provides, besides several other things, the ordinary "untouched" spline bases ...
22 views

### Is it possible to measure the independent variable with part of the dependent variable

I have Beta as my independent variable and Economic value added (EVA) as my dependent variable. To calculate EVA I need to use Cost of capital and to calculate that I have to use Beta, so is it ...
38 views

### How to interpret residual plots from time series regression

I am doing a time series regression between 2 variables. I used the dynlm library in R. I'm trying to understand how to interpret the results. Could you please point out where I am getting it wrong: ...
22 views

### geepack: parameter estimates change sign depending on correlation structure

I'm working on a dataset with the following variables: ...
38 views

### tease out significance

Say I have search data like this AvgCost QualityScore SearchShare 3.12 6 0.6364 Where AvgCost is a ...