Grafik Opsi Grafik Terbaik Fungsi Kuadratik


Masalah Optimalisasi Kuadrat Binary Unconstrained. Gary A Kochenberger Berafiliasi dengan School of Business, University of Colorado Email penulis. Fred Glover Berafiliasi dengan OptTek Systems, Inc. Haibo Wang Berafiliasi dengan College of Business Administration, Universitas Internasional AM Texas. Dalam beberapa tahun terakhir, program biner kuadrat tak terkendali UQP telah muncul sebagai kerangka kerja terpadu untuk pemodelan dan pemecahan beragam masalah optimasi kombinatorial. Fleksibilitas yang tak terduga dari model UQP adalah membuka pintu bagi solusi beragam aplikasi penting dan menantang. Perkembangan di kawasan berkembang ini diilustrasikan dengan menggambarkan metodologinya dengan contoh dan dengan melaporkan pengalaman komputasi yang mendasar yang menunjukkan viabilitas dan ketangguhan metode terbaru untuk memecahkan masalah. Model UQP, menunjukkan bahwa mereka mendapatkan solusi untuk contoh model yang luas yang menyaingi atau melampaui solusi terbaik yang diperoleh algoritme tujuan khusus terbaik saat ini. Ini adalah versi terbaru dari makalah sebelumnya yang diberikan di Alenaba 38.B, G Kochenberger, A Ahmadian, pendekatan pemrograman kuadrat 0-1 Untuk solusi optimal dari dua masalah penjadwalan Int J Syst Sci 25 401 408 1994 MathSciNet CrossRef MATH. B Alidaee, G Kochenberger, F Glover, C Rego, Pendekatan pemodelan dan solusi baru untuk masalah partisi nomor J Appl Math Decis Sci 9 2 , 113 121 2005 MathSciNet CrossRef. B Alidaee, F Glover, G Kochenberger, H Wang, Memecahkan masalah klik bobot maksimal melalui pemrograman kuadrat tak terkendali Eur J Oper Res 181 592 587 2007 CrossRef MATH. B Alidaee, G Kochenberger, K Lewis, M Lewis, H Wang, Pendekatan baru untuk pemodelan dan pemecahan masalah pengepakan melalui pemrograman biner kuadrat tak terkendali Eur J OR 186 2, 504 512 2008 MathSciNet MATH. B Alidaee, G Kochenberger, K Lewis, M Lewis, H Wang, Kompatibel menarik Model non linier untuk optimasi kombinatorial Int J Math Oper Res 1 1 dan 2, 9 20 2009 CrossRef MATH. TM Alkhamis, M Hasan, MA Ahmed, Simulasi anil untuk fungsi pseudo-boolean kuadrat tak terkendali Eur J Oper Res 108 641 65 2 1998 CrossRef MATH. M Amini, B Alidaee, G Kochenberger, Pendekatan pencarian tersebar untuk program biner kuadrat tak terkendali, dalam Optimalisasi Metode Baru ed oleh D Corne, M Dorigo, F Glover McGraw-Hill, Inggris, 1999, hlm. 317 330. JE Beasley, algoritma Heuristik untuk masalah pemrograman kuadrat kuantum yang tak terkendali Working Paper, Imperial College, 1999.A Miliar Netnet, Sutris, Minimisasi fungsi pseudo-boolean kuadrat Eur J OR 78 106 115 1994 MATH. B Borchers, J Furman, A Algoritma two-phase exact untuk Max-Sat dan bobot Max Sat J Comb Optim 2 299 306 1999 MathSciNet CrossRef MATH. E Boros, P Hammer, Masalah Max-cut dan optimasi kuadrat 0-1, aspek polyhedral, relaksasi dan batas Ann OR 33 151 225 1991 MathSciNet CrossRef MATH. E Boros, A Prekopa, Batas probabilistik dan algoritma untuk masalah satisfiability maksimum Ann OR 21 109 126 1989 MathSciNet CrossRef MATH. E Boros, P Hammer, X Sun, Metode DDT untuk kuadrat 0-1 Minimisasi, RUTCOR Research Cent Er, RRR 39 89, 1989.JM Bourjolly, P Gill, G Laporte, H Mercure, Algoritma optimasi kuadrat 0 1 untuk klik maksimum dan masalah set stabil Kertas kerja, Universitas Montreal, 1994.P Chardaire, A Sutter, A Metode dekomposisi untuk pemrograman kuadrat nol satu Mengelola Sci 41 4, 704 712 1994 CrossRef. G Cornuejolos, Pengemasan Optimasi Kombinatorial dan Penutupan CBMS-NSF SIAM, Philadelphia, 2001 CrossRef. CM De Simone, M Diehl, P Junger, Mutzel, G Reinelt , G Rinaldi, Ground State4s of Ising yang tepat, spin gelas hasil eksperimen baru dengan algoritma cabang dan potong J Stat Phys 80 487 496 1995 CrossRef MATH. X Delorme, X Gandibleau, J Rodriques, GRASP untuk kemasan set EJOR 153 564 580 2004 CrossRef MATH. B Eksioglu, R Demirer, I Capar, Seleksi subset dalam regresi linier berganda pendekatan pemrograman matematis baru Comput Ind Eng 49 155 167 2005 CrossRef. R Forrester, H Greenberg, model pemrograman biner kuadrat dalam biologi komputasi Algoritma Oper Res 3 110 129 2008 MathSciNet. F Glover, G Kochenberger, Buku Pegangan Metaheuristic Kluwer Academic, Boston Dordrecht London, 2003.F Glover, M Laguna, Tabu Cari Kluwer Academic, Boston, 1997 CrossRef MATH. F Glover, G Kochenberger, B Alidaee, tabu memori adaptif Mencari program biner kuadratik Mengelola Sci 44 3, 336 345 1998 CrossRef MATH. F Glover, G Kochenberger, B Alidaee, MM Amini, Tabu dengan memori acara kritis pencarian merupakan aplikasi yang disempurnakan untuk program kuadrat biner, di MetaHeuristics Advances and Trends in Local Search Paradigma untuk Optimalisasi oleh S Voss, S Martello, I Osman, C Roucairol Kluwer Academic, Boston, 1999.F Glover, B Alidaee, C Rego, G Kochenberger, heuristik one-pass untuk program kuadrat biner berskala besar yang tidak dibatasi EJOR 137 272 287 2002 MathSciNet CrossRef MATH. F Glover, G Kochenberger, B Alidaee, M Amini, Memecahkan masalah Knapsack kuadrat oleh reformulasi dan tabu mencari satu kendala tunggal, dalam Optimasi Kombinatorial dan Global oleh PM Pardalos, Sebuah Migdalas, R Burkard World Scientific, River Edge, 2002, hlm 111 121 CrossRef. F Glover, JK Hao, G Kochenberger, Z Lu, H Wang, Memecahkan masalah pemotongan skala besar melalui tabu search Working Paper, University of Colorado at Denver , 2010.F Glover, Z Lu, JK Hao, Diversifikasi-driven tabu mencari pemrograman kuadrat biner yang tidak dibatasi 4OR 8 3, 239 253 2010 MathSciNet CrossRef MATH. M Grotschel, M Junger, G Reinelt, Aplikasi optimasi kombinatorial untuk fisika statistik Dan desain tata letak sirkuit Oper Res 36 3, 493 513 1988 CrossRef. P Hammer, S Rudeanu, Metode Boolean dalam Penelitian Operasi Springer, New York, 1968 CrossRef MATH. PB Hansen, Metode pemrograman nonlinear 0 1 Ann Discret Math 5 53 70 1979 CrossRef MATH. P Hansen, B Jaumard, Algoritma untuk masalah satisfiability maksimal Komputasi 44 279 303 1990 MathSciNet CrossRef MATH. P Hansen, B Jaumard, V Mathon, Kendalikan pemrograman nonlinier 0-1 INFORMS J Comput 5 2, 97 119 1993 MathSciNet CrossRef MATH. L D Iasemidis, DS Shiau, JC Sackellares, P Pardalos, Transisi untuk optimasi kejang epilepsi, dalam Seri DIMACS dalam Matematika Diskrit dan Ilmu Komputer Teoretis American Mathematical Society Publishing, Providence, RI, vol 55 2000, hlm 55 73.A Joseph, bersamaan Kerangka pemrosesan untuk masalah partisi yang ditetapkan Comput Oper Res 29 1375 1391 2002 MathSciNet CrossRef MATH. K Katayama, M Tani, H Narihisa, Memecahkan masalah pemrograman kuadrat biner besar dengan algoritma pencarian lokal genetika yang efektif, dalam Prosiding Konferensi Komputasi Genetik dan Evolusioner GECCO 00 Morgan Kaufmann, San Francisco, 2000.G Kochenberger, F Glover, Kerangka kerja terpadu untuk pemodelan dan pemecahan masalah optimasi kombinatorial sebuah tutorial, dalam Metode Optimalisasi dan Aplikasi Multiscale oleh W Hager, S-J Huang, P Pardalos, O Prokopyev Springer, New York Boston, 2006.G Kochenberger, F Glover, B Alidaee, C Rego, Kerangka pemodelan dan solusi terpadu untuk optimasi kombinatorial Masalah HI atau Spectr 26 237 250 2004 CrossRef MATH. G Kochenberger, F Glover, B Alidaee, C Rego, Memecahkan masalah optimasi kombinatorial melalui reformulasi dan metaheuristik memori adaptif, dalam Pandangan Revolusioner dalam Perhitungan Evolusioner oleh A Menon, D Goldberg Kluwer, Boston , MA, 2004.G Kochenberger, F Glover, B Alidaee, C Rego, Pendekatan biner kuadrat tak terkendali terhadap masalah pewarnaan vertex Ann OR 139 229 241 2005 MathSciNet CrossRef MATH. G Kochenberger, F Glover, B, Alidaee, K Lewis, Dengan menggunakan program kuadrat tak terbatas untuk memodelkan dan menyelesaikan masalah max 2 Sat Int J Oper Res 1 1 dan 2, 89 100 2005 MathSciNet CrossRef MATH. G Kochenberger, F Glover, B Alidaee, H Wang, Clustering data microarray melalui partisi clies J Comb Optim 10 77 92 2005 MathSciNet CrossRef MATH. G Kochenberger, B Alidaee, H Wang, Pendekatan pemodelan dan solusi yang efektif untuk masalah set dinamis umum Optim Lett 1 111 117 2007 Springer-Verlag MathSciNet CrossRef MATH. DJ Laughunn, pemrograman biner kuadrat Oper Res 14 454 461 1970 CrossRef. M Lewis, B Alidaee, G Kochenberger, Menggunakan xQx untuk memodelkan dan memecahkan masalah alokasi tugas yang tidak dipadukan ATAU Lett 33 176 182 2005 MathSciNet MATH. M Lewis, G Kochenberger, B Alidaee, Pendekatan pemodelan dan solusi baru untuk masalah partisi yang ditetapkan Comput OR 35 807 813 2008 MathSciNet CrossRef MATH. M Lewis, B Alidaee, F Glover, G Kochenberger, Catatan pada xQx sebagai kerangka pemodelan dan solusi untuk pemesanan linier Masalah Int J OR 5 2, 152 162 2009 MATH. A Lodi, K Allemand, TM Liebling, Sebuah heuristik evolusioner untuk pemrograman kuadrat 0-1 Laporan Teknis OR-97-12, DEIS University of Bologna, 1997.P Merz, B Freisleben , Algoritma genetika untuk pemrograman kuadratik biner, dalam Prosiding Konferensi Komputasi Genetik dan Evolusi Internasional 1999 GECCO 99 Morgan Kaufmann, San Francisco, 1999, hlm 417 424. Mingozzi, M Boschetti, S Ricciardelli, L Blanco, Pendekatan penentuan satu set t O masalah penjadwalan kru Oper Res 47 6 873 888 1999 CrossRef MATH. M Padberg, Pada struktur wajah dari set packing polyhedra Math Program 5 199 215 1973 MathSciNet CrossRef MATH. G Palubeckis, Algoritma heuristik dan algoritma untuk kuadran tak terkendali Masalah pemrograman satu nol Komputasi 54 284 301 1995 MathSciNet CrossRef. P Pardalos, GP Rodgers, Aspek komputasi dari algoritma cabang dan terikat untuk pemrograman kuadrat nol-satu Komputasi 45 131 144 1990 MathSciNet CrossRef MATH. P Pardalos, GP Rodgers, A branch Dan algoritma terikat untuk masalah klik maksimum Comput OR 19 363 375 1992 CrossRef MATH. A Pekec, M Rothkopf, Desain Lelang Kombinatorial Mengelola Sci 49 11, 1485 1503 2003 CrossRef MATH. M Ronnqvist, Optimalisasi Program Matematika kehutanan B 97 267 284 2003 MathSciNet. L Schrage, Pemodelan Optimalisasi dengan LINDO Duxbury, Pacific Grove, 1997. Vemuganti, Aplikasi set covering, mengatur packing dan mengatur model partisi dalam sebuah survei, di Handbook of Combinatori Al Optimasi ed oleh D Zhu, P Pardalos Kluwer Academic, Boston, MA, 1998.H Wang, B Alidaee, F Glover, G Kochenberger, Memecahkan masalah teknologi grup melalui partisi cli Int J Flex Manuf 18 77 97 2006 CrossRef MATH. H Wang , T Obremski, B Alidaee, G Kochenberger, partisi Clique untuk mengelompokkan perbandingan dengan analisis kelas K-Means dan laten Commun Stat 37 1, 1 13 2008 MathSciNet MATH. About the Reference Work Entry. Title Binary Unconstrained Optimasi Kuadrat Soal Referensi Judul Pekerjaan Buku Panduan Optimalisasi Kombinatorial hal. 533-557 Hak Cipta 2013 DOI 10 1007 978-1-4419-7997-115 Cetak ISBN 978-1-4419-7996-4 ISBN 978-1-4419-7997-1 Penerbit Springer New York Copyright Holder Springer Science Business Media New York Tautan Tambahan. Tentang Referensi ini Work. Industry Sectors. Finance, Business Banking. Consumer Packaged Goods. Oil, Gas Geosciences. eBook Packages. Mathhematics and Statistics. Panos M Pardalos 1.Ding-Zhu Du 2. Ronald L Graham 3.Editor Affiliati Ons.1 Departemen Perindustrian dan Sistem, Universitas Florida.2 Departemen Ilmu Komputer, Universitas Texas, Dallas.3 Rekayasa Dept Comp Sci, Universitas California, San Diego. Gary A Kochenberger 4.Fred Glover 5.Haibo Wang 6.Author Affiliations.4 Sekolah Bisnis, Universitas Colorado, 1250 14th Street, Suite 215, 80217, Denver, CO, USA.5 OptTek Systems, Inc, 2241 17th Street, 80302, Boulder, CO, USA.6 Perguruan Tinggi Administrasi Bisnis, Texas AM International University, 78041, Laredo, TX, USA. Lanjutkan membaca. Untuk melihat bagian dari konten ini, silakan ikuti link unduhan PDF di atas. Kasus-kasus yang dapat dipecahkan dari Program Biner Quadratik. Harga akhir kotor dapat bervariasi sesuai dengan PPN lokal. Kami meringkas dalam bab ini subkelas yang dapat dipecah secara polinomial dari masalah pemrograman kuadrat kuadrat yang dipelajari dalam literatur dan melaporkan beberapa subclass polynomially solvable yang baru terungkap dalam penelitian terbaru kami. Sudah diketahui bahwa program pemrograman kuadratik biner adalah NP-hard pada umumnya Mengidentifikasi subclass polynomially solvable dari masalah pemrograman kuadratik biner tidak hanya menawarkan wawasan teoritis mengenai sifat rumit dari masalah tetapi juga menyediakan platform untuk merancang skema relaksasi untuk metode solusi yang tepat Kami membahas dan menganalisis dalam bab ini enam subclass yang dapat dipolimerisasi secara polinomial Program kuadrat biner, termasuk masalah dengan struktur khusus pada matriks Q dari fungsi tujuan kuadrat, masalah yang didefinisikan oleh grafik khusus atau rangkaian logika, dan masalah yang ditandai dengan nol kesenjangan dualitas dari relaksasi SDP Contoh dan ilustrasi geometris disajikan untuk memberikan algoritme Dan wawasan intuitif ke dalam masalah. Pemrograman kuadratik polinomial solvabilitas seri-paralel grafik logika sirkuit lagrangian dual SDP relaxation. How untuk Memecahkan Persamaan Kuadratir semua istilah seperti itu dan memindahkannya ke satu sisi persamaan Langkah pertama untuk menganut persamaan adalah Untuk memindahkan semua persyaratan ke satu sisi persamaan, menjaga x 2 istilah positif Untuk menggabungkan istilah, menambah atau mengurangi semua persyaratan x 2, persyaratan x, dan istilah bilangan bulat konstanta, memindahkannya ke satu sisi Persamaan sehingga tidak ada yang tersisa di sisi lain Begitu sisi lain tidak memiliki syarat yang tersisa, Anda bisa menulis 0 di sisi tanda sama di sini Bagaimana Anda melakukannya 1.2 x 2 8 x 4 3 xx 2 -8x-4 3x-x.2 x 2 x 2 8 x 3 x 4 0 x -8x-3x-4 0,3 x 2 11 x 4 0 -11x-4 0.Faktor ekspresi Untuk faktor ekspresi, Anda harus menggunakan faktor-faktor X 2 istilah 3, dan faktor-faktor dari istilah konstan -4, untuk membuat mereka berkembang biak dan kemudian menambahkannya ke istilah tengah, -11 Begini bagaimana Anda Lakukanlah. Karena 3 x 2 hanya memiliki satu set faktor yang memungkinkan, 3 x dan x Anda dapat menuliskannya dalam kurung 3 xx 0. Kemudian, gunakan proses eliminasi untuk menyambungkan faktor 4 untuk menemukan kombinasi yang menghasilkan - 11x bila dikalikan Anda bisa menggunakan kombinasi 4 dan 1, atau 2 dan 2, karena kedua angka tersebut berlipat ganda untuk mendapatkan 4 Ingatlah bahwa salah satu persyaratannya harus negatif, karena istilahnya adalah -4. Dengan percobaan dan kesalahan , Cobalah kombinasi faktor 3 x 1 x 4 Bila Anda mengalikannya, Anda mendapatkan 3 x 2 12 xx 4 -12x x-4 Jika Anda menggabungkan persyaratan 12 x dan x Anda mendapatkan 11 x yang merupakan istilah tengah Anda Yang bertujuan untuk Anda baru saja memperhitungkan persamaan kuadrat. Sebagai contoh trial and error, mari kita coba memeriksa kombinasi anjak piutang untuk 3 x 2 11 x 4 0 -11x-4 0 yang merupakan kesalahan tidak bekerja 3 x 2 x 2 3 x 2 6 x 2 x 4 6x-2x-4 Jika Anda menggabungkan istilah-istilah itu, Anda mendapatkan 3 x 2 4 x 4 -4x-4 Meskipun faktor-2 dan 2 diperbanyak untuk membuat -4, istilah tengahnya Tidak bekerja, karena kamu nee Ded untuk mendapatkan 11 x tidak 4 x. Set setiap set kurung sama dengan nol sebagai persamaan terpisah Ini akan membawa Anda untuk menemukan dua nilai untuk x yang akan membuat keseluruhan persamaan sama dengan nol, 3 x 1 x 4 0 Sekarang setelah Anda ve Faktorkan persamaan, yang harus Anda lakukan adalah meletakkan ekspresi di setiap kumpulan tanda kurung sama dengan nol Tapi mengapa - karena untuk mendapatkan nol dengan mengalikan, kita memiliki prinsip, aturan atau properti yang satu faktor harus nol, maka setidaknya Salah satu faktor dalam tanda kurung, karena 3 x 1 x 4 harus nol, maka 3x 1 atau yang lain x - 4 harus sama nol Jadi, Anda akan menulis 3 x 1 0 dan juga x 4 0.Solve masing-masing persamaan nol secara independen. Persamaan kuadrat, akan ada dua nilai yang mungkin untuk x Tentukan x untuk setiap nilai x yang mungkin satu per satu dengan mengisolasi variabel dan menuliskan dua solusi untuk x sebagai solusi akhir Berikut adalah bagaimana Anda melakukannya.3x -1 oleh Mengurangkan.3x3 -1 3 dengan membagi. x -1 3 disederhanakan. x 4 dengan mengurangkan. x -1 3, 4 dengan membuat satu set solusi terpisah yang mungkin, saya Aning x -1 3, atau x 4 tampak bagus. Kita memiliki 3 -1 3 1 -1 3 4 0 dengan mengganti -1 1 -4 1 3 0 dengan menyederhanakan 0 -4 1 3 0 dengan mengalikannya 0 0 Ya, x -1 3 works. We memiliki 3 4 1 4 4 0 dengan mengganti 13 4 4 0 dengan menyederhanakan 13 0 0 dengan mengalikan 0 0 Ya, x 4 works. So, kedua solusi melakukan pengecekan secara terpisah, dan keduanya diverifikasi sebagai bekerja dan benar. Untuk dua solusi yang berbeda, pertimbangkan semua istilah yang serupa dan pindahkan ke satu sisi persamaan Pindahkan semua istilah ke satu sisi dengan tanda sama, simpan istilah x 2 positif Tuliskan istilah dalam urutan derajat, sehingga x 2 istilah datang lebih dulu, diikuti oleh istilah x dan istilah konstan Berikut adalah bagaimana Anda melakukannya. 4x 2 - 5x - 13 x 2 -5,4x 2 - x 2 - 5x - 13 5 0. Tuliskan rumus kuadrat Kuadrat Rumus adalah bb 2 4 ac 2 a -4ac 2.Mengidentifikasi nilai a, b, dan c dalam persamaan kuadrat Variabel a adalah koefisien dari istilah x 2, b adalah koefisien dari x term, dan c adalah Konstanta Untuk persamaan 3x 2 -5x - 8 0, a 3, b -5, dan c -8 Tuliskan ini. Sisipkan nilai a, b, dan c ke dalam persamaan Sekarang setelah Anda mengetahui nilai dari tiga variabel, Anda bisa memasukkannya ke dalam persamaan seperti Ini. Jika matematika telah Anda tetapkan di angka, apakah matematika yang tersisa untuk menyederhanakan tanda-tanda positif atau negatif, memperbanyak, atau menata sisa kata-kata Berikut adalah cara Anda melakukannya. Sempurnakan akar kuadrat Jika nomor di bawah simbol radikal adalah Persegi yang sempurna, Anda akan mendapatkan bilangan bulat Jika jumlahnya bukan persegi yang sempurna, maka sederhanakan ke versi radikal yang paling sederhana. Jika jumlahnya negatif, dan Anda yakin itu seharusnya negatif, maka akarnya akan rumit. Contoh ini, 121 11 Anda dapat menulis bahwa x 5 - 11 6.Solve untuk jawaban positif dan negatif Jika Anda telah menghilangkan simbol akar kuadrat, maka Anda dapat terus berjalan sampai Anda menemukan hasil positif dan negatif untuk x Sekarang setelah Anda Memiliki 5 - 11 6, Anda bisa menulis dua pilihan. Selesaikan jawaban positif dan negatif Jus T lakukan matematika. Simplify Untuk menyederhanakan setiap jawaban, cukup bagi mereka dengan jumlah terbesar yang terbagi rata ke dalam kedua nomor. Bagilah pecahan pertama dengan 2, dan bagi yang kedua dengan 6, dan Anda telah menyelesaikannya untuk x. Metode Tiga dari Tiga Melengkapi Square Edit. Membuat semua istilah ke satu sisi persamaan Pastikan bahwa istilah a atau x 2 positif Berikut adalah cara melakukannya. 3. Dalam persamaan ini, istilahnya adalah 2, istilah b adalah - 12, dan istilah c adalah -9.Memove istilah c atau konstan ke sisi lain Istilah konstan adalah istilah numerik tanpa variabel Pindahkan ke sisi kanan persamaan. Divide kedua sisi oleh koefisien a atau X 2 istilah Jika x 2 tidak memiliki istilah di depannya, dan hanya memiliki koefisien 1, maka Anda bisa melewati langkah ini. Dalam kasus ini, Anda harus membagi semua persyaratan dengan 2, seperti 2x 2 2 - 12x 2 9 2.Divide b oleh dua, kuadratkan, dan tambahkan hasilnya ke kedua sisi. Istilah b dalam contoh ini adalah -6 Inilah cara Anda melakukannya. Sesuaikan kedua sisi Faktor syarat pada Sisi kiri untuk mendapatkan x-3 x-3, atau x-3 2 Tambahkan istilah di sisi kanan untuk mendapatkan 9 2 9, atau 9 2 18 2, yang menambahkan hingga 27 2.Cari akar kuadrat dari kedua sisi Akar kuadrat dari x-3 2 hanyalah x-3 Anda dapat menulis akar kuadrat dari 27 2 sebagai 27 2 Oleh karena itu, x - 3 27 2.Simplifikasi radikal dan selesaikan x Untuk menyederhanakan 27 2, carilah kotak yang sempurna Dalam angka 27 atau 2 atau dalam faktor mereka Kotak 9 yang sempurna dapat ditemukan di 27, karena 9 x 3 27 Untuk mengambil 9 dari tanda radikal, tariklah nomor 9 dari radikal, dan tuliskan nomor 3, yang Akar kuadrat, di luar tanda radikal Tinggalkan 3 di pembilang fraksi di bawah tanda radikal, karena faktor 27 tidak dapat diambil, dan tinggalkan 2 di bawah Kemudian, gerakkan konstanta 3 di sisi kiri persamaan ke Kanan, dan tuliskan dua solusi untuk x. ,, Mathlab,,,,, Android. Mathlab, .-,,,,, .-,,, - -,,,,. PRO-. - - Google - sl en tl ru. . , -,,,,,, log dosa 2, cos 30, sinh, cosh, tanh,, sin x cos x x n. 2 - 2x 2 3y 2 1 r cos2, x cos t, y sin t, v, x 2 x 1 pinch-to-zoom CSV. 1 2 1 3 5 6, 3 1 2. x 1 2 - x 1 x 2-1 0 - x -1,1, x1 x2 1, x1-x2 2,. ,,,,,. PRO. , 1 2 3 4,,,,,,. ,,,,,,. , 1 2 3 4,,,,,,.Mathlab Apps, LLC 5 2017. Facebook, - PRO-,, PDF. 27 2017.Mathlab Apps, LLC 14 2017. ,, PDF, online. Diana Tursynkozha 8 2017.Mathlab Apps, LLC 16 2017. ,,,, PDF. Eueluel ka Tawer 6 2017. ,,,,,,, 250.Mathlab Apps, LLC 11 2017.Hey 16, 8, 2 10,, PDF Online. Chromebooks mendukung Chromebook baru dengan dukungan Google Play. Android 7 0.Output untuk bilangan kompleks, Pengaturan Kalkulator. Exact nilai untuk fungsi trigonometri sin 60 1 2 sqrt 3.Polar formulir untuk bilangan kompleks 1 30, tahan saya untuk masuk. Visual editing beta, aktifkan di Settings Calculator. New permissions adalah untuk iklan video opsional. Anda dapat memilih untuk menonton video Iklan untuk mendapatkan waktu PRO. Mathlab Apps, LLC. An Introduction to Stata Graphics. Stata mencakup seperangkat alat yang kaya untuk menciptakan grafis berkualitas publikasi Antara berbagai macam grafik yang dapat Anda buat dan jumlah detail yang dapat Anda kontrol dalam grafik, grafis Stata dapat Menjadi topik yang menakutkan Namun, Anda mungkin hanya perlu membuat beberapa jenis grafik, dan dalam kebanyakan kasus, pengaturan default stata akan baik-baik saja. Stata s Graphical User Interface GUI mengatur berbagai pilihan grafik dengan cara yang intuitif. Sehingga Anda dapat menemukannya saat Anda membutuhkannya tanpa menghafal sintaks untuk masing-masing yang tidak berarti Anda seharusnya tidak meletakkan perintah grafik Anda dalam melakukan file setelah Anda membuatnya, tapi ini berarti bahwa untuk grafik kompleks Anda dapat menggunakan GUI untuk Buatlah perintah yang akan Anda simpan. Stat 10 juga menambahkan editor grafik yang memungkinkan Anda memodifikasi grafik setelah membuatnya. Ini memberi Anda lebih banyak kendali atas grafik Anda, namun tidak seperti GUI untuk membuat grafik, editor tidak gi Anda punya perintah yang bisa Anda jalankan ulang nanti Jika nanti Anda membuat perubahan pada data Anda, Anda harus memulai grafik dari awal Jadi lebih baik membuat grafik yang Anda inginkan di tempat pertama jika mungkin, namun editor tetap Tambahan yang sangat berguna. Artikel ini akan membahas pembuatan grafik dengan menggunakan GUI Stata, struktur sintaks perintah grafik tanpa terlalu banyak memikirkan detailnya, beberapa jenis grafik yang umum, dan editor grafik Anda harus memiliki keakraban dengan dasar Stata sebelumnya. Mulai jika Anda tidak mempertimbangkan untuk mulai dengan Stata untuk Peneliti atau Stata untuk Siswa Cara terbaik untuk menggunakan artikel ini adalah membacanya di depan komputer dan benar-benar melaksanakan langkah-langkah yang dijelaskan. Contoh dalam artikel ini akan menggunakan dataset mobil yang disertakan dengan Stata, jadi mulailah dengan mengetik. Untuk mengisinya Jangan ragu untuk bereksperimen saat Anda pergi, terutama dengan setting yang tidak kita bahas biasanya karena keduanya cukup jelas atau jarang digunakan Membuat grafik tidak akan pernah berubah. E data Anda, jadi yang terburuk yang bisa terjadi adalah grafik Anda ternyata tidak berguna atau hanya jelek. Buat Grafik Menggunakan Antarmuka Pengguna Grafis. Kita akan mulai dengan plot scatter sederhana dengan bobot sebagai variabel X dan mpg sebagai Variabel Y Stata mengacu pada grafik yang memiliki variabel Y dan variabel X sebagai grafik twoway, jadi klik grafik Grafik Twoway Langkah selanjutnya adalah menentukan plot Dalam istilah Stata, plot adalah beberapa data spesifik yang divisualisasikan dengan cara tertentu, Misalnya sebidang plot mpg pada berat badan Grafik adalah keseluruhan gambar, termasuk sumbu, judul, legenda, dll. Juga, satu grafik mungkin berisi banyak plot. Kotak dialog twoway dasar akan memungkinkan Anda menentukan sebanyak mungkin plot yang Anda butuhkan, Ditambah kontrol karakteristik lain dari grafik. Untuk menentukan plot, klik Buat Anda kemudian akan mendapatkan kotak dialog di mana Anda dapat menggambarkan plot yang Anda inginkan Tinggalkan kategori yang ditetapkan ke plot Dasar dan jenis yang ditetapkan ke Scatter Untuk variabel Y pilih atau Ketik mpg dan untuk variabel X pilih Atau jenis berat Catatan Linux Stata tidak memungkinkan Anda untuk memilih variabel sehingga Anda perlu mengetikkan nama mereka Di Windows Stata Anda dapat melakukannya juga. Jika Anda mengklik Submit grafik akan dibuat tanpa menutup kotak dialog. Ini memungkinkan Anda melihat-lihat Hasil dan kemudian dengan mudah melakukan penyesuaian dan coba lagi Klik Submit sekarang dan Anda harus mendapatkan plot scatter yang sederhana namun tampak profesional. Menambahkan Variabel Lagi. Jika Anda ingin menambahkan variabel Y kedua ke scatterplot, cara termudah adalah mengetik namanya ke Kotak variabel Y setelah yang telah Anda pilih telah dipilih Stata tidak memungkinkan Anda untuk memilih beberapa variabel dari daftar dengan mouse, namun tidak ada masalah dalam memahami beberapa variabel dalam kotak variabel Y selama Anda memasukkannya ke sana. Buat grafik yang masuk akal dengan dua variabel Y tanpa memiliki banyak skala, kita memerlukan variabel dengan nilai yang sama Variabel bagasi memenuhi syarat, jadi ketiklah di kotak variabel Y setelah mpg dan klik Submit again. Hasilnya akan menjadi Scatter plot dengan kedua variabel Perhatikan bagaimana Stata secara otomatis menempatkan dua variabel dalam warna yang berbeda dan menambahkan sebuah legenda yang menjelaskan teks legenda mana yang diambil dari label variabel, namun Anda bisa mengganti semua perilaku default ini jika Anda menginginkannya. Memasukkan Subset Dari Data. Jika Anda hanya ingin menyertakan pengamatan tertentu, Anda dapat menentukan yang mana dengan mengkliknya jika di tab Anda kemudian dapat mengetikkan kondisi di kotak If, dan hanya pengamatan yang memenuhi syarat yang akan disertakan dalam plot Do Tidak mengetik kata jika seperti yang diasumsikan. Untuk hanya plot mobil asing, ketik asing di kotak Jika. Berharap bahwa di Stata satu benar dan nol adalah salah, dan asing dikodekan sesuai Jadi jika asing setara dengan jika asing 1 Klik Kirim dan Anda akan mendapatkan grafik yang jauh lebih jarang. Anda juga bisa menggunakan ekspresi yang lebih rumit. Misalnya, ketik harga asing 10000 dan Anda akan mendapatkan hanya mobil-mobil yang keduanya asing dan harganya kurang dari 10.000 pada tahun 1978 dolar. Mengontrol Mar Kers. By default Stata menandai setiap titik dengan titik kecil, namun Anda dapat mengubah klik First ini di tab Plot lagi, dan untuk hasil terbaik atur variabel Y kembali menjadi hanya mpg Kemudian klik Marker Properties Set Symbol to Hollow circle Next check Add Label untuk spidol dan mengatur Variabel untuk membuat kemudian klik Submit. Seperti yang Anda lihat, masing-masing titik sekarang lingkaran berongga dengan nama mobil dicetak di sampingnya, tapi banyak nama tumpang tindih Anda dapat memperbaiki situasi agak dengan mengubah Label Sudut sampai 45 derajat tapi secara umum Anda hanya bisa meletakkan label yang berguna pada plot scatter jika memiliki sejumlah kecil pengamatan dan mereka menyebar kembali. Plot Plot. Selanjutnya kami akan menggabungkan beberapa plot Uncheck Add labels to spidol Klik Accept untuk menerima ini. Pengaturan untuk properti Marker dan kembali ke jendela Plot 1, lalu klik Accept lagi untuk menerima plot seperti apa adanya dan kembali ke jendela twoway utama Klik Create untuk menambahkan plot lain ke grafik Kali ini kita akan membuat plot garis Atur Tipe plot ke Baris dan lagi pilih mpg dan bobotnya sebagai variabel Y dan X Klik Submit untuk melihat hasilnya. Mungkin bukan yang anda harapkan - sebenarnya itu seperti tulisan curang Itu karena secara default Stata menarik garis dari pengamatan satu ke pengamatan. Dua untuk observasi tiga dan lain sebagainya Yang Anda inginkan adalah garis dari pengamatan dengan berat terendah yang sama dengan bobot terendah berikutnya, dan sebagainya. Itulah sebabnya mengapa Stata memasukkan kotak centang Urutkan pada variabel x Ini tidak mengubah urutan sebenarnya dari Pengamatan dalam kumpulan data Anda, hanya urutan keterkaitannya di plot baris Anda. Cek dan klik Kirim lagi Kali ini Anda harus mendapatkan grafik yang Anda harapkan. Perhatikan bahwa sementara garis menghubungkan semua titik pada plot seruling, Untuk banyak poin bahwa scatter plot tidak termasuk Itu s karena Anda tidak menetapkan jika kondisi untuk plot garis, jadi itu merencanakan semua pengamatan dalam data Kemampuan untuk mengatur berbeda jika kondisi untuk plot yang berbeda sangat berguna , Meskipun Anda akan mencatat bahwa jendela twoway memiliki sendiri jika di tab yang berlaku untuk semua plot. Properti yang bagus. Anda dapat mengontrol seperti apa garisnya dengan mengklik Properties Garis Opsi yang paling umum digunakan di sini adalah Pola Secara default, Stata membedakan perbedaan Line plot dengan warna, tapi itu tidak membantu jika grafik perlu dicetak hitam putih Jadi Anda bisa mengatur pola untuk setiap baris Atau Anda bisa memilih skema yang dirancang untuk dicetak Untuk melihatnya dalam set tindakan Pola untuk Dash Juga Coba atur metode Connecting ke Stairstep. Plotting Subsamples. Let s kembali ke hanya merencanakan mpg vs weight tapi kali ini mari s membuat mobil asing satu warna dan mobil domestik lain Anda bisa melakukan ini dengan membuat dua plot, satu untuk mobil asing. Dan satu untuk mobil domestik, masing-masing memiliki kondisi yang membatasinya pada subpopulasi yang tepat. Kemudian Stata akan membuat warna berbeda secara otomatis. Dengan mengatur ulang semuanya, klik Terima dua kali untuk kembali ke mai. N twoway window, lalu klik tombol R di sebelah kiri bawah untuk me-reset plot Selanjutnya klik Create leave the type as Scatter atur variabel Y ke mpg dan atur variabel X menjadi weight Then klik if in dan in the If box type foreign. Tanda seru adalah Stata karena tidak demikian berarti tidak asing dan setara dengan asing 0 Jadi, plot ini hanya akan mencakup mobil domestik. Klik Terima untuk kembali ke jendela twoway utama, lalu klik Create again dan ulangi keseluruhan proses dengan satu vital. Perbedaan kali ini di kotak If just type foreign Plot ini hanya akan mencakup mobil asing Klik Submit untuk melihat hasilnya. Grafik yang dihasilkan sangat bagus membuat mobil domestik berwarna biru dan mobil asing berwarna merah Namun legenda tersebut tidak memberi indikasi apa adanya. Untuk itu Anda perlu mengendalikan legenda itu sendiri. Mengontrol Penampilan Grafik. Anda tidak melihat opsi untuk mengendalikan legenda ini, karena sejauh ini kami telah berfokus pada properti dari plot individu. Legenda tidak terkait dengan plot tertentu karena berpotensi mengandung informasi dari semua plot. Jadi untuk sampai ke sana Anda perlu mengklik Accept dan kembali ke jendela twoway Di sinilah Anda mengontrol aspek grafik secara keseluruhan, termasuk Legenda. Click on the Legend tab The Legend behavior hanya mengendalikan apakah legenda itu ditunjukkan atau tidak Karena Stata menganggap grafik kita seharusnya ada dan kita setuju, kita bisa membiarkannya disetel ke Default Di sisi lain, kunci default tidak memberikan apapun Informasi yang berguna untuk grafik ini, jadi kita perlu menimpa mereka Periksa tombol default Penundaan Lalu pada kotak di bawah ini Anda perlu mengetikkan jumlah setiap plot yang diikuti oleh bagaimana Anda ingin diberi label dalam tanda petik Untuk jenis grafik ini.1 Mobil Domestik 2 Mobil Asing. Sekarang klik Submit dan Anda akan mendapatkan grafik dengan legenda yang berguna. Perhatikan bahwa urutan daftar plot adalah urutan di mana mereka akan muncul dalam legenda jika Anda mengetik 2 Mobil Asing 1 Mobil Domestik legenda akan taruh Mobil asing pertama. Tombol Penampilan Organisasi membuka kotak dialog dengan segala macam pilihan yang berkaitan dengan bagaimana legenda terlihat Klik tab Organisasi dan tentukan Kolom Baris ke Kolom yang membuatnya disetel hanya pada satu kolom. Label Label dan Wilayah memungkinkan Anda Untuk mengendalikan penampilan teks legenda dan keseluruhan kotak legenda masing-masing. Berbagai pilihan seperti ukuran dan warna cukup jelas, namun pilihan yang sama ini muncul dalam banyak konteks yang berbeda sehingga perlu waktu sejenak untuk bereksperimen dan melihat bagaimana mereka bekerja. some different colors and such just to see how they work Then click Accept to get back to the main twoway window. The Placement button allows you to control where the legend is placed in the graph To understand how locations are specified, imagine putting the face of an analog clock over your graph 12 o clock is the top, 6 o clock the bottom, 3 o clock the right side, etc You can also specify that the legend goes inside the plot region rather than i n the border area around it--just make sure it doesn t cover up anything important. Try setting the Position to 12 o clock and check Place legend inside plot region then click Submit to see the results. You can add a title to the legend using the Title tab of the in the Legend organization and appearance properties window, but you re much more likely to want to add a title to the graph itself To do so click Accept to get back to the main twoway window again, and then click on its Titles tab This gives you four boxes where you can put text the Title Subtitle Caption and Note The easiest way to see what each one means is to try them out, so type Title Subtitle Caption and Note in their respective boxes, and click Submit to see the result. As you see, Title and Subtitle go at the top, while Caption and Note go in the bottom left Each also has a particular font size associated with it However, these are simply defaults Click on the Properties button associated with each one and you can change its position and format Legend titles work in the same way, but they appear inside the legend box. If you want the text to be split across multiple lines, put each line in quotes To see this in action, replace Title with First Line Second Line and click Submit. Next we ll consider the axes of the graph Click on the Y axis tab the X axis tab is identical and the first thing you ll see is the Title box If a plot has just one Y variable, the default title for the Y axis is that variable s label if it has one, or else simply its name If all the plots have multiple Y variables, the default is no title at all However, you can override the default by typing something here, and control its format by clicking Properties Type in Miles Per Gallon and click Submit to see the effect. Major ticks are the marks along the axis with numbers by them that we ve been seeing all along, but by clicking Major tick label properties you can control how many there are and where they are placed This is done by cho osing one of several rules Use the default rule allows Stata to choose, which it usually does pretty well Suggest of ticks leaves most of the control to Stata but allows you to set roughly how many ticks there will be Min Max puts ticks at just the bottom and top of the axis Range Delta gives you complete control as long as you want the ticks to follow a regular rule For example, select Range Delta set the Minimum value to 0, the Maximum value to 40, and the Delta to 5, then click Submit to see the results. The result is a Y axis that starts at zero and has ticks every five units, but note that the graph continues up to 41 because one car got 41 miles per gallon You can extend a graph by extending an axis remember the default version of this graph started at ten but you cannot truncate it Stata will always make the graph big enough to plot all the observations in your data If you really wanted the graph to stop at 40 you d have to add an if condition like mpg 40.Custom rules allow you t o place ticks anywhere you like and have them say whatever you like The syntax is simply a list of numbers and associated labels For example, select Custom and in the Custom rule box type 10 Terrible 20 Mediocre 30 Very Good. The result is a less informative but more eloquent graph You could accomplish the same thing by putting value labels on the variable If you already have value labels assigned just click on the Labels tab and check Use value labels. Every tick does not need a text label For example, you could set the custom rule to 10 Terrible 15 20 Mediocre 25 30 Very Good 35 40 and get ticks every five units with labels at just 10, 20 and 30 However, this will cause the labels to overlap, or at least crowd each other To fix that, click on the Labels tab and set Angle to Horizontal Since this will force Stata to expand the margin to the left of the plot in order to make room for the labels, set the Size to v Small. However, the text labels don t include the numbers 10, 20 or 30, whic h looks odd since the other tick marks do have numbers To make those numbers appear, add them to the end of their respective text labels 10 Terrible 10 15 20 Mediocre 20 25 30 Very Good 30 35 40 That way they ll line up with the other numbers. Minor tick label properties controls smaller ticks that go in between major ticks They follow the same rules as major ticks, but the rules apply to the spaces between the major ticks rather than the whole axis Obviously the default size is smaller as well, but they are otherwise similar. Axis line properties controls the appearance of the axis itself, while Axis scale propertie s controls its scale This includes the ability to change it to a logarithmic scale, to reverse the scale, and to extend the scale but not to truncate it--see the discussion above. Using By with Graphs. Using by in a graph does not give you a completely separate graph for each subpopulation, but it does give you a separate plots within a single graph. The graph we have been work ing with has become unwieldy, so start by clicking the reset button Then set up a scatter plot of mpg on weight just like we have made before Click Accept to go back to the twoway window, then click on the By tab Check the box for Draw subgraphs for unique values of variables and in the Variables box type or select foreign. Click Submit and you ll see two scatter plots side-by-side, one for domestic cars and one for foreign cars. Now replace foreign with rep78 This variable takes on five values, plus it has some missing values Check the boxes for Add a graph with totals and Add graphs for missing values and click Submit. The resulting graph has seven plots one for each of the five standard values taken by rep78 one for observations which are missing rep78 and one for all observations However, the default arrangement of these plots is not particularly attractive, so click on Subgraph organization. One option would be to put all the plots on one row for easy comparison set Style to Compact, Rows Columns to Rows and then the number of rows to 1 Click Submit to see the result--obviously if you wanted to use this you d have to do something about the X axis labels, but you know how to do that. Another possibility would be to go back to the original format, but move the Total graph to the center of the bottom row First set the Style back to Default and Rows Columns back to Default and click Submit to take another look This arrangement has room for nine plots in three rows with three plots each, and Stata numbers them left to right and then top to bottom The Total graph is currently in the seventh position If we tell Stata to leave the seventh position blank, it will automatically move to Total graph to the eighth position, which is in the center of the bottom row To do so, check Force holes in the placement of graphs and in the Holes box type 7 Note that you could put multiple numbers in this box if you wanted to leave multiple holes Click Submit to see the result. Now click Acc ept to get back to the twoway window The Subgraph titles and Subgraph regions are all about controlling appearance and are similar to what you ve seen before Subgraph axes are a little more interesting One problem with our last graph is that Stata tried to reduce clutter by only putting one set of axes per row and column, but given the layout it looks random You can fix that by clicking Subgraph axes and then under Show Axes set both Y axes and X axes to Yes While you re here, also set Rescale axes to Yes for for both axes This tells Stata to choose the scale for each subgraph based on the points it contains rather than choosing one scale for all of them This makes each subgraph look nicer, but makes it impossible to compare them which may be the entire point of the graph. Overall Options. Finally click on the Overall tab to see some general-purpose options for the whole graph. Schemes are stored sets of defaults For example, the Economist scheme implements the graphics guidelines of the journal The Economist The two monochrome schemes s1 monochrome and s2 monochrome are particularly useful if you need to print your graph in black and white Feel free to experiment It s also possible to create your own schemes Try setting Scheme to s1 monochrome and then click Submit. Graph size can be confusing because when you re working with the graph in Stata, Stata will fit the graph in whatever size window you choose However, when it comes to printing or exporting the graph Stata will make it match the size you set here. Region properties refers to the Plot region everything inside a plot and the Graph region everything outside a plot This is where you can make global changes to the appearance of your graph like changing background colors. Saving a Graph. Once you ve created the graph you want, you can save it by clicking File Save As in the graph s window However, you should choose what type of file to save it as carefully The default, Stata Graph format has the advantage of allowing you to make further changes to the graph with the graph editor However gph files cannot be placed in other files like Word documents or web pages If you want to put your graph in a Word document use Enhanced Metafile format or for web pages we suggest Portable Network Graphics. Creating Graphs Using Commands. As you worked through the previous sections you ve probably noticed that Stata pasted a command into the Results window every time you created a graph Stata used everything you clicked on to formulate the command, but it s the command that actually created the graph As you can see, the commands to create graphs are often very complicated If you write the commands yourself you may be able to make them somewhat simpler, but not much. So why learn how to create graphs using commands at all First of all, for simple graphs it can be much faster For example, you can create your basic scatter plot of mpg on weight simply by typing. scatter mpg weight. Second, even if you ve created a graph u sing the graphical user interface you may want to modify it by recalling the command and making changes Third, there are a very few things that cannot be done using the graphical user interface. On the other hand, there s little point in trying to learn the proper syntax for every graph option Let the graphical user interface help you with details like choosing text sizes and colors What you need to know is the basic syntax structure, and that s what we ll discuss. No matter how you created your graph, you should store the command in a do file This allows you to recreate the graph later, if needed It also serves as a record of how you created the graph. Graph Commands. All graph commands really come down to one command graph It is followed by either a type of graph e g graph bar or a family of graphs followed by a type of graph e g graph twoway scatter Then comes whatever information is needed to create the graph itself However, the most common graph types and families were also made stand alone commands, which is why you can just type scatter mpg weight. For the ubiquitous twoway family basically graphs with a Y axis and an X axis what follows is a varlist The last variable in the list is taken to be the X variable, and all the others are Y s--similar to how regress handles a varlist but in the opposite way. Graph commands can use if and in just like regular Stata commands they go at the end of the command but before any optionsbining Plots. If you want to include multiple plots in a graph, they must be separated either by putting them in parentheses or by putting two pipe characters between them Thus to create a graph containing two scatter plots of mpg on weight one for foreign cars and one for domestic cars, you can type either. scatter mpg weight if foreign scatter mpg weight if foreign. twoway scatter mpg weight if foreign scatter mpg weight if foreign. Note how in the second case you had to start with twoway That s because a Stata command can t start with a parenthesis, but once you put it in the context of a twoway graph Stata will understand what you mean. Graph commands cannot use the standard by prefix, but most allow a by option that does the same thing. scatter mpg weight, by foreign. Graph options follow the general option rule of going at the end of the command following a comma, but by that definition a single graph can contain several commands For example, the Sort on x variable checkbox for line plots translates into the sort option but it has to stay with the line plot if the graph has more than one Thus if you typed. line mpg weight scatter mpg weight, sort. the sort option would be applied to the scatter plot, where it would do little good Instead you should type. line mpg weight, sort scatter mpg weight. Things like titles are also options. scatter mpg weight, title MPG vs Weight. Note that the text of the title does not have to go in quotes--unless it has a comma in it You can use quotes to separate lines, just like when you typed it in the Ti tle box. But what really makes life interesting is when your options have options Suppose you wanted the title to be merely medium large medlarge rather than the default very large vlarge , and also a dark red specifically, cranberry You can make it so with the size and color options, but to make it clear what they are controlling the size and color of they have to go inside the title s parentheses Yet they still follow a single comma Thus the command becomes. scatter mpg weight, title MPG vs Weight, size medlarge color cranberry. Of course it s at this point that it becomes attractive to let the graphical user interface keep track of the proper placement of such things for you, not to mention letting you know that medlarge and cranberry are among the available options. For the rest of this article we ll type out the graph commands rather than using the graphical user interface, partially for practice but mostly because we ll be making fairly simple graphs and that s the quickest way to do so. Other Types of Graphs. Stata can create dozens of different kinds of graphs--for a much larger sampling, see the Visual Overview on Stata s web site This section will discuss a few more that are fairly commonly used at the SSCC. Stata can plot several different kinds of fit lines automatically The most common are lfit linear fit , qfit quadratic fit , lfitci linear fit with confidence intervals and qfitci quadratic fit with confidence intervals They re not very interesting by themselves--usually they re overlaid on a scatter plot The syntax is just like any other twoway graph Type. scatter mpg weight lfit mpg weight. Or if you prefer, set up the scatter plot in the graphical user interface as usual, then add a second plot setting the plot category and type to Fit plots and choosing Linear prediction --but typing it will be a whole lot faster. The versions that show confidence intervals need a little care because they can cover things up Try. scatter mpg weight qfitci mpg weight. Any points within the confidence interval are covered up by the shaded region You can fix that by reversing the order of the plots in the command However, qfitci is not one of the plot types that is recognized by itself, so you need to start with twoway. twoway qfitci mpg weight scatter mpg weight. Now all the points are shown Think of a Stata graph as a painting done with completely opaque paints If you have multiple plots each plot is a layer of paint, and layers that are added later cover up what was there before Thus plots that cover areas should be listed first, and anything that needs to go on top should be listed last. How ever, all these plots do is regress Y on X or Y on X and X 2 and plot the predicted values for Y If you want to run a more complicated regression there s no automatic command to plot the predicted values On the other hand, you can easily store the predicted values in a new variable and plot it. Suppose you wanted to plot the predicted probabilities you got from a logit of foreign on mpg a clear case of reversing cause and effect, but the methodology doesn t care No graph command will do this for you, but you can do it yourself. logit foreign mpg predict phat line phat mpg, sort. The result looks reasonable, but try it as a scatter plot. scatter phat mpg. This demonstrates that the only values of mpg represented in the graph are those represented in your data set and keep in mind many observations have the same value of mpg That may or may not be a problem, but if you wanted to plot a smooth curve over the full range of mpg you could replace the actual values of mpg with made-up numbers that are evenly distributed from 14 to 41.gen realMPG mpg replace mpg 41-14 n-1 N-1 14 predict phat2 scatter phat2 mpg replace mpg realMPG. Note that with multivariate regressions if you want to plot the effect of one variable you will probably need to set the others to their means before making predictions Otherwise the line will jump all over due to the effects of the other variables. Stata does two very different kinds of bar plots twoway bar is just a variation on what we ve seen before. twoway bar mpg weight. But there s also graph bar which is not part of the twoway family It plots summary statistics the default is mean rather than values, and is normally used to compare between variables or between groups Variables are simply listed, and the group variable is specified using the over option For example. graph bar weight price, over foreign. hbar is almost identical--it just turns everything sideways. graph hbar weight price, over foreign. If you want to compare something other than the mean, put that statistic in parentheses before the list of variables. graph hbar median weight price, over foreign. Histograms are very simple to create. Note that by default Stata does not put frequency on the Y axis, but probability density This fits with the idea of a histogram being an approximation to the probability density function, but probably isn t how you were taught to make histograms back in grade school You can have it plot frequencies using the frequency option percent is another that is frequently used. If you don t like Stata s default bins you can take control by either setting the number of bins bin option or the width of a bin width option You can get the same results either way The mpg variable goes from 12 to 41, for a total range of 29 Stata chose eight bins, which means each had a width of 29 8 3 625 If you wanted 10 bins, you could type. hist mpg, bin 10 frequency. But you ll get the exact same graph from. hist mpg, width 2 9 frequency. If you have discrete data, the discre te option tells Stata to choose bins accordingly For example, if you just type. Stata will choose eight bins even though rep78 only has five values The result is a confusing histogram of fairly simple data. However, if you add the discrete option Stata creates five bins for the five values. hist rep78, discrete. The result is a much clearer graph. Kernel Densities. You can overlay a kernel density on your histogram just by adding the kdensity option there s also a normal option to add a normal density. hist mpg, width 2 9 frequency kdensity. You can also create an independent kernel density plot with the kdensity command. The most commonly used option for kernel densities is bwidth which sets the bandwidth Compare. kdensity mpg, bwidth 5.kdensity mpg, bwidth 1.The Graph Editor. Stata includes a graph editor that can be used to modify a graph after it has been created Its big disadvantage is that it doesn t give you a command you can save in a do file and use to recreate the graph at will However, it does allow you to make changes very simply and easily. To see it in action, make a simple scatter plot. scatter mpg weight. Then click File Start Graph Editor You re now ready to make changes to this graph. On the left are several buttons that place the graph editor in a particular mode The top button, the arrow, puts it in pointer mode, which allows you to select an item on the graph to edit For example, if you click on the plot part of the graph i e inside the axes you ll be able to edit the plot region Color and Margin will appear in the tool bar at the top, but if you click More you ll be able to change many more properties. If you then click on a particular point you can change the plot itself Now the immediate options are Plottype Color Size and Symbol but you can again click More to see other things. As you do, note the Object Browser on the right Stata keeps track of the various parts of a graph in a sort of tree structure, and as you click on things it will highlight the object you ve selected You can also select an object directly For example, click title and you can add a title by typing it in the Text box Type in MPG vs Weight 1978 Cars and press Enter to see the results. The next three buttons the large T the diagonal line, and the circle with a plus sign allow you to add text, draw lines and place new points anywhere you need them As an example, let s add the Toyota Prius for comparison 46 mpg and about 3000 pounds for a 2008 four-door The smart way would be to add it to the dataset before making the graph, but we ll do it using the graph editor as an exercise. The first problem is that the graph ends at 42 mpg To fix that select yaxis1 in the Object Browser and click More Then set the Axis rule to Range Delta with a Minimum value of 10 a Maximum value of 50 and a Delta of 5 Click OK and the graph will be rescaled--and more ticks will be added so we have a better chance at marking 46 accurately. Now click the circle with a plus sign on the left and then cli ck as best you can at the location mpg 46 just above the line and weight 3000 This will create a hollow circle at that location by default, but note that you could change its appearance at will Seeing the point on the graph makes it clearer that the real advantage of a Prius over a 1978 VW Diesel the 1978 car with 41 MPG is not the Prius somewhat higher MPG, but the fact that it gets that MPG despite being a much heavier car. Now click on the T to add text and then click to the right of the new point This will give you the Textbox properties window In the Text box type 2008 Toyota Prius for comparison and set the Size to Small Then click OK. The bottom button on the left is the grid editor This allows you to make drastic changes to your graph, like rearranging the parts Use with discretion, and saving your graph before changing anything is highly recommended. This is a good time to mention why you might want to save graphs in Stata format while it s true that you can t put them into docum ents that way, you can make changes to them in the graph editor Thus you might want to keep two copies of important graphs, one in Stata graph format in case you need to make changes, and one in something like format that you can insert into your paper. Last Revised 6 7 2013.

Comments

Popular Posts