Questions tagged [gnm]

gnm is a R package to fit generalized nonlinear models

6 questions
6
votes
1 answer

Nonlinear term with unknown in R

I have a logistic regression using glm and I would like to add a term of the form c1(k+ac2)/(t+c2) where k and t are columns in a data frame, a is a constant. I would like R to find best-fit values for c1 and c2. Is this possible? If I only wanted a…
Charles
  • 11,269
  • 13
  • 67
  • 105
3
votes
1 answer

Fitting Generalized Nonlinear Model in R

I want to fit the following Generalized Nonlinear Model: Probit(G)=K+1/Sigma*(Temp-T0)*Time. As naive model, I created Probits(G) by qnorm(G) and then fitted the Nonlinear Model. But I want to fit Nonlinear Model with logit link similar to glm…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
2
votes
1 answer

Writing a custom model for gnm package, but need a function not in derivative table. Any workarounds?

I am trying to write a custom model for gnm, to fit Voigt profiles. I have defined library(gnm) ; library(RcppFaddeeva) VOIGT <- function(x) { list(predictors=list(Center=1, Sigma=1, Gamma=1, Alfa=1), variables=list(substitute(x)), …
kjetil b halvorsen
  • 1,206
  • 2
  • 18
  • 28
2
votes
1 answer

Use of instances( ) in gnm R package

I'm trying to fit a generalized Lee-Carter model with the R package gnm. I built a data frame EXPO <- read.table("dati/Exposures.txt",header=TRUE,skip=0) DEATH <- read.table("dati/Deaths.txt",header=TRUE,skip=2)…
1
vote
0 answers

"Variable names are limited to 10000 bytes" with gnm

I am using the gnm function in R. I am trying to fit a model with an integral portion which I have discretized by using six matrices whose columns are a binary indicator for that covariate at each time interval. Each of these columns is labelled…
KVS
  • 11
  • 1
  • 2
0
votes
0 answers

Obtaining the coefficients and significance of net mobility effects in Diagonal Mobility Models using R's gnm() function

How to obtain the net mobility effects in Diagonal Mobility Models (DMM)? Suppose the model is specified using the gnm() function in R. The baseline DRM model gnm(formula = y ~ -1 + covariates + Dref(origin, destination), data = data) Now add…