0
votes
1answer
42 views

How to capture & present lm model output from R [on hold]

After running iterations of lm() in R, I am now stuck with which components of the model's output to present and how to present them. I know that the $R^{2}$ value, ...
0
votes
1answer
93 views

modelling data that contains only ones and zeros

I'm new to modelling this type of data, and I got punished for asking this on stackoverflow... I have a dataset where the predictive variables contain only ones and zeros, and the response variable ...
3
votes
1answer
35 views

Fit nonlinear parameter

I'm attempting to fit this model: $P = C_0 + C_1*U^r$ Given known vectors of observations $P$ and $U$, I want to fit values for $C_0$, $C_1$ and $r$. How do I make this fit in R? or preferably GSL ...
2
votes
1answer
53 views

Interaction effects in big data sets

I'm looking for a method to identify a shortlist of potentially good 2-way interaction terms rather than trying all possible interactions. This question is similarly asked before here but in a more ...
1
vote
0answers
49 views

ARIMA - SARIMAX modelling with R

I am really new to R and to time series. My field of studies is in the field of Networks and Telecommunication, but my summer internship is about trying to find a statistical model for some sets of ...
0
votes
0answers
39 views

Nested logit program in R

My question is specific to transportation modelling using a nested logit (NL) model. I wonder how to make a program including a t-parameter, t-value, and likelihood in R. I did estimation in a ...
2
votes
0answers
19 views

Polynomial model with unpaired data

I'm trying to model data as a 2nd degree polynomial, but the data is unpaired and each data point of average values has a standard error for each axis. My data: A time series in minutes (time ...
0
votes
1answer
57 views

If you convert factors into indicator variables, do you treat them as continuous predictors?

Let's say I have a data matrix X where one feature is a factor with 8 levels. If I change this to be 7 indicator variables of 1's and 0's, do I need to make these columns factors as well? Or if I am ...
0
votes
0answers
21 views

Logistic Regression Performance on training data set V/s AIC

I am fitting a logistic Regression on data set having 700 variables (after Chisquare test) and 15000 rows. For that I did best subset analysis using glmulti package in R on first 70 variables and got ...
4
votes
5answers
456 views

Logistic Regression on Big Data

I have a data set of around 5000 features. For that data I first used Chi Square test for feature selection; after that, I got around 1500 variables which showed significance relationship with the ...
0
votes
0answers
15 views

Alternative Specific Variables in R

I am building a discrete choice model (rail and auto). I have the cost of a trip for each mode (rail versus auto). The utility equations I am building are denoted below: \begin{align*} V_\text{auto} ...
0
votes
1answer
34 views

The differences between models via their resampling distributions.

The caret package offers the ability to make statistical statements about the performance of different models used for classification. According to the description, ...
0
votes
0answers
33 views

how to compute odds ratio

Given a generic classification model $y=f(x_1,x_2,..,x_p)$ where $y\in \left\lbrace 0,1 \right\rbrace$ is it possible to compute the odds ratio for each variable? A theoretical explanation and ...
3
votes
2answers
91 views

logistic regression for modelling

I have these data plotted above. The explanatory variable represents intensity levels of ground shaking at different locations in an earthquake, and the response variable represents amounts of ...
3
votes
4answers
390 views

Fitting probability distribution to data

I am trying to fit a model for the values plotted above. The explanatory variable represents amounts of compensation claim in an earthquake, and the response variable represents amounts of ...
1
vote
1answer
56 views

Cost Benefit Analysis of Pre-screening Widgets for Faults before they Fail

I want to build a model that determines whether to pre-screen my widgets for defects. If I do pre-screen, it costs a fixed amount per check and I resolve the problem 100% of the time. If I don't ...
0
votes
0answers
17 views

Asymptotic Property of the Likelihood surface

I have a questions which I am not quite sure how to frame, so I apologies if it does not make sense, but I will try my best to make it interpretable. I have been running some network models in R, ...
2
votes
1answer
414 views

