Displaying 20 results from an estimated 10000 matches similar to: "followup: Re: Issue with predict() for glm models"
2004 Sep 22
5
Issue with predict() for glm models
[This email is either empty or too large to be displayed at this time]
2010 Feb 28
1
Gradient Boosting Trees with correlated predictors in gbm
Dear R users,
I’m trying to understand how correlated predictors impact the Relative
Importance measure in Stochastic Boosting Trees (J. Friedman). As Friedman
described “ …with single decision trees (referring to Brieman’s CART
algorithm), the relative importance measure is augmented by a strategy
involving surrogate splits intended to uncover the masking of influential
variables by others
2013 Jun 22
0
Sparse Matrices and glmnet
Dear All,
I am not going to discuss in detail the implementation of a model, but I
am rather puzzled because, even if I manage to train a model, then I do
not succeed in applying it to some test data.
I am sure I am making some trivial mistake, but so far I have been banging
my head against the floor.
When I run the following code
###############################################
2008 Nov 11
1
simulate data with binary outcome and correlated predictors
Hi,
I would like to simulate data with a binary outcome and a set of predictors that are correlated. I want to be able to fix the number of event (Y=1) vs. non-event (Y=0). Thus, I fix this and then simulate the predictors. I have 2 questions:
1. When the predictors are continuous, I can use mvrnorm(). However, if I have continuous, ordinal and binary predictors, I'm not sure how to simulate
2010 Jul 30
1
hi! l have a question please help me
1)
dmatrix1<-function(n,p,rho,sigma,k){
muvec1=zeros(1,p)
truep<-as.matrix(c(3,1.5,0,0,2,0,0,0))
A=eye(p)
for(i in 1:p){
for(j in 1:p){
A[i,j]=rho^(abs(i-j))
X=mvrnorm(n,muvec1,A)
y=X%*%truep+as.matrix(rnorm(n,0,sigma))
Y=X[1:k,]
w=y[1:k]
Z=X[(k+1):n,]
z=y[(k+1):n]}}
return(list(X,Y,w,Z,z))
}
I made this code which performs
2012 Jan 10
1
grplasso
I want to use the grplasso package on a data set where I want to fit a linear
model.? My interest is in identifying significant?beta coefficients.? The
documentation is a bit cryptic so I'd appreciate some help.
?
I know this is a strategy for large numbers of variables but consider a simple
case for pedagogical puposes.? Say I have?two 3 category predictors (2 dummies
each), a binary
2012 Mar 21
2
glmnet: obtain predictions using predict and also by extracting coefficients
All,
For my understanding, I wanted to see if I can get glmnet predictions
using both the predict function and also by multiplying coefficients
by the variable matrix. This is not worked out. Could anyone suggest
where I am going wrong?
I understand that I may not have the mean/intercept correct, but the
scaling is also off, which suggests a bigger mistake.
Thanks for your help.
Juliet Hannah
2009 Feb 19
1
Bug in predict function for naiveBayes?
Dear all,
I tried a simple naive Bayes classification on an artificial dataset, but I
have troubles getting the predict function to work with the type="class"
specification. With type= "raw", it works perfectly, but with type="class" I
get following error :
Error in as.vector(x, mode) : invalid 'mode' argument
Data : mixture.train is a training set with 100
2007 May 09
1
predict.tree
I have a classification tree model similar to the following (slightly
simplified here):
> treemod<-tree(y~x)
where y is a factor and x is a matrix of numeric predictors. They have
dimensions:
> length(y)
[1] 1163
> dim(x)
[1] 1163 75
I?ve evaluated the tree model and am happy with the fit. I also have a
matrix of cases that I want to use the tree model to classify. Call it
2008 Jun 26
2
constructing arbitrary (positive definite) covariance matrix
Dear list,
I am trying to use the 'mvrnorm' function from the MASS package for
simulating multivariate Gaussian data with given covariance matrix.
The diagonal elements of my covariance matrix should be the same,
i.e., all variables have the same marginal variance. Also all
correlations between all pair of variables should be identical, but
could be any value in [-1,1]. The problem I am
2012 Dec 02
0
[LLVMdev] GetElementPtrInst question
Hi,
You'd use an IRBuilder, like you did to create your LoadInsts.
IRBuilder<> IRB(BB);
IRB.CreateGEP(myreg1, myreg2);
I assume because you asked this question, something went wrong when using the above method. What was it? :)
Cheers,
James
________________________________________
From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] On Behalf Of Eduardo [erocha.ssa
2003 Dec 05
3
Odds ratios for categorical variable
Dear R-users:
How does one calculate in R the odds ratios for a CATEGORICAL predictor
variable that has 4 levels. I see r-help inquiries regarding odds ratios
for what looked like a continuous predictor variable. I was wondering how
to get the pairwise odds ratios for comparisons of levels of a categorical
predictor variable. I can't seem to get the correct output using:
>
2011 Feb 12
2
Predictions with missing inputs
Dear users,
I'll appreciate your help with this (hopefully) simple problem.
I have a model object which was fitted to inputs X1, X2, X3. Now, I'd like
to use this object to make predictions on a new data set where only X1 and
X2 are available (just use the estimated coefficients for these variables in
making predictions and ignoring the coefficient on X3). Here's my attempt
but, of
2012 Dec 02
3
[LLVMdev] GetElementPtrInst question
Hi all,
How can I create an llvm::GetElementPtrInst in which the pointer and
the index are in registers previously loaded with llvm::LoadInst ? I
mean, the generated instruction will be like this:
%1 = getelementptr i8* %myreg1, i32 %myreg2
here, %myreg1 and %myreg2 are previously created by load instructions
(llvm::LoadInst).
Please, let me know if there is an example of something similar.
2013 May 02
0
Questions regarding use of predict() with glmpath
I'm trying to do LASSO in R with the package glmpath. However, I'm not sure
if I am using the accompanying prediction function *predict.glmpath()*
correctly.
Suppose I fit some regularized binomial regression model like so:
library(glmpath);load(heart.data);attach(heart.data);
fit <- glmpath(x, y, family=binomial)
Then I can use predict.glmpath() to estimate the value of the
2009 Sep 01
1
understanding the output from gls
I'd like to compare two models which were fitted using gls, however I'm
having trouble interpreting the results of gls. If any of you could offer
me some advice, I'd greatly appreciate it.
Short explanation of models: These two models have the same fixed-effects
structure (two independent, linear effects), and differ only in that the
second model includes a corExp structure for
2012 Dec 02
1
[LLVMdev] GetElementPtrInst question
Hi James,
Thanks for your quick reply.
> I assume because you asked this question, something went wrong when using the above method. What was it? :)
No, I am not using this method. I was trying to create a
llvm::GetElementPtrInst . I didn't create IRBuilder. I am writing a
ModulePass that insert new instruction to an existing Module.
Besides, how can you get a reference to myreg1 ?
2011 May 07
1
generate multiple mvrnorm samples using apply-like
I want to generate multiple multivariate normal samples with different
mean vectors
and common covariance matrix.
I can do this with a loop, but can't quite figure out how to do it with
apply and friends.
In the example below, I want values to have 3 columns: group, x, y
# number of groups, and group means
x <- jitter(seq(2,10,by=2))
y <- x + rnorm(length(x), 0, .5)
means <-
2008 Oct 23
0
error when using logistic.display within a loop
Dear list,
I tried to apply the logistic regression to different response variables from a dataframe and would like to store the results using the function logistic.display from the "epicalc" package in a list, but got an error message "Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1". All the response variables have value of 0 or 1. It worked
2016 Jul 17
2
Muestrear de una normal multivariante.-
¡Hola a todos!
Estoy intentando muestrear de una normal multivariante donde hay dos grupos
de variables que deben tener una relación "manipulable" entre sí pero
ignoro cómo hacerlo.
Les cuento, he intentado lo siguiente:
# covarianzas del primer grupo de variables:
Sigma_U <- matrix(c(.25, .2, .2, .25), ncol=2)
# covarianzas del segundo grupo de variables:
Sigma_W <- diag(2)
#