0
votes
0answers
27 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 ...
1
vote
1answer
47 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
356 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
37 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
166 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
71 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
21 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
34 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
96 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
44 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
40 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
122 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
237 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
192 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
204 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
34 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
195 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
66 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
331 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
181 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
153 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
90 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
128 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
506 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
308 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
293 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 ...
3
votes
1answer
97 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
831 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
223 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
0answers
58 views

(Population) pharmacokinetic M&S: AUC from sparse sampling in R

I’m relatively new to (population) pharmacokinetic analyses and have a principal question with corresponding programming. I have both an already established pharmacokinetic model and a new data set ...
0
votes
3answers
977 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, ...
1
vote
0answers
41 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
56 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
158 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
3k 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
150 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 ...
3
votes
2answers
91 views

Formulation of a nearly linear model

I try to fit a model of the following form $$ Y = (\beta X - Z)^+ + \epsilon, $$ where $Y,Z \ge 0$ and $X,Y,Z \in \mathbb{R}$ and $(x)^+ = \max(x,0)$. Note that $Y,X$ and $Z$ come from a sample, ...
1
vote
1answer
1k views

Decision tree model evaluation for “training set ” vs “testing set ” in R

So I got my training set with 70% of my data called "train" / 30% "test" I use ctree to get my decision tree model with something like this code below : ...
4
votes
2answers
399 views

Testing the race model inequality in R

Lets say we have hypothetical participant that is presented with 3 stimuli conditions: a flashing dot ($C_x$), a sound blip ($C_y$) and combination of both ($C_z$). We ask this participant to respond ...
5
votes
2answers
320 views

lm() - model specification

If have multivariate data of 3 response variables and 2 factors (f1 and f2). I can specify an linear model in different ways for this data, however I don't know what the difference between the models ...
4
votes
2answers
186 views

Entropy-based methods in R

I was wondering if anybody knows of the existence of an R package which implements entropy-based methods (maximum empirical likelihood, maximum exponential empirical likelihood, minimum discrepancy ...
4
votes
2answers
930 views

How to compare coefficients of a negative binomial regression for determining relative importance?

I'm working in R, using glm.nb (of the MASS package) to model count data with a negative binomial regression model. I'd like to compare the relative importance of each of my predictor variables ...
1
vote
1answer
398 views

how to interpret reading decision tree result from ctree() in r?

After running ctree(model) My result look like this below : ...
2
votes
0answers
1k views

Interpreting decision trees outputs in R?

I have created 2 decision trees, I just want to assure if I am making correct interpretation about it. Here is my first tree: Note: Right click on image and select view image to view it clearly! ...
1
vote
1answer
1k views

Seasonal differencing in Arima function in forecast package in R

I just want to ask about the Arima function in forecast package. The usage of it is, ...
24
votes
3answers
2k views

Why does including latitude and longitude in a GAM account for spatial autocorrelation?

I have produced generalized additive models for deforestation. To account for spatial-autocorrelation, I have included latitude and longitude as a smoothed, interaction term (i.e. s(x,y)). I've based ...
1
vote
1answer
87 views

Model some logarithmic looking data in R

I have the following data in R x <- c(0.1,0.2,0.3,0.6,0.8,0.9,1) y <- c(90,96,97.7,99.3,99.65,99.95,100) I'm trying to find a logarithmic equation that ...