Questions tagged [nlm]

29 questions
1
vote
0 answers

How to increase precision of solution of nlm-solver

Given is a function F1: F1 <- function(C1,C2,C3,...,x,u_target) { # a lot of equations follow ... u_actual - u_target } F1 returns the result of the very last equation u_actual - u_target I want to determine the value for the parameter…
akr
  • 11
  • 2
1
vote
1 answer

How can we differentiate LAN and wireless data card network connection using NLM (NetworkListManager) API's?

I am working with NLM API's (windows). I have a LAN connection and Wireless data card connection. I am enumerating the networks available. Code: HRESULT hr; VARIANT_BOOL pBool1, pBool2; IEnumNetworks *pEnumNetworks; INetwork *pNetwork; hr =…
suren
  • 11
  • 1
0
votes
0 answers

How to open .nlm files? (UMLS data)

I am working with UMLS data (Unified Medical Language System) and they have zip files which contain files with .nlm extention and .md5 file (probably .md5 files for storing the keys to open .nlm files but I am not sure), and I don't know how to open…
0
votes
1 answer

Metamap fgets: No such file or directory

I am trying to run metamap, but I keep getting "fgets: No such file or directory" when I try to test it with echo "lung cancer" | ./bin/metamap -I. I downloaded the public_mm directory from one of our servers and had to use dos2unix to get it to…
0
votes
1 answer

Interaction between two factors as Random effects in mixed model in R

I would like to know how to write random effects of two interacting factors. For example, I have 6 species which were planted in 48 plots and replicated in two blocks. There are in total 48 combinations (all possible 1, 2, 3, 5, and 6 species…
0
votes
0 answers

Optimize constants in a function with nlm()

I have the following issue when trying to use the nlm() function in R to find optimal values for a_o & b_o. I have X : a table with 10k + rows and with 6 columns Some columns of X are variables in the function I want to minimize. It's an MSE…
0
votes
1 answer

nlm number of function evaluations per iteration?

I use nlm to maximize a likelihood in R. I would like to predict the number of likelihood evaluations and abort if the task is likely to take too long. nlm returns the number of 'iterations' (typically 10-20), and I take it that each iteration…
0
votes
0 answers

Insert equation using nlm in R

I need to estimate parameters by a non-linear fitting procedure. In particular, I'm trying to fit the following equation: I thought that nlm could be a good solution, using: #example data df <- data.frame(var= cumsum(sort(rnorm(100, mean=20,…
Matt_4
  • 147
  • 1
  • 12
0
votes
1 answer

Error in f(x, ...) : argument "x" is missing, with no default in nlm

rm(list=ls(all=TRUE)) data <- read.csv("con.csv", header=TRUE, sep = ",") x <- data$X0 n = length(x); T1 <- 1 f <- function(a,b) { L <- (n*log(a))+(n*a*log(T1))+(n*a*log(b))-(n*log((T1^a)-(b^a)))- ((a+1)*sum(log(b+x))) return(-L) } ML <-…
Ab2016
  • 11
  • 1
  • 1
  • 2
0
votes
2 answers

Solving for x and y in qcauchy() given its quantiles in R

Background: qcauchy(p, location, scale) is an built-in base R function. In this function, "location" indicates the center and "scale" indicates the speadoutness of a symmetric bell-like curve (just like a normal distribution). "location" can be any…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
0
votes
0 answers

'Realloc' could not re-allocate memory with adaptItegrate

I tried to minimizing -2likelihood using nlm function in R. One component of my likelihood function is a double integral which was calculated using adaptItegrate. With some pre-specified starting value, I got likelihood value quite fast (less than 1…
Thaole
  • 9
  • 4
0
votes
2 answers

For loop not running as intended in R

Good evening I am currently working on a maximization problem using the nlminb() function in R. Heres part of the code. These are the initial input parameters w <- rnorm(12,0.5,1) y <- 1:12 x <- rnorm(12,0,1) h <- 0.25 n <- length(x) g <-…
0
votes
1 answer

Nonlinear models with dicotomic affecting to a subset of parameters

I have been working in R with nonlinear models such us: Y = Alpha1*time + Alpha2*sin(2*pi*time/Alpha3) + Alpha4*(-1)^time And I would line whether a bernoulli variable affects to the Alpha1*time and intercept or not. Such bernoulli variable could…
Hector
  • 1
  • 2
0
votes
1 answer

Passing a function argument through R-function nlm

I am probably being unreasonable asking for help debugging a program, but I have spent a day and a half on this pretty simple bit of code and have run out of ideas. I am trying to optimize a function called "log.pr.data" with respect to its first…
1
2