Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8354125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:27:41+00:00 2026-06-09T09:27:41+00:00

I did coxph for my data and get result like this: > z Call:

  • 0

I did coxph for my data and get result like this:

> z
Call:
coxph(formula = Surv(Years, Event) ~ y, data = x)


    coef exp(coef) se(coef)     z   p
y 0.0714      1.07    0.288 0.248 0.8


Likelihood ratio test=0.06  on 1 df, p=0.804  n= 65, number of events= 49 

I just want to save

y 0.0714      1.07    0.288 0.248 0.8

into a file. Because I do permutation and generate 1000 z.

I want to save them into a text file like this:

fin -0.3794 0.684 0.1914 -1.983 0.0470
age -0.0574 0.944 0.0220 -2.611 0.0090
race 0.3139 1.369 0.3080 1.019 0.3100
wexp -0.1498 0.861 0.2122 -0.706 0.4800
mar -0.4337 0.648 0.3819 -1.136 0.2600
paro -0.0849 0.919 0.1958 -0.434 0.6600

Anyone can help?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:27:43+00:00Added an answer on June 9, 2026 at 9:27 am

    The coefficients are easily accessed by

    summary(z)[['coefficients']]
    

    and the confidence interval information by

    summary(z)[['conf.int']]
    

    To find out what the components of a summary.coxph object

    str(summary(z))
    

    My advice would be to create a list of your permutations

    data_list <- list(data_1, ...., data_1000)
    

    Then call

    lots_models <- lapply(data_list, coxph, formula = Surv(Years, Event) ~ y)
    

    Which creates a list of models

    You can create the summaries by

    lots_summaries <- lapply(lots_models, summary)
    

    Extract the coefficients

    all_coefficients <- lapply(lots_summaries, '[[', 'coefficients')
    all_conf.int     <- lapply(lots_summaries, '[[', 'conf.int')
    

    Add a permutation id column (if you want)

    all_coefs_id <- lapply(seq_along(data_list), 
       function(i) cbind(all_coefficients[[i]],i))
    all_ci_id <- lapply(seq_along(data_list), 
       function(i) cbind(all_conf.int[[i]],i))
    

    Then combine into a data.frame

    all_coefs_df <- do.call(rbind, all_coefs_id)
    all_ci_df <- do.call(rbind, all_ci_id)
    

    Which you than then save as a text file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
Did quite a bit of research trying to figure out how to get this
Did some googling and couldn't find a clear answer on this. My assumption is
did someone else encounter this problem? I use the methods PopUpManager.createPopUp() and PopUpManager.centerPopUp() to
Did anyone create a Document Management System using SQL SERVER's Filestream? By this I
Did a quick search but could not find anything about this. I guess all
Did I missed anything during this? I am running a this command from command
Did someone create a nice stylesheet for this: http://mvccontrib.codeplex.com/wikipage?title=Grid&referringTitle=Documentation&ProjectName=mvccontrib Thanks. Christian
Did you ever make a rounding like that: [0.95,1) rounds to 1 [0.90,0.95) rounds
Did anybody know more information about this attack ? I recently got this script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.