Tagged Questions
1
vote
1answer
81 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
131 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
62 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 ...
0
votes
1answer
57 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 ...
0
votes
0answers
40 views
Comparing two models
I have data for the same response variable but measured in two different areas (Ra and Rb). I want to use the same explanatory data (E) to predict each response in turn:
Ra ~ E
then
Rb ~ E
I then ...
2
votes
1answer
46 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
1answer
128 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
62 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
23 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
127 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
19 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
42 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
128 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 ...
2
votes
1answer
247 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 ...
0
votes
0answers
32 views
Given a response variable and 7 parameters. How can I find the function of these 7 parameters which outputs the response variable
I have 7 parameters and an associated output of a system. How do I describe this system? I wish to accurately predict the output given by tweaking the input parameters?
I am not a stats person, so ...
1
vote
1answer
96 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 ...
0
votes
0answers
190 views
Generalized linear model with autocorrelation, offset and poisson/nb family?
My data consist of daily counts of patients with certain disease (respiratory disease), their residency area, sex, age category and smoking prevalence in each area. I want to model these counts with ...
3
votes
2answers
87 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, ...
0
votes
1answer
282 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
256 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
232 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
149 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
369 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
205 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
689 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!
...
0
votes
0answers
75 views
Memory issue with SVM modeling in R [closed]
As I found the memory problem with local machine/micro instance(amazon) for building SVM model in R on large dataset(2,01,478 rows with 11 variables), then I have migrated our micro instance to large ...
1
vote
1answer
645 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,
...
17
votes
3answers
786 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
68 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 ...
2
votes
0answers
187 views
Genetic algorithms, genetic programming or machine learning algorithms for solving this problem
I have a problem that consists of finding the optimal solution based on the following criteria:
Logic for identifying that event A has occurred (i.e. "find" logic that most accurately categorises an ...
0
votes
0answers
101 views
Comparing multiple models using the same explanatory variables [closed]
I have 5 GAMs, each one using a subset of my data, defined by quantiles. The response/explanitory variables are the same in each case, but the deviance explained by each in each model differs, along ...
2
votes
0answers
102 views
Generalized linear model for Levy distribution with not complete data
I'm trying to build a model that would describe some process of payment and distribution of payments in time. I believe that time of payment has Levy distribution with probability density function:
$ ...
1
vote
1answer
231 views
Fitting logistic to small number of points in R
I'm trying to fit a logistic function to some data points. Each data "set" has 6 points that I'm trying to fit a seperate logistic function to.
Here is some sample code:
...
0
votes
0answers
122 views
Nonparametric regression in R
I have a time series that appears slightly nonlinear but it's similar to a sin or cos modified by a constant. 1,0 2,2 3,1 4,0 5,5 is one example and 1,0 2,1 3,2 4,0 5,5 is another.
Calculating the ...
2
votes
1answer
348 views
Compare Models. LOCCV implementation in R
I want to compare three models, one linear-regression-model, one regression-tree-model (from rpart) and one MARS-model (from mda ...
0
votes
1answer
396 views
How do I compute class probabilities in caret package using 'glmnet' method?
If i do a modelLookup('glmnet') it says TRUE for probModel (and in fact, I'd expect it to be usable as a model to predict probabilities in a binary outcome prediction problem as glmnet has a ...
3
votes
2answers
334 views
Understanding forecasting in R
I am presently trying to learn R. I would like to be able to apply it more in my work environment as I am an analyst in the Health Care industry. I am presently trying to use R to forecast. What is ...
0
votes
0answers
512 views
Panel data model estimation with dummy variables
In "R - project" I am trying to estimate the panel data lm model with plm function. When I include 3 dummy variables into the ...
2
votes
1answer
286 views
How to use the Laplace approximation to fit a spatial GLM model
I would like to fit a spatial generalized linear mixed model, for example, to model spatial count responses by using the Laplace approximation in available statistical software.
I am particularly ...
7
votes
1answer
402 views
Help with SEM modeling (OpenMx, polycor)
I have lots of problem with one data set to which I am trying to apply SEM.
We suppose the existence of 5 latent factors A, B, C, D, E, with indicators resp. A1 to A5 (ordered factors), B1 to B3 ...
4
votes
3answers
630 views
Model evaluation and comparison for selecting the best model
When comparing results obtained with different models in R, what should I look for to select the best one?
If I use for example the following 4 models applied to the same presence/absence sample ...
3
votes
1answer
576 views
Using Fractional Polynomials for Logistic Regression Modelling in R
I am learning logistic regression modeling using the book "Applied Logistic Regression" by Hosmer.
In chpaters, he suggested using Fractional Polynomials for fitting continuous variable which does ...
4
votes
1answer
166 views
Problem with character vectors and linear regression in R
Quick question.
I want to perform a linear regression that looks like this:
lm(y ~ x1 + x2 + x3 + x4 +x5, mydata)
This works fine if I manually write out this ...
2
votes
3answers
154 views
How to use residuals to train a model?
I've read in a couple places about people using residuals from predictions of other models to improve the model's accuracy. Anyone have a link about how to carry this out in R, ideally with some ...
2
votes
1answer
200 views
MA terms in arima
With the arima function I found some nice results, however now I have trouble interpreting them for use outside R.
I am currently struggling with the MA terms, here is a short example:
...
2
votes
1answer
161 views
Test to calculate the probability of winning
I'm running a predictive model to predict the probability of winning a certain item based on the price that I bid (other factors also). After running the model (ols) in R, I wanted to account for all ...
3
votes
3answers
135 views
Mismatch between significant variables from logistic regression and tree splits in R
I'm studying a data set in R using both regression trees (tree and rpart functions) and logistic regression. I'm finding explanatory variables in the regression which are significant, but when I fit a ...
1
vote
1answer
155 views
Reaction norms model in R
Anyone knows any R package/function to run a reaction norms model for the analysis of genotype × environment interactions? I don't know if shuch models could be performed using the lme4 or the ...
1
vote
1answer
536 views
Van Westendorp price modeling in R
I want to do price modeling using the Van Westendorp price sensitivity meter.
Can anybody provide me resources describing how to do this using R?
2
votes
0answers
542 views
How do I interpret this Weibull plot?
I was exploring Weibull analysis for understanding reliability of two specific specimen. I used the R package, "weibulltoolkit" and "survival" to get the plot in question. The dataset is big so I am ...