similar to: Plotting every probability curve

Displaying 20 results from an estimated 100 matches similar to: "Plotting every probability curve"

2012 Oct 15
0
Error message with the effects package - 'Subscript out of bounds'
I am using the effects package to construct some probability graphs showing the predicted probabilities from a logistic regression model. However, I get an odd error message and don't know what the issue is. When I attempt to generate the plots, I get the following error: dat$won_ping = as.factor(dat$won_ping) mod2 = glm(won_ping ~ our_bid + age_of_oldest_driver2 + credit_type2 +
2012 Jul 05
2
Plotting the probability curve from a logit model with 10 predictors
I have a logit model with about 10 predictors and I am trying to plot the probability curve for the model. Y=1 = 1 / 1+e^-z where z=B0 + B1X1 + ... + BnXi If the model had only one predictor, I know to do something like below. mod1 = glm(factor(won) ~ as.numeric(bid), data=mydat, family=binomial(link="logit")) all.x <- expand.grid(won=unique(won), bid=unique(bid)) y.hat.new
2010 Nov 15
3
How to plot effect of x1 while controlling for x2
Hello R-helpers, Please see a self-contained example below, in which I attempt to plot the effect of x1 on y, while controlling for x2. Is there a function that does the same thing, without having to specify that x2 should be held at its mean value? It works fine for this simple example, but might be cumbersome if the model was more complex (e.g., lots of x variables, and/or interactions). Many
2010 Nov 20
1
How to produce a graph of glms in R?
I'm very new to R and modeling but need some help with visualization of glms. I'd like to make a graph of my glms to visualize the different effects of different parameters. I've got a binary response variable (bird sightings) and use binomial glms. The 'main' response variable is a measure of distance to a track and the parameters I'm testing for are vegetation
2012 Oct 03
1
How to draw a graph after model selection?
I am very new to R and I basically used SPSS to do my model selection, which I had used generalized linear model. So my best model is P= D + T + L + T*L and there is a parameters table from the SPSS output which I suppose I have to use the coefficients (column B) in the table (as attached) when I draw my graph in R. I want to draw a graph in R which x-axis is D, using the model and the relevant
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
2007 Aug 16
0
No subject
class users_noc inherits users_all_virt { realize ( Users_account["user1"], Users_account["user2"], Users_account["admin1"], Users_account["admin2"], Users_account["admin3"], ) } class users_all_virt { $homefs = "/home" file { $homefs: ensure => directory, owner
2010 Oct 13
2
drilling down data on charts
Hey all, Suppose a=b^2 for starters. I want to be able to create a graph that displays a initially and if i was to click on 'a' to show 'b' on the chart itself. Does anyone know if this is possible in R? Also as an extension (not necessary as yet) to output the above into a 'html' file. Thanks, Sachin --- Please consider the environment before printing this email ---
2013 Feb 13
2
Need Help Plotting "Line" for multiple linear regression
Hello, My name is Craig and I need help plotting a "line" for a multiple linear regression in R. Here is my sample data (filename: convis.txt) Output of convis.txt is (vis and density being predictors of either avoidance or entrance): vis den avoid entrance 1 10 1 0.0000 0.0000 2 10 3 0.8750 0.0000 3 8 3 0.8180 0.0300 4 8 3 0.6670 0.0667 5 8 1
2007 Aug 22
12
Virtual resource not found
Hi All, I asked on IRC but didn''t have everything organized and most people seemed busy. Hoping someone can see what I''m missing here. I''m trying to create a network module, used similar to the ''users'' configuration described in the Best Practices document. I have a users module which has that and it works with similar syntax to below. If I
2007 Mar 16
0
HOWTO: Overcoming home directory''s dependency on owner element when disabling user accounts
Background info: https://reductivelabs.com/trac/puppet/ticket/549 Here''s how I''m working around the issue now... case $ensure { present: { $home_owner = $name $home_group = $name } default: { $home_owner = "root" $home_group =
2012 Aug 13
3
Using the effects package to plot logit probabilities
I'm trying to run a logit model and plot the probability curve for a number of the important predictors. I'm trying to do this with the Effects package. df=data.frame(income=c(5,5,3,3,6,5), won=c(0,0,1,1,1,0), age=c(18,18,23,50,19,39), home=c(0,0,1,0,0,1)) str(df) md1 = glm(factor(won) ~ income + age + home, data=df,
2012 Jul 19
3
Removing values from a string
So I have the following data frame and I want to know how I can remove all "NA" values from each string, and also remove all "|" values from the START of the string. So they should something like "auto|insurance" or "auto|insurance|quote" one = data.frame(keyword=c("|auto", "NA|auto|insurance|quote", "NA|auto|insurance",
2011 Dec 22
1
Error message with glm
I'm working on a logistic regression in R with the car package but keep getting the following error message. It's only and warning and not an error, but I'm just not sure how to resolve the issues. glm.fit: algorithm did not converge glm.fit: fitted probabilities numerically 0 or 1 occurred d1 = data.frame(mwin=c(mwin), mbid=c(mbid)) m1 = zelig(mwin ~ mbid, data=d1,
2011 Dec 21
1
Predicting a linear model for all combinations
Lets say I have a linear model and I want to find the average expented value of the dependent variable. So let's assume that I'm studying the price I pay for coffee. Price = B0 + B1(weather) + B2(gender) + ... What I'm trying to find is the predicted price for every possible combination of values in the independent variables. So Expected price when: weather=1, gender=male weather=1,
2012 Feb 09
1
Grouping together a time variable
I have the following variable, time, which is a character variable and it's structured as follows. > head(as.character(dat$time), 30) [1] "00:00:01" "00:00:16" "00:00:24" "00:00:25" "00:00:25" "00:00:40" "00:01:50" "00:01:54" "00:02:33" "00:02:43" "00:03:22" [12]
2012 Aug 02
1
Naive Bayes in R
I'm developing a naive bayes in R. I have the following data and am trying to predict on returned (class). dat = data.frame(home=c(0,1,1,0,0), gender=c("M","M","F","M","F"), returned=c(0,0,1,1,0)) str(dat) dat$home <- as.factor(dat$home) dat$returned <- as.factor(dat$returned) library(e1071) m <- naiveBayes(returned ~ ., dat) m
2012 Aug 08
1
Calculating percentages across multiple columns
I have the following data and am trying to find the percentage of bid values purchased for that price. So let's say I have a bid of 5 and it's sold 2 times for $3 and $5. Since the original bid was $5, the percentage of times that that bid value results in a sold purchase AT that specific bid level was 1/3 because of the three time where the bid was three, it ended up being sold for $5
2011 Dec 16
1
Zellig Error Message
I'm trying to calculate predicted probabilities in R with Zelig and keep getting the following error. Can anyone help? > x.low <- setx(mod, type=1)Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : incorrect number of dimensions When I ran the model, I ran everything but the explanatory variable as a numeric variable. Now, I'm trying everything and no
2012 Sep 26
1
Specifying a response variable in a Bayesian network
I'm trying to teach myself about Bayesian Networks and am working with the following data and the bnlearn package. I understand the conceptual aspects of BNs, but I'm not sure how to specify the response variables in R when constructing a dag plot. I've cecked ?hc and done numerous google searches without luck. Can anyone help? library("bnlearn")