similar to: Probit regression with limited parameter space

Displaying 20 results from an estimated 2000 matches similar to: "Probit regression with limited parameter space"

2010 Oct 01
1
Place constrictions on parameters when using Optim and MaxLik
Hi R users, I am trying to restrct the range of two of the parameters in a maximization problem. Both parameters should be between -1 and 1. As far as I know, if I choose the estimation method ="L-BFGS-B" under Optim, I can restrict the parameter space. However, the "L-BFGS-B" always require finite values of the loglik function and cannot get around of the problem if an
2007 Nov 15
3
not R question : alternative to logistic regression
I was just curious if anyone knew of an alternative model to logistic regression where the probabilities seems pretty linear to the predictor rather than having that S shape that probit and logit assume. Maybe there is there some kind of other GLM that could accomplish that. Any textbook references or suggestions are appreciated. I have most of the texts but if someone knows of a text that talks
2010 Oct 15
1
Problem using BRugs
Hi R users, I am trying to call openbugs from R. And I got the following error message: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ model is syntactically correct expected the collection operator c error pos 8 (error on line 1) variable ww is not defined in model or in data set [1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt"
2012 Oct 11
2
model selection with spg and AIC (or, convert list to fitted model object)
Dear R Help, I have two nested negative log-likelihood functions that I am optimizing with the spg function [BB package]. I would like to perform model selection on these two objective functions using AIC (and possibly anova() too). However, the spg() function returns a list and I need a fitted model object for AIC(), ICtab() [bbmle package], or anova(). How can I perform AIC-based model
2010 Sep 14
2
Can I monitor the iterative/convergence process while using Optim or MaxLik?
Hi R-helpers, Is it possible that I have the estimates from each step/iteration shown on the computer screen in order to monitor the process while I am using Optim or MaxLik? Thanks for your help. Maomao [[alternative HTML version deleted]]
2005 Jul 25
5
passing formula arguments cv.glm
I am trying to write a wrapper for the last example in help(cv.glm) that deals with leave-one-out-cross-validation (LOOCV) for a logistic model. This wrapper will be used as part of a bigger program. Here is my wrapper funtion : logistic.LOOCV.err <- function( formu=NULL, data=NULL ){ cost.fn <- function(cl, pred) mean( abs(cl-pred) > 0.5 ) glmfit <- glm(
2011 Mar 20
3
How to draw a map of Europe?
Hi R users, I need to draw a map of select European countries with country names shown on the map. Does anyone know how to do this in R? Also, is it possible to draw a historical map of European countries using R? Thanks a lot for your help. Maomao [[alternative HTML version deleted]]
2012 Jun 19
1
Error when trying to update cpglm model
Dear all, I've been having problems running update() to re-fit a cpglm model inside a function (as in the code below). The solution is probably simple, but I'm stuck. If anyone could help, I'd greatly appreciate it. Regards, Rubem ## R code library(cplm) ## Data simulation period<-factor(1:4)                        herd<-factor(1:50)  
2010 Jan 10
1
scatterplot matrix with ggplot2
#I would like to use the below data to make a scatter plot matrix with #code similar to that below the data #conceptually this is the right approach I think #thanks in advance melt.gg <- structure(list(stream = c("Bonham Lower", "Bonham Lower", "Bonham Lower", "Bonham Lower", "Bonham Lower", "Bonham Lower", "Bonham Lower",
2003 Apr 02
19
Combining the components of a character vector
Dear Help, Suppose I have a character vector. x <- c("Bob", "loves", "Sally") I want to combine it into a single string: "Bob loves Sally" . paste(x) yields: paste(x) [1] "Bob" "loves" "Sally" The following function combines the character vector into a string in the way that I want, but it seems somewhat inelegant.
2009 Mar 11
3
Converting a dataframe to a matrix
If I have a dataframe which is organized like this: name color likes? 1 sally red 0 2 sally blue 1 3 sally green 1 4 jake red 0 5 jake blue 1 6 jake green 1 7 tom red 1 8 tom blue 0 9 tom green 0 And I want to create a matrix in the form: red blue green sally 0 1 1 jake 0 1 1 tom 1 0 0 Are there any built-in
2009 Feb 01
2
Extracting Coefficients and Such from mle2 Output
The mle2 function (bbmle library) gives an example something like the following in its help page. How do I access the coefficients, standard errors, etc in the summary of "a"? > x <- 0:10 > y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) > LL <- function(ymax=15, xhalf=6) + -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) > a <- mle2(LL,
2016 Apr 20
2
Data reshaping with conditions
Dear All, I am trying to reshape the data with some conditions. A small part of the data looks like below. Like this there will be more data with repeating ID. Count id name type 117 335 sally A 19 335 sally A 167 335 sally B 18 340 susan A 56 340 susan A 22 340 susan B 53 340 susan B 135 351 lee A 114 351 lee A 84 351 lee A 80 351 lee A 19 351 lee A 8 351 lee A 21 351 lee A 88 351 lee B 111 351
2016 Apr 20
0
Data reshaping with conditions
Hi sri, As your problem involves a few logical steps, I found it easier to approach it in a stepwise way. Perhaps there are more elegant ways to accomplish this. svdat<-read.table(text="Count id name type 117 335 sally A 19 335 sally A 167 335 sally B 18 340 susan A 56 340 susan A 22 340 susan B 53 340 susan B 135 351 lee A 114 351 lee A 84 351 lee A 80 351 lee A 19 351 lee A 8 351 lee A
2010 Jul 31
3
Installing iTunes on Linux Mint Isadora 9
Hi all, I have downloaded the latest version of wine in order to run iTunes but when I tried to execute the program here is what I get : cd /home/sally/Documents $ wine iTunes64Setup.exe Trying to load PE image for unsupported architecture (AMD-64) err:process:create_process starting 64-bit process L"Z:\\home\\sally\\Documents\\iTunes64Setup.exe" not supported on this platform wine:
2011 Dec 01
1
Estimation of AR(1) Model with Markov Switching
Dear R users, I have been trying to obtain the MLE of the following model state 0: y_t = 2 + 0.5 * y_{t-1} + e_t state 1: y_t = 0.5 + 0.9 * y_{t-1} + e_t where e_t ~ iidN(0,1) transition probability between states is 0.2 I've generated some fake data and tried to estimate the parameters using the constrOptim() function but I can't get sensible answers using it. I've tried using
2009 Nov 23
4
Check if string has all alphabets or numbers
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/470946bc/attachment-0001.pl>
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam, I'm having trouble de-bugging the following - which works perfectly well with optim or optimx - but not with mle2. I'd be really grateful if someone could show me what is wrong. Many thanks in advance. JSC: gompertz<- function (x,t=data) { a3<-x[1] b3<-x[2] shift<-data[1] h.t<-a3*exp(b3*(t-shift))
2008 Jul 21
1
Control parameter of the optim( ): parscale
Hi everybody, I am using the L-BFGS-B method of the mle2() function to estimate the values of 6 parameters. mle2 uses the methods implemented in optim. As I got it from the descriptions available online, one can use the parscale parameter to tell R somehow what the values of the estimated parameters should be . . . Could somebody please help me understand what one has to do actually with the
2016 Apr 21
2
Data reshaping with conditions
Hi Jim, Thanks for your time. But somehow this code did not help me to achieve my expected output. Problems: 1) x, y are coming as logical rather than values as I mentioned in my post 2) The values that I get for Max A and Max B not correct 3) It looks like a pretty big data, but I just need to concatenate the values with a comma, the final output will be a character