similar to: Plotting problem [lars()/elasticnet()]

Displaying 20 results from an estimated 200 matches similar to: "Plotting problem [lars()/elasticnet()]"

2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
I am currently trying to find MLE of a function with four parameters. My codes run well but i don't get the results. I get the following message: BHHH maximisation Number of iterations: 0 Return code: 100 Initial value out of range. I don't know this is so because of the way i have written my loglikelihood or what. The loglikelihood LogLik<-function(param){ beta_1<-param[1]
2006 Apr 23
1
help! A quetion about the Elasticnet package in R
Can anybody help me to run the Elasticnet package of R to build some model, i am a freshman to R language , when i use the Elasticnet package to my data, it always reture a error, but i can't settle that problem. I consider if there is any constrant of the data to that package? Can anyone help me to run the elasticnet and check my data as you convenient? I put the data in attachment. Thank
2013 Mar 14
1
Elasticnet - Cross validation problem
Hello, I am attempting to use elasticnet to classify a number of documents. The features are words. The data is coded into a matrix with each document as a row and each word as a column. The data is binary, with {0,1} indicating the presence of a word. I want to use the cross validation function of elasticnet (cv.enet). However, when the code selects a random subset of the data for a given
2016 Jul 09
2
Red Neuronal complicada categorías
Hola, Esta es una forma de hacerlo... Mira que lo primero que he modificado es el fichero "x.csv" para sustituir los espacios en los nombres por "_". Y también he quitado los acentos y las eñes... He utilizado el paquete RNNS y la función "mlp()" para ajustar la red. #------------------------------------------- > x <- read.csv("x.csv",
2011 Mar 12
2
Identifying unique pairs
Dear R helpers Suppose I have a data frame as given below mydat = data.frame(x = c(1,1,1, 2, 2, 2, 2, 2, 5, 5, 6), y = c(10, 10, 10, 8, 8, 8, 7, 7, 2, 2, 4)) mydat         x     y 1      1     10 2      1     10 3      1     10 4      2       8 5      2       8 6      2       8 7      2       7 8      2       7 9      5       2 10    5       2 11    6       4 unique(mydat$x) will give me 1,
2012 Dec 24
1
How to do it through 1 step?
A data set(dat),has 2 variables: x and a, and 100 rows. I wanna add 2 variables,and call the new data set dat1: var1:f = a/median(a) var2:x_new = x*f My solution: dat1<-transform(dat,f = a/median(a),x_new = x*f) But gets error reply which says that "f" is not exits since dat has no variables called "f". So I have to do through 2 steps:
2010 Apr 22
1
Convert character string to top levels + NAN
Dear all, I have several character strings with a high number of different levels. unique(x) gives me values in the range of 100-200. This creates problems as I would like to use them as predictors in a coxph model. I therefore would like to convert each of these strings to a new string (x_new). x_new should be equal to x for the top n categories (i.e. the top n levels with the highest
2010 Aug 07
3
plot the dependent variable against one of the predictors with other predictors as constant
Hi, folks, Happy work in weekends >_< My question is how to plot the dependent variable against one of the predictors with other predictors as constant. Not for the original data, but after prediction. It means y is the predicted value of the dependent variables. The constane value of the other predictors may be the average or some fixed value. ####### y=1:10 x=10:1 z=2:11
2012 Apr 11
1
inference for customized regression in R?
Hi all, Are there functions in R that could help me do the following? We have a special type of regression which is called Geometric Mean Regression. We have done some search and found the following: https://stat.ethz.ch/pipermail/r-help/2011-July/285022.html The question is: how to do the statistical inference on GMR results? More specifically, we are looking for the prediction interval:
2009 Aug 12
3
Obtaining the value of x at a given value of y in a smooth.spline object
I have some data fit to a smooth.spline object as follows: (x=vector of data for the predictor variable, y=vector of data for the response variable) fit <- smooth.spline(x,y) Now, given a spline fit point y_new, I want to be able to find out what value of x_new yielded this fit value. How to do so? (This problem is the inverse of the predict.smooth.spline function, which takes x_new as input
2009 Jul 07
3
Error due to non-conformable arrays
Hello, Consider this function for generalized ridge regression: gre <- function (X,y,D){ n <- dim(X)[1] p <- dim(X)[2] intercept <- rep(1, n) X <- cbind(intercept, X) X2D <- crossprod(X,X)+ D Xy <- crossprod(X,y) bth <- qr.solve(X2D, Xy) } # suppose X is an (nxp) design matrix and y is an (nx1) response vector p <- dim(x)[2] D<- diag(rep(1.5,p)) bt
2013 Mar 19
1
Lars package
Hi,   I'm using lars package to run some regression analysis and my doubt now is how can I predict my model to another dataset? Let me explain a little better: I have a dataset from which I withhold some data. With the data that wasn't withheld, I create the model. Now, what I'm not being able to do is apply the model back to the data that I withheld. Any suggestions?   Here it goes
2012 Dec 18
2
Set a zero at minimum row by group
Dear R Helpers, I'm struggling with a data preparation problem. I feel that it is a quite easy task but I don't get it done. I hope you can help me with that. I have a data frame looking like this: ID <- c(1,1,1,2,2,3,3,3,3) T <- c(1,2,3,1,4,3,5,6,8) x <- rep(1,9) df <- data.frame(ID,T,x) >df ID T x 1 1 1 1 2 1 1 3 1 2 1 1 2 4 1 3 3 1 3 5 1 3 6 1 3 8 1 I want to
2009 Feb 15
0
feature extraction on time series data
Hi, This is a practical question and I am sure there are many statisticians can give me a hand. I have 500 time series data (500 rows), each row contains 100 intervals, i.e., on each row, I have X1, X2, ..... X100. I am trying to reduce the dimension of this input because the data at the end of each row does not have significant meaning to the project I am doing. I used cubic splines on ea.
2007 Jun 11
1
Error using mgcv package
Hi all, I need some solution in the following problem. The following error appears when i use "mgcv" package for implementing GAM. But the same formula works fine in "gam" package. > model.gam <- gam(formula = RES ~ > CAT01+s(NUM01,5)+CAT02+CAT03+s(NUM02,5)+CAT04+ + CAT05+s(NUM03,5)+CAT06+CAT07+s(NUM04,5)+CAT08+s(NUM05,5)+CAT09+ +
2016 Jul 07
2
Red Neuronal complicada categorías
Estimados Les consulto por redes neuronales, hay diversos artículos como los siguientes (el último tienen un error actualmente). Pero mi pregunta va un poco por otro lado. http://www.r-bloggers.com/build-your-own-neural-network-classifier-in-r/ http://www.r-bloggers.com/classification-using-neural-net-in-r/ Básicamente se puede calcular un valor, por ejemplo doblar 2,4 grados a la derecha, luego 1
2005 Jun 08
1
A question about lars
Hi, I am trying to use lars on my data. After getting the model and did the prediction, I compare the predicted value and the coefficients and it seems like there should be a constant term in the model. I have gone through the documentation of the lars package and I can't seem to find how to get this piece of information from the lars object. Can somebody help me? Thanks a lot! Mark
2007 Jan 06
0
has anyone implemented LARS with the "positive lasso"?
Hi, I am interested in a modification to LARS that allows for positive-only constraints in the variables (with details about how to implement this as described in section 3.4 of the Efron et al (2003) LARS paper). Before I dive into the "lars" package code myself, I was wondering if anyone knew of a version where this is available, or if another package that I have not found can do
2005 Jan 22
0
questions with library lars()
hello, I have the following questions with the R package lars(). I would really appreciate som help here. 1. do I have to standardize the predictors and the response? 2. the function cv.lars(): how can I specify it is for lasso not stagewise or lars? your help will be really appreciated. thanks,
2007 Sep 20
0
Problem with lars
Hi! Ok, probably my last mail was too long. Questions are: * Did someone try lars on data with much more components than data points? Did you observe bad overfitting, too? Any other observations? * Why might the lars (least angle regression from lars package) method produce beta values that shoot up into the sky (until they overflow), and why might the Cp values start at a _negative_