Categorize continuous data effectively (taking into account a response variable)

I wonder what are the better approaches to categorize continuous data (e.g. age) than dividing them with the use of quantiles and cut function (in ...
1
vote
0answers
226 views

Time series modeling with R on weekly data

I am trying to do time series modeling and forecasting using R based on weekly data like below - ...
0
votes
0answers
22 views

How to model two variables with a cumulative exponential relationship?

Suppose I have a response variable(y), which is normally distributed, and y is generally changed with ...
1
vote
0answers
39 views

R code for predicting part fitments from the following dataset

I'm a manufacturing engineer trying to resolve an issue regarding non fitment of parts. There are a couple of components which have dimensions x1 to x6 (data below). Upon assembly, they form ...
1
vote
0answers
180 views

Radial profile and 2d log-normal distribution?

I have a case study where a person should be located. We do not know where this person is, but we have some information. The total story is basically about the person which is to be searched. The ...
3
votes
0answers
70 views

Which technique to build a model returning a vector of values (in R)

In my current project I need to build a model returning a vector of actions for each observation. I need a suggestion which statistical technique is used in general in such cases. In a project, I ...
4
votes
0answers
62 views

How do I model the probability of two empirical distributions?

I have two distributions: A, and B. Each distribution is filled with the numbers 1.0-10.0. These distributions are NOT simple functions, like the gaussian, but are merely empirical counts. ...
1
vote
1answer
41 views

How to take mobility into account: multiple regression

I have a panel including two years and I want to compare urban and rural wages: $\log \text{wage}_{it} =\beta_0 +\beta_1\text{urban}_{it} +\beta_2\text{educ}_{it}+\beta_3\text{exper}_{it}+ ...
1
vote
0answers
145 views

Visualising a linear model using effects package in R

I have ran this model in R: model <- lm(mpg ~ hp + drat + disp, data=mtcars) And I have visualised this model using ...
5
votes
2answers
301 views

Modelling for soccer scores

In Dixon, Coles (1997), they have used the maximum likelihood estimation for the two modified independent Poisson models in (4.3) to model the scores in soccer. I am trying to use R in order to ...
0
votes
0answers
44 views

simulating / modeling incremental losses

I have a portfolio of customers which has been built up over the past 100 months by adding roughly 10,00 customers per month. Customers from the prior leave and follows what appears to be an ...
0
votes
0answers
286 views

Influence of too many nested random variables in glmmPQL in R

I’ve been working away on an analysis for what seems like ages now, I posted a question on here a while ago (Providing starting values for a Generalized Linear Mixed Model with glmmPQL ), and have ...
1
vote
0answers
252 views

Methods to combine ( e1071 svm ) models in R to generate a more complete, accurate model

I am using the function svm from the package e1071 in R to generate a support vector ...
0
votes
0answers
37 views

Warning message with loglin/dmod function, package gRim

after executing following code: library(gRim) TA=table(ALL) upp.model<- dmod(~.^3, margin=colnames(ALL),data=TA) I get this warning message: ...
0
votes
2answers
227 views

Which model should I use to fit my data ? ordinal and non-ordinal, not normal and not homoscedastic

Here is the kind of data I have: I have two predictor variables: 1) discrete non-ordinal --> c('a','b','c') 2) discrete ordinal --> c(10,100,200,500) Response variable: Proportion of TRUE over a ...
4
votes
1answer
69 views

Different powers of coefficient - solvable within GLM?

I have model where coefficient is of different powers: $$\mbox{log} ( \mu_{i} ) = \alpha + \beta x_1 + \beta^2x_2 + \beta^3x_3 + ... + \beta^nx_n \\ \\ N_{i} \sim \mbox{Poiss} ( \mu_{i} ) $$ $N_i$ ...
1
vote
1answer
546 views

Providing starting values for a Generalized Linear Mixed Model with glmmPQL

