0
votes
0answers
32 views

Is my random variable affecting my response?

I performed an experiment on coral colonies (10 colonies, randomly chosen in repeated measurements); manipulating aragonite/carbon chemistry and temperature (fixed effect) to analyse effects on the ...
0
votes
1answer
26 views

GLM conditional distribution from R GLM

I want to obtain the full distribution of a Gamma (or Inverse Gaussian) distributed $y_i$ given a vector of $\bar x_i$ that have been used in the linear predictor of a coefficient. Suppose also for ...
1
vote
1answer
27 views

Separate specifications for p and n in a binomial GLM

For a binomial GLM, both the probability and the number of trials are important for each data entry. Using the glm fucntion in R, how do I specify them separately ...
0
votes
0answers
16 views

How to embed a dictionary into R glm formula? [migrated]

I'm trying to predict a class (its binary classification) of a tweet, based on those users, who did a retweet. And I want to include into formula not the count of retweets, but every user who did it. ...
2
votes
3answers
72 views

Which glm algorithm to use when predictors are numerical as well as categorical?

I just need a direction on which regression algorithm (preferably glm or similar) algorithm to use when the predictor variables are a mix of numerical and categorical variables. The output is ...
0
votes
0answers
22 views

Error with Syntax for GLM with inverse.gaussian family in R

In my data set, I have 3 covariates ($V_1, V_2, V_3$) and response ($V_4$), generated by a program specifically written to generate random variables using an Inverse Gaussian distribution, in which $ ...
0
votes
0answers
26 views
3
votes
1answer
83 views

Using R for GLM with Gamma distribution

I currently have a problem understanding the syntax for R for fitting a GLM using the Gamma distribution. I have a set of data, where each row contains 3 co-variates ($X_1, X_2, X_3$), a response ...
0
votes
0answers
28 views

Reference for R VGLM function

Could someone please either explain to me what the VGLM function in R does or point me towards comprehensive documention? Currently, the only documentation I can find does not explain what a Vector ...
1
vote
0answers
32 views

GLM with unequal sample size

I am trying to figure out how to run a GLM with a poisson distribution in R. The data has 4 treatments: A(n=16), B(n=17), C(n=16), D(n=20), and 2 time periods. This data is count/area so there are ...
4
votes
0answers
43 views

Which model for panel data with dependent variables from [0,1]?

I'm stuck with a regression modeling problem. I have panel data where the dependent variable is a probability. Below is an excerpt from my data. The complete panel covers more countries and years, ...
4
votes
1answer
89 views

Which is more accurate glm or glmnet?

R glm and glmnet use different algorithms. I notice non trivial differences between the estimated coefficients when I use both. I am interested in when one is more accurate than another, and the ...
0
votes
0answers
25 views

incorporating averaging models from AIC and still using k-fold cross validation?

Ive a county/district that Ive divided into ~300 grids that are 15km^2 in size attributed with various habitat and economic variables that have been summarized and standardized. I then have 2 types ...
0
votes
1answer
41 views

Simulating responses from a factorial experiment for power analysis

I am thinking about a factorial experiment with two factors. Both factors are ordered factors. Factor 1 has two levels: small and large. Factor 2 has four levels: never, sometimes, frequently, and ...
0
votes
0answers
29 views

Restricting model parameters in logistic models in R

Is there any function in R that can solve the problem like this in SAS? Thanks in advance!
0
votes
1answer
59 views

How to see how good is my model?

I am using glm to find a model using training data and then use test data to see how well the model is behaving. My response variable is ...
1
vote
1answer
96 views

Plotting predicted values in GLM in R

I am trying to find a more aesthetic way to present an interaction with a quadratic term in a logistic regression (categorisation of continuous variable is not appropriate). For a simpler example I ...
0
votes
3answers
76 views

Regression for a Rate variable in R

was tasked with developing a regression model looking at student enrollment in different programs. This is a very nice, clean data set where the enrollment counts follow a Poisson distribution well. I ...
5
votes
1answer
189 views

Wald test in regression (OLS and GLMs): t- vs. z-distribution

I understand that the Wald test for regression coefficients is based on the following property that holds asymptotically (e.g. Wasserman (2006): "All of Statistics", pages 153, 214-215): $$ ...
1
vote
1answer
70 views

Generalized LM or LM in ecological dataset

