Displaying 20 results from an estimated 10000 matches similar to: "Predictions with 'missing' variables"
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
2014 Jul 05
1
Predictions from "coxph" or "cph" objects
Dear R users,
My apologies for the simple question, as I'm starting to learn the concepts
behind the Cox PH model. I was just experimenting with the survival and rms
packages for this.
I'm simply trying to obtain the expected survival time (as opposed to the
probability of survival at a given time t). I can't seem to find an option
from the "type" argument in the predict
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2017 Sep 21
0
Add wrapper to Shiny in R package
Dear Axel,
I've used environment for such problems.
assign("xs", xs, envir = my.env) in the myApp function
get("xs", envir = my.env) in the server function
Best regards,
ir. Thierry Onkelinx
Statisticus/ Statiscian
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie &
2017 Sep 21
1
Add wrapper to Shiny in R package
Thank you Thierry. I'm trying to following your suggestion in the example
below, but getting:
Error in get("xs", envir = my.env) : object 'my.env' not found.
library(shiny)
library(shinydashboard)
myApp <- function(x, ...) {
xs <- scale(x)
my.env <- new.env()
assign("xs", xs, envir = my.env)
shiny::runApp(app)
}
app = shinyApp(
ui =
2010 Sep 19
2
working with eval and environments
I'm trying to get the following section of code to work, I think the problem
is being caused by the assignment of data to the lm function not evaluating
to "train" in the parent environment but I can't seem to figure out how to
do this.
fitmodel <- function(trial,data)
{
wrap.lm <- function(formula,data,...) { cat("in wrap lm",NROW(data),"\n");
2014 Jan 18
6
My first package
Hi All,
I'm planning to submit my first package to R, and although I read all the
documentation, I'm not very clear on the following 2 items, from which I'd
appreciate your guidance:
1)I understand it is suggested to use the R dev version to build the
package. Which one specifically should I use to build a package on a Mac
OS? How about package dependencies, which version should I
2011 Feb 26
2
Reproducibility issue in gbm (32 vs 64 bit)
Dear List,
The gbm package on Win 7 produces different results for the
relative importance of input variables in R 32-bit relative to R 64-bit. Any
idea why? Any idea which one is correct?
Based on this example, it looks like the relative importance of 2 perfectly
correlated predictors is "diluted" by half in 32-bit, whereas in 64-bit, one
of these predictors gets all the importance
2013 Feb 10
3
Constrained Optimization in R (alabama)
Dear List,
I'm trying to solve this simple optimization problem in R. The parameters
are the exponents to the matrix mm. The constraints specify that each row
of the parameter matrix should sum to 1 and their product to 0. I don't
understand why the constraints are not satisfied at the solution. I must be
misinterpreting how to specify the constrains somehow.
library(alabama)
ff <-
2011 Mar 20
4
predicting values from multiple regression
Hey List,
I did a multiple regression and my final model looks as follows:
model9<-lm(calP ~ nsP + I(st^2) + distPr + I(distPr^2))
Now I tried to predict the values for calP from this model using the
following function:
xv<-seq(0,89,by=1)
yv<-predict(model9,list(distPr=xv,st=xv,nsP=xv))
The predicted values are however strange. Now I do not know weather
just the model does not fit
2010 Feb 21
4
R on 64-Bit…
Dear R users,
I know this issue came up in the list several times. I’m currently running
R on 32-bit on Windows and due to memory limitation problems would like to
move to a 64-bit environment. I’m exploring my options and would appreciate
your expertise:
1) Windows 64-bit: Prof. Brian Ripley recently posted the experimental
built of R for win 64-bit. I’ll appreciate any feedback on
2011 Aug 22
3
automatic file input
Dear all,
I have 100 files which are used as input.and I have to input the name of my files again and again.the name of the files are 1.out, 2.out......100.out.
I want to know if there is anything like perl so that i can use something like this-
for($f = 1; $f <= 100; $f++) {
$file = $f.".out";
I have tried this thing in R but it does not work.Can somebody please help me.
2011 Feb 11
6
linear models with factors
i am trying to fit a linear model with both continuous covariates and
factors. When fitted with the intercept
term the first level of the factor is treated by R as intercept and the
estimate of the effects of remaining levels(say i th level) are given as
true estimate of i th level - estimate of 1st level.can any please help me?
thanks in advance.....
--
View this message in context:
2017 Sep 21
3
Add wrapper to Shiny in R package
Dear List,
I'm trying to add a function that calls a Shiny App in my R package. The
issue is that within my function, I'm creating objects that I'd like to
pass to the app. For instance, from the example below, I'm getting
"Error: object
'xs' not found". How can I pass "xs" explicitly to shinyApp()?
*Under R directory:*
myApp <- function(x, ...) {
2017 Sep 08
2
quote()/eval() question
Dear list,
For a reason it would take me long to explain, I need to do something along
the lines of what's shown below -- i.e., create an object from
dplyr::summarise, and then evaluate it on a data frame.
I know I could directly do:
df %>% dplyr::summarise(x1_mean = mean(x1))
but this is not what I'm looking for.
library(dplyr)
df <- data.frame(x1 = rnorm(100), x2 =
2011 Mar 17
2
Help with Time Series Plot
Dear List,
This is an embarrassing question, but I can seem to make this work…How do I
change the font size on the xlab and on the numbers shown in the x-axis on
the time series plot below. The arguments cex.lab and cex.axis do not seem
to be 'passing' to the plot function.
plot(ts(rnorm(100), start=2004, freq=12),
ylab="RQI", xlab="My X lab",
2011 Jul 25
4
ggplot question: changing the label for the Y axis on a histogram
Some help with how to re-label the vertical axis in a histogram would be appreciated.
qplot(off.sc,weight=rel.freq,binwidth=.29,main="test Figure"+ylab("New from inside"))+ylab("New from outside")+
xlab("off.sc\nAggregated frequency plots for 17 equal intervals.")
The code
2010 Mar 14
7
R on Linux - a primer
Hi,
I'm looking to move from Windows into a 64-bit Linux environment. Which is
the best Linux Flavor to use within R? To install R on this environment, do
I need to do any compiling?
Thanks all!
Axel.
[[alternative HTML version deleted]]
2011 Mar 11
4
Any existing functions for reading and extracting data from path names?
Hi helpeRs,
I have inherited a set of data files that use the file system as a
sort of poor man's database, i.e., the data files are nested in
directories that indicate which city they come from. For example:
dir.create("deleteme")
for(i in paste("deleteme", c("New York", "Los Angeles"), sep="/")) {
dir.create(i)
for(j in