Displaying 20 results from an estimated 1000 matches similar to: "fitting in logistic model"
2011 Dec 13
8
How to compute 95%CI for OR from logistic regression?
Hi all:
My data has 3 variables:
age(3levels : <30y=1 30-50y=2, >50y=3)
gender(Male=0, Female=1)
CD4 cell count(raw lab measurement)
y(1:death 0:alive)
I perform logistic regression to find out the factors that influence y.
result<-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)
>From the result,I can get OR(Odds Ratio) of gender via exp(Estimate of Female,
2006 Mar 23
2
clogit question
Hi,
I am playing with
clogit(case~spontaneous+induced+strata(stratum),data=infert)
from clogit help file.
This line works.
1. But, why strata(stratum) doesn't have a coefficient like spontaneous
and induced?
2. When I remove strata(stratum) from the command, this function seems
to keep running forever. Why?
3. I think the equation for clogit looks like
P=1/(1+
2011 May 24
2
Apply or Tapply to Build Set of Tables
Dear R Helpers,
First, I apologize for asking for help on the first of my topics. I have
been looking at the posts and pages for apply, tapply etc, and I know that
the solution to this must be ridiculously easy, but I just can't seem to
get my brain around it. If I want to produce a set of tables for all the
variables in my data, how can I do that without having to type them into
the table
2009 Dec 02
2
Error when running Conditional Logit Model
Dear R-helpers,
I am very new to R and trying to run the conditional logit model using
"clogit " command.
I have more than 4000 observations in my dataset and try to predict the
dependent variable from 14 independent variables. My command is as follows
clmtest1 <-
clogit(Pin~Income+Bus+Pop+Urbpro+Health+Student+Grad+NE+NW+NCC+SCC+CH+SE+MRD+strata(IDD),data=clmdata)
However, it
2009 Jun 17
2
glm binomial logit
Hi All,
I am using "glm" function to build logistic regression. I noticed that glm
function glm function is computing many other statistics which are not
required for our analysis. As our dataset is very big and we have to run
logistic regression on several samples the run time drastically increases
if all those statistics are computed. Is these any way to skip computation
in glm
2011 Dec 12
1
k-folds cross validation with conditional logistic
--begin inclusion --
I have a matched-case control dataset that I'm using conditional
logistic regression (clogit in survival) to analyze. I'm trying to
conduct k-folds cross validation on my top models but all of the
packages I can find (CVbinary in DAAG, KVX) won't work with clogit
models. Is there any easy way to do this in R?
-end inclusion --
The clogit funciton is simply a
2009 Jan 29
1
Question On CrossTable function in gmodels package
Hi R-users,
I have the following problem with CrossTable function within ?gmodels? package: the output of the function (format ?spss? and asresid=T) can not be stored within another object.
For example:
>library(gmodels)
>data(infert, package = "datasets")
> CrossTable(infert$education, infert$induced)->aa # the function prints everything ok on the screen
> aa # works
2006 Dec 12
1
Calculating AICc using conditional logistic regression
I have a case-control study that I'm analysing using the conditional
logistic regression function clogit from the survival package.
I would like to calculate the AICc of the models I fit using clogit.
I have a variety of scripts that can calculate AICc for models with a
logLik method, but clogit does not appear to use this method.
Is there a way I can calculate AICc from clogit in R?
Many
2008 Aug 31
1
Fitted probabilities in conditional logit regression
Dear R-help,
I'm doing conditional logit regression for a discrete choice model.
I want to know whether there's a way to get the fitted probabilities. In
Stata, "predict" works for clogit, but it seems that in R "predict" does
not.
Thank you very much!
Best wishes.
Sincerely,
Min
--
Min Chen
Graduate Student
Department of Agricultural,
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives
demonstrations on what can be done using R? I downloadedR Langauage
definition and An introduction to R but haven't found them overly useful.
I'd really like to be able to follow some tutorials using a dataset or many
datasets. The datasets I have available on R are
Data sets in package 'datasets':
2024 Apr 30
1
function import file csv Openair
In the Openair package it is possible to restore the import csv file function? it has been removed in the latest versions.
Infinitely grateful
Evelina Ballato
Evelina Ballato
Arpa Piemonte
Dipartimento Territoriale
Piemonte Nord Est - sede di Omegna
************************************************************************
Riservatezza/Confidentiality
Ai sensi del Regolamento UE 679/2016, del
2009 Aug 28
4
Objects in Views
Hi everyone,
I have recently experienced a strange behavior (strange from my knowledge)
in rails.
In my controllers ''new'' action, I am creating a few instance variables in
the following manner :
@controllerModel = ControllerModel.new
@model1 = Model1.all
@model2 = Model2.all
in my ''new'' view, I am using the @controllerModel to create the form for new
and I
2012 Mar 01
2
identifying a column name correctly to use in a formula
Hi,
I have a large matrix (SNPs) that I want to cycle over with logistic
regression with interaction terms. I have made a loop but I am struggling
to identify to the formula the name of the column in a way which is
meaningful to the formula. It errors becasue it is not evaluated proporly.
(below is a pilot with only 7 to 33 columns, my actual has 200,000 columns)
My attempts:
for (i in 7:33)
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users,
i'm using a custom function to fit ancova models to a dataset. The data are
divided into 12 groups, with one dependent variable and one covariate. When
plotting the data, i'd like to add separate regression lines for each group
(so, 12 lines, each with their respective individual slopes). My 'model1'
uses the group*covariate interaction term, and so the coefficients
2010 Aug 10
1
extracting information from an object
I was working on a project involving a linear model, and wanted to
extract the standard error of a predictor. I am able to do so, but not
in the way I would expect.
I would have expected that if a created a model such as Model1 <-
lm(y~x,z,d), the object Model1 would contain that information even
though it does not print it out when I simply type Model1. I would also
have (wrongly)
2009 Mar 05
2
Overriding contributed package functions
The "tsdiag" function in the TSA package overrides the "tsdiag" function in
the "stats" package. There are a few annoying bugs in the TSA's version of
the function so I would like to use the "stats" function but still have
access to other TSA functions. I have tried using stats::tsdiag( ) but as
long as the TSA package is attached the function from
2006 May 03
5
Multiple Scaffolds
I''d like to create scaffolds for each of the tables in my database, but
would like to access them below the path: localhost:3000/admin
For example localhost:3000/admin/table1
localhost:3000/admin/table2
Where table1 and table2 would be the controller names respectively,
calling their own list.rhtml, show.rhtml, edit.rhtml, etc..
Any recommendations on how/where to
2011 Sep 16
3
Help writing basic loop
Hello,
I would like to write a loop to 1) run 100 linear regressions, and 2)
compile the slopes of all regression into one vector. Sample input data
are:
y1<-rnorm(100, mean=0.01, sd=0.001)
y2<-rnorm(100, mean=0.1, sd=0.01)
x<-(c(10,400))
#I have gotten this far with the loop
for (i in 1:100) {
#create the linear model for each data set
model1<-lm(c(y1[i],y2[i])~x)
2006 Oct 09
7
multi_search problems, Never go away!
Hello, I am trying to use the multi_search method, but I keep getting
type error on nil objects, I send it [Model1,Model2] and it seems as
though the class names keep getting clobbered and turn to nil, somewhere
along the multi_index area. I tried to trace what was going on, but I
got nothing, also, this only happens when there are actually hits(thank
god, most of the time). Perhaps some insight?
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example,
say I have 5 objects, model1, model2, model3, model4 and model5.
I would like to make a vector of the r.squares from each model by code
such as this:
rsq <- summary(model1)$r.squared
for(i in 2:5){
rsq <- c(rsq, summary(model%i%)$r.squared)
}
So I assign the first value to rsq then cycle through models 2 through