I am trying to run a Generalized Linear Mixed Model on some data. What I am trying to do is use distances from habitat features to predict a distance between 2 animal locations. I ran a PCA on the ...
2
votes
4answers
187 views

How to model distributions which are not normally distributed

I would like to model the performance of a rainwater tank, which has a stochastic input (rainfall). The data are the empty volume in the tank at the end of each day. The values are skewed towards the ...
1
vote
0answers
170 views

Fit Gaussian random field for spatial data

I'm dealing with spatial data where the response variable is the gas concentration. In addition, I've the x,y-coordinate values, and another covariates. I'm thinking to fit a Gaussian random field ...
0
votes
1answer
98 views

How to fit a specific model to some data

I have two dependent variables, DV1 and DV2, and one independent variable IV. I want to ascertain if the fitted model between DV1 and IV explains the relationship between DV2 and IV well or not. ...
1
vote
1answer
134 views

Making various mixed effects models

I've tried to create three models (using R): an intercept only linear regression, a simple mixed effects regression and a by-subject effects mixed effects regression. An intercept only regression ...
7
votes
1answer
675 views

Coefficients paths – comparison of ridge, lasso and elastic net regression

I would like to compare models selected with ridge, lasso and elastic net. Fig. below shows coefficients paths using all 3 methods: ridge (Fig A, alpha=0), lasso (Fig B; alpha=1) and elastic net (Fig ...
0
votes
0answers
334 views

How to write a loop in R to select multiple regression model and validate it?

I would like to run a loop in R. I have never done this before, so I would be very grateful for your help ! I have a sample set: 25 objects. I would like to draw 1 object from it and use it as a ...
1
vote
1answer
374 views

Not all Features Selected by GLMNET Considered Signficant by GLM (Logistic Regression)

I wanted to create a predictive model of mortality after patients had undergone a surgical procedure. But I also wanted to avoid doing what most researchers do by first performing univariate analysis ...
4
votes
1answer
118 views

Alternatives to the Baron-Kenny approach to modeling mediation

I'm about to open the door to a very thorny issue in the social sciences. How does one correctly model and test hypotheses about mediating variables using observational data? I'm familiar with the ...
3
votes
2answers
919 views

Is the exponential distribution a good model for this data?

I'm trying to determine if the exponential distribution is a good model for a data set that I'm exploring. It doesn't have to be precise. I'm using the data for capacity planning (if it's a good fit) ...
2
votes
1answer
249 views

Fitting data to gamma distribution to find score which corresponds to pvalue < 0.05?

I have data of size 116.667 rows defined as: ...
0
votes
3answers
1k views

Identify seasonality in time series data [duplicate]

I want to detect presence of seasonality in time series data. I know one can achieve that by plotting the autocorrelation function but I need an automatic process if the series is seasonal or not, ...
2
votes
0answers
46 views

jtest vs coxtest

In library "lmtest" The jtest and coxtest functions are used to see if two non-nested models are equivalent. According to the help function: ...
0
votes
1answer
57 views

Fitting models in R with time restriction on coefficients

How should I define a model formula in "R", when one (or more) exact linear restrictions binding the coefficients is available. Equation: y = b1*x1 + b2*x1 where y = b1*x1 for t < t1 and y = ...
1
vote
3answers
159 views

What model can I use to describe the following time-series?

I'm wondering if someone might be able to help me locate an appropriate model for the following two time-series (the cyan and blue one, the reds are rolling means). I'm looking more for a general ...
3
votes
1answer
4k views

Comparing models using anova() function in R

From the documentation for anova(): When given a sequence of objects, ‘anova’ tests the models against one another in the order specified... What does it ...
1
vote
1answer
171 views

How do I fit a constrained regression in R?

I have a formal model from which I'm deriving some parameters that I would like to estimate. I haven't done this kind of thing before, and I'd like to have some help to solve this issue in R. I ...