similar to: Using predicted() in R

Displaying 20 results from an estimated 10000 matches similar to: "Using predicted() in R"

2006 Sep 14
2
Adding predicted values as a new variable in a data frame
I am running a regression: ols.reg1 <- lm(y ~ x1 + x2 + x3 + x4) on a data.frame and then generating fitted values: y.hat <- ols.reg1$fitted.values Then I would like to add these fitted values to the data.frame as a new variable. The problem is that when the values are predicted the resulting output has too few rows. for some reason certian observations do not get predicted values. So
2009 Feb 14
2
superscript
Dear R-users. I'm struggeling to fix the superscript of a label of a figure axis. For some reason R doesn't recognize the "hat" symbol. plot(1,1,xlab="ligth intensity (PAR)",ylab=expression("mass Pteridium rhizomes" (gr/0.25m^2))) A very similiar scriptline does not give any problem at all: plot(1,1,xlab=expression("balsa plot basal
2008 Sep 09
2
How does predict.lm work?
Hi, Please could someone explain how this element of predict.lm works? From the help file ` newdata An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. ' Does this dataframe (newdata) need to have the same variable names as was used in the original data frame used to fit the model? Or will R just look across consecutive
2011 Jul 19
3
How to get predicted values of y for different x values?
Here is my model with interaction terms and control variables (I changed variables names for easy read): reg1 <- lm(y ~ x1*x2*x3 +control1 + control2 + control3) x1 ranges from 0 to 6; x2 from 0 to 5; and x3 from 0 to 4. All three are discrete ordinal variables; but I will treat them as continuous variables. (a) How can I see the predicted values of y for each of these scenarios (210
2014 Nov 05
2
setvcpus libvirt 1.2.9
Hello. I'm struggeling a little bit with the setvcpus command. I'm trying now to get this running for a linux VM. Here is what i have: <vcpu placement='auto' current='2'>4</vcpu> Now the VM is starting with 2 CPUs. When i try to increase the number of CPUs i get: setvcpus dev --guest 4 error: invalid argument: requested vcpu count is greater than the count
2014 Nov 05
2
Re: setvcpus libvirt 1.2.9
Am 05.11.14 11:48, schrieb Martin Kletzander: > On Wed, Nov 05, 2014 at 11:35:37AM +0100, Thomas Stein wrote: >>Hello. >> >>I'm struggeling a little bit with the setvcpus command. I'm trying now >>to get this running for a linux VM. Here is what i have: >> >> <vcpu placement='auto' current='2'>4</vcpu> >> >>Now
2003 Aug 07
2
Strange predicted values ?
Hello I carried out a logistic regression and found predicted values. Then I want to see both predictors (var1,var2..) and predicted values in same matrix. In other words, I need to know each combinations and predicted values. I used: cbind(var1,var2,var3,var4,predict(glm.obj,type="resp")) I got a somewhat strange result: var1 var2 var3 var4 var5 var6 predicted vals ------
2010 Jul 02
1
xyplot: key inside the plot region / lme: confidence bands for predicted
I have two questions related to plotting predicted values for a linear mixed model using xyplot: 1: With a groups= argument, I can't seem to get the key to appear inside the xyplot. (I have the Lattice book, but don't find an example that actually does this.) 2: With lme(), how can I generate confidence bands or prediction intervals around the fitted values? Once I get them, I'd
2012 May 03
1
overlapping confidence bands for predicted probabilities from a logistic model
Dear list, I'm a bit perplexed why the 95% confidence bands for the predicted probabilities for units where x=0 and x=1 overlap in the following instance. I've simulated binary data to which I've then fitted a simple logistic regression model, with one covariate, and the coefficient on x is statistically significant at the 0.05 level. I've then used two different methods to
2007 May 18
1
A programming question
Dear Friends, My problem is related to how to measure probabilities from a probit model by changing one independent variable keeping the others constant. A simple toy example is like this Range for my variables is defined as follows y=0 or 1, x1 = -10 to 10, x2=-40 to 100, x3 = -5 to 5 Model output <- glim(y ~ x1+x2+x3 -1, family=binomial(link="probit")) outcoef <-
2006 Jul 21
1
Passing a variable between methods
Hi, I am trying to add search functionality to may application. I am struggeling to pass my query to the controller and then show all my search results in another view. How would I do this? Model: class Advert < ActiveRecord::Base belongs_to :user def self.search(query) if !query.to_s.strip.empty? tokens = query.split.collect {|c| "%#{c.downcase}%"}
2006 May 17
1
Combining Vectors
Hi, I'm a new R user, and struggeling with the basics (...sigh) I would like to combine 2 vectors : d1: "S1" "S2" "S3" "S4" 1 3 5 6 and d2: "S1" "S3" "S5" 3 3 2 to give a result: "S1" "S2" "S3" "S4" "S5" 1
2005 Jul 27
1
Zaptel error: Unable to create channel op type 'Zap'
Hi, In struggeling with this problem for a two weeks now. I have a X100P clone card in my * box but I'm not able to get it to run. I'm running fedora core 3 with kernel 2.6.12-1.1372_FC3 on a VIA EPIAML500EA The compiling of both zaptel and asterisk went without any errors. I can run zaptel and asterisk without any errors. When I run ztcfg I don't get any errors too. But when I try
2009 Feb 04
0
Generic functions with models? 'predict', 'residuals', 'fitted', ...?
Hi WizaRds! I don't know if my understanding of models is screwed up or if there's a fundamental limitation to the way they are used in R. Here's what I'd like to do: create a model and then test data against that model using generics like 'predict' and 'residuals'. The problem is that generics don't work for new data sets, except of course 'predict':
2001 Sep 15
1
Command-line history not working...
I am trying to build [R] v1.3.1 *locally* on a Sun Solaris 8 machine. One problem I am currently struggeling with is to make the command-line history function to work. I have installed GNU readline version 4.2 (latest version). Looking at the "config.log" file it seems that all readline related checks, e.g. "readline/history.h", passes (they did not before installing GNU
2003 Apr 14
1
Printer setup -- How-to??
Hi. I've just installed Samba 2.2.8 (SuSE Linux 8.0). My clients are running Win2000 Pro. I'm struggeling with the printer setup. Could anybody route me to an detailed step-by-step guide on how to do this right OR maybe explain it to me? What I have is this: ------------------- [print$] comment = Printers ... path = /home/ANDROMEDA/printers write list =
2014 Nov 05
1
Re: setvcpus libvirt 1.2.9
Am 05.11.14 14:48, schrieb Eric Blake: > On 11/05/2014 01:20 PM, Thomas Stein wrote: >> Am 05.11.14 11:48, schrieb Martin Kletzander: >>> On Wed, Nov 05, 2014 at 11:35:37AM +0100, Thomas Stein wrote: >>>> Hello. >>>> >>>> I'm struggeling a little bit with the setvcpus command. I'm trying now >>>> to get this running for a
2010 Sep 26
1
formatting data for predict()
I'm trying to get predicted probabilities out of a regression model, but am having trouble with the "newdata" option in the predict() function. Suppose I have a model with two independent variables, like this: y=rbinom(100, 1, .3) x1=rbinom(100, 1, .5) x2=rnorm(100, 3, 2) mod=glm(y ~ x1 + x2, family=binomial) I can then get the predicted probabilities for the two values of
2006 Jan 25
2
Help with sip setup because can't receive calls
Hi all, I read many posts on asterisk mail site and been trying many different things but still I can't get my sip phones to work with asterisk. I have a full blown-up voip netwok with two asterisk servers connected to pstn network with iax phones and cisco sccp phones which all work fine. however, I have been struggeling to configure my sip phones (polycom 601, Aastra 480i and cisco
2008 Dec 02
0
predicted probabilities after lmer
Dear R-users, I'm using lmer to fit two-level logistic models and I'm interested in predicted probabilities that I get in this way (using "fitted"): glm1 = lmer(XY$T1~X1 + X2 + X3 + (1|Cind), family=binomial) #estimation of a two-level logit model fit1=fitted(glm1) # I get the fitted linear predictor ilog = function(x) { 1/(1 + exp(-x)) } ps1=ilog(fit1) # In