similar to: How can one use R-code and R-functions within C-Code?

Displaying 20 results from an estimated 3000 matches similar to: "How can one use R-code and R-functions within C-Code?"

2006 Mar 28
3
How to generate a list of lists recursively (for bayesm)
Dear all, I need to generate a list of lists as required by the bayesm-package. This means in my application that I have to generate a list which consists of 2000 elements, which are lists themselves: list(list(y1,X1),...,list(y2000,X2000)). The y are vectors and the X are matrices of different dimensions. I tried to solve this problem iteratively by the following code, but received an error
2006 Mar 05
2
RWeka
Hi, I downloaded RWeka successfully. (At least I do not see, where I could have made a mistake.) Then I tried to load it by the library-command. To my surprise this did not work. Result: library(RWeka) Fehler in .jinit(c(system.file("jar", "weka.jar", package = "RWeka"), system.file("jar", : Cannot create Java Virtual Machine Fehler: .onLoad in
2006 Feb 22
2
screensavers in general
Hi, I tried some windows screensavers with Wine. Most screensavers start with the configuration screen without a possibility to start the main screensaver part. It's the same thing when I rename a screensaver file from 'somewhat.scr' to 'somewhat.exe' and try to run it with a doubleclick on my Windows 2000 PC. (*.scr: the screensaver starts, *.exe: the configuration screen
2005 Nov 03
1
R save very huge matrices in files
I have to work with really huge matrices (about 1000*1000 or more). And I want to save those matrices in some file on my computer. I tried to do so by using the command write.tabe(SMatrix,file="C:/Programme/rw1061/SMatrix.txt",sep=" ",quote=FALSE,row.names=FALSE,col.names=FALSE) SMatrix is the matrix I want as a file. Unfortunately this does not work. Error message: Error:
2005 Nov 21
2
Multinomial Nested Logit package in R?
Dear R-Help, I'm hoping to find a Multinomial Nested Logit package in R. It would be great to find something analogous to "PROC MDC" in SAS: > The MDC (Multinomial Discrete Choice) procedure analyzes models > where the > choice set consists of multiple alternatives. This procedure > supports conditional logit, > mixed logit, heteroscedastic extreme value,
2004 Nov 30
1
(no subject)
Hello, I am trying to estimate a choice model with varying choice set for each individual. I would like to fit different kinds of model (logit ,nested logit, probit...). So far I have found that package *mnp* allows me to estimate a probit model with varying choice set. But for estimation of a logit model, I have only found function *multinom* of package *nnet* which does not seem to allow for
2000 Oct 24
2
multinominal probit & logit
Dear everybody! Are there algorithms for multinominal logit/probit available for R? Is it my fault that I cannot find these in CRAN? Has somebody programmed these? with best wishes Ott Toomet Ott.Toomet at mail.ee -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2005 Apr 12
1
factors in multinom function (nnet)
Dear All: I am interested in multinomial logit models (function multinon, library nnet) but I'm having troubles in choose whether to define the predictors as factors or not. I had posted earlier this example (thanks for the reply ronggui): worms<- data.frame(year= rep(2000:2004, c(3,3,3,3,3)),age=rep(1:3,5),
2005 Apr 13
2
multinom and contrasts
Hi, I found that using different contrasts (e.g. contr.helmert vs. contr.treatment) will generate different fitted probabilities from multinomial logistic regression using multinom(); while the fitted probabilities from binary logistic regression seem to be the same. Why is that? and for multinomial logisitc regression, what contrast should be used? I guess it's helmert? here is an example
2000 Mar 20
3
: multinom()
Dear R users, Does anyone know if it is possible to use multinom to do a polychotomous fit using one categorical and one numeric variable as response. The doc. for multinom states that for formula , response can be K>2 classes. Is this 2 and more, or as I have understood it only greater than 2. I have tried fitting my data, but have only encountered error messages. On another note, Is it
2008 Jun 20
1
omnibus LR in multinomial model
If one estimates a model using multinom, is it possible to perform the omnibus LR test ( the analogue to omnibus F in linear models ) using the output from multinom ? The residual deviance is there but I was hoping I could somehow pull out the deviance based on just using an intercept ? Sample code is below from the CAR book but I wasn't sure how to do it based on that example. Thanks
2002 Nov 28
2
Logistic Regression with 9 classes
Hello! I need to classify a data set with 19 variables and 9 classes using Logistic Regression(on R). I know that when we have only 2 classes we can use glm() to estimate the coefficients of the model. But I don?t understand how can I do a classification task with Logistic Regression on a data set with 9 classes! Does anybody know how can I estimate these coefficients (of a model with 9
2009 Feb 16
2
Using eval in multinom argument
Hi, I am having difficulty entering a 'programmable' argument into the multinom function from the nnet package. Interactively, I can get the function to work fine by calling it this way: z1=multinom(formula = class.ind(grp[-outgroup])~ (PC1 + PC2 + PC3), data=data.frame(scores)) However I need to be able to change the number of variables I am looking for in 'scores' and so am
2007 Mar 25
2
resolving expand.grid & NA errors
I am hoping for some advice regarding resolving error messages I have received when trying to use the expand.grid command. library(nnet) library(MASS) library(car) mod.multacute <-multinom(kc$group ~ kc$in.acute.danger * kc$violent.convictions, na.rm=T) summary(mod.multacute, cor=F, Wald=T) Anova (mod.multacute) confint (mod.multacute) > predictors <- expand.grid(group=1:3,
2006 Feb 22
2
does multinomial logistic model from multinom (nnet) has logLik?
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and Cragg.Uhler.R2, but the value from multinom does not have logLik.So my quetion is : is logLik meaningful to multinomial logistic model from multinom?If it does, how can I get it? Thank you! ps: I konw VGAM has function to get the multinomial logistic model with logLik, but I prefer use the function from "official" R
2008 May 30
1
existing package (mmlcr) modification -- appropriate process?
All: I am new to R and would like your help in identifying the appropriate process to follow in order to modify the output from an existing package. I've had difficulty finding an answer online, perhaps because I am using incorrect terminology. A package that I am using (mmlcr) invokes another package (multinom). An output of multinom is the standard errors, but this output is not
2003 Nov 13
1
what does this multinom error mean?
I have RedHat linux 9 with R 1.8. I'm estimating models with multinom with a dependent variable that has 3 different values. Sometimes the models run fine and I can understand the results. Sometimes when I put in another variable, I see an indication that the estimation did work, but then I can't get the summary method to work. It's like this: > votemn1 <-
2012 Jan 05
2
difference of the multinomial logistic regression results between multinom() function in R and SPSS
Dear all, I have found some difference of the results between multinom() function in R and multinomial logistic regression in SPSS software. The input data, model and parameters are below: choles <- c(94, 158, 133, 164, 162, 182, 140, 157, 146, 182); sbp <- c(105, 121, 128, 149, 132, 103, 97, 128, 114, 129); case <- c(1, 3, 3, 2, 1, 2, 3, 1, 2, 2); result <- multinom(case ~ choles
2019 Jul 18
2
predict multinomial model con nnet
Hola todos Cuando realizo las predicciones del modelo multinomial con el paquete nnet, estas cambian cada vez que lo ejecuto ... saben por qué pasa esto ?? Gracias por la ayuda. [[alternative HTML version deleted]]
2004 Oct 28
1
polr versus multinom
Hi, I am searching for methods to compare regression models with an ordered categorical response variable (polr versus multinom). The pattern of predictions of both methods (using the same predictor variables) is quite different and the AIC is smaller for the multinom approach. I guess polr has more strict premises for the structure of the response variable, which methods can be used to test for