I have previously posted a question for the same dataset but now I had somme issues with the models and I wanted to re-phrase my question. My dataset contains 50 morphometric characters (which we ...
3
votes
0answers
115 views

Are GAMMs/GLM the best choice for calculating number of germs on hands?

We would like your opinion on whether GAMMs are a good option and how best to go about implementing for the following: During a period of patient care, a nurse will accrue $Y$ colonies of bacteria on ...
0
votes
0answers
38 views

glmnet standardization details

I'm using glmnet for a binary variable. I'm trying to use the resulting coefficients to understand what variables are driving the responses. In doing so I've come across the ...
2
votes
0answers
56 views

Finite mixture models with bounded data

I am trying to fit a finite mixture model to a dependent variable which is bounded (practically) between -0.594 and 1 (theoretically, the latent variable is bounded between -Inf - 1). The data are ...
1
vote
1answer
75 views

What is behind JAGS (Just Another Gibbs Sampler)?

I have been using JAGS but I am not quite sure how it actually simulates it values. I need to know in a general sense what's going on in the background. Thanks for the help
0
votes
1answer
100 views

How are the p-values of the GLM in R calculated?

I have been running some binomial logistic regressions in R on a data set and I realised that the p-values of the estimated coefficients are not computed based upon a Normal distribution. For e.g. I ...
3
votes
0answers
118 views

R-squared in linear model verses deviance in generalized linear model?

Here's my context for this question: From what I can tell, we cannot run an ordinary least squares regression in R when using weighted data and the survey package. ...
1
vote
1answer
83 views

Coefficient output in R for full model

I am having trouble understanding what exactly R is outputting when I look at the coefficient summary for the full model. For the lowbwt data, there are 4 variables: low, age, lwt, race (3 levels), ...
1
vote
0answers
107 views

Is conditional logit a specific form of GLM? And what are its specificities?

Background: For a project, I am fitting a conditional logit model where I have 5 control cases for every realized case. To do that I use the clogit() function in ...
1
vote
0answers
177 views

Machine Learning Algorithms vs. Linear Regression

Do machine learning algorithms like Boosted Regression Trees (in the R package (gbm)) follow the same statistical assumptions of not including correlated predictor variables in GLM? i.e. If I have ...
5
votes
4answers
480 views

How to check if my regression model is good

One way to find accuracy of the logistic regression model using 'glm' is to find AUC plot. How to check the same for regression model found with continuous response variable (family = 'gaussian')? ...
1
vote
2answers
158 views

Interpreting summary function for lm model in R

What is the meaning of "t value" and Pr(>|t|) when using summary() function on linear regression model in R? ...
0
votes
0answers
88 views

Errors with subset selection for logistic regression using the bestglm package in R

I'm currently trying to do subset selection for logistic regression using the bestglm package in R. Unfortunately, however, I am running into an error and unsure of ...
1
vote
1answer
74 views

How to test for correlation with data that violates assumption of linearity and is not monotonic?

I have sampled 8 individuals (birds) from two regions. For each of these 16 individuals I have sampled 9 feathers that have each grown in sequential order (from 1 to 9). Next I have measure both ...
0
votes
1answer
169 views

Errors fitting a Penalized Linear Model

I am trying to reproduce the results from this answer in CrossValidated with no luck. I keep getting an error when calling: ...
7
votes
1answer
253 views

Understanding the predictions from logistic regression

My predictions coming from a logistic regression model (glm in R) are not bounded between 0 and 1 like I would expected. My understanding of logistic regression is that your input and model parameters ...
0
votes
0answers
14 views

Square root transform vs. generalized linear model [duplicate]

Possible Duplicate: GLM vs Square Root Data Transformation first post here. I am currently analysing some pretty awful/awkward data on the abundance of fish under three different ...
1
vote
1answer
179 views

Using fitted GLM model to simulate y's from new x-values

I have a fitted GLM model: m1=glm(y~x,family=poisson,data=data). I would like to use this fitted model to simulate new data but ...
4
votes
1answer
155 views

Cost function for validating Poisson regression models

For count data that I have collected, I use Poisson regression to build models. I do this using the glm function in R, where I use ...
1
vote
1answer
44 views

Is there a general rule about max nr of variables to use in (generalized) linear model?

I am running a generalized linear model on a dataset with 19 individuals and have 4 variables of interest. There are furthermore a number of interactions that might be interesting to look at. I was ...
2
votes
2answers
334 views

What is the difference between logit-transformed linear regression, logistic regression, and a logistic mixed model?

Suppose I have 10 students, who each attempt to solve 20 math problems. The problems are scored correct or incorrect (in longdata) and each student's performance can be summarized by an accuracy ...
5
votes
2answers
872 views

How to interpret the intercept term in a GLM?

I am using R and I have been analysing my data with GLM with Binomial link. I want to know what is the meaning of the intercept in the output table. The intercept for one of my models is ...
3
votes
2answers
162 views

Best analysis for count data as response variable

I want to know what is the best way to analyze a data set where my response variable is count data and my explanatory variables are continuous variables. All my variables are not normally distributed. ...
2
votes
1answer
246 views

Missing values in GLM

I am applying glm on a data in which most of the values are NAs or blank. For example, in the example data produced below (4 predictors and one response variable), the default glm command will remove ...
1
vote
1answer
78 views

Simple way to fit large number of single factor logistic regression models in R - automatically

I have a dataset with one binary target variable called “target” and many many factors “F1”, F2”… “F200”. I’m trying to come up with code to fit 200 single factor logistic regression models and return ...
-3
votes
1answer
501 views

How to call glm when response variable is categorical in R?

I have following data stored in a file. I am applying 'glm' in R to find linear regression equation to best predict the 'output'. ...
1
vote
0answers
261 views

How to select the best variables by RandomForest in R?

I have a table of mRNA levels of my target gene and it's transcription factors in many different condition. What I want to do is to select the most important ...
1
vote
0answers
89 views

Post-hoc comparison in glmm with interaction

I have data about seed predation (SP) in fruits of three differents colors (yellow, motted, dark) and in two fruiting seasons (2007, 2008). I performed a GLMM and the outcome showed that the ...
2
votes
1answer
418 views

How the 'NA' values are treated in glm in R

I have a data table T1, that contains nearly a thousand variables (V1) and around 200 million data points. The data is sparse and most of the entries are NA. Each datapoints have a unique id and date ...
4
votes
1answer
545 views

How to simulate artificial data for logistic regression?

I know I'm missing something in my understanding of logistic regression, and would really appreciate any help. As far as I understand it, the logistic regression assumes that the probability of a '1' ...

1 